Skip to content

Add RDP gateway and load balance support - #282

Open
skolarianer wants to merge 4 commits into
sol1:mainfrom
skolarianer:feat/rdp-gateway-load-balance
Open

skolarianer wants to merge 4 commits into
sol1:mainfrom
skolarianer:feat/rdp-gateway-load-balance

Conversation

@skolarianer

@skolarianer skolarianer commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds RD Gateway settings to RDP connections and ad-hoc sessions, including support for the RD Connection Broker load-balance cookie. Preserves separate target credentials when gateway credentials are configured.

Validation: cargo test --offline passed.

@davekempe

Copy link
Copy Markdown
Member

Thanks for this, RD Gateway support would be good to have. A few things before it can go in:

  • Allowlist: the gateway host isn't checked against the network allowlist. guacd connects to gateway_hostname:gateway_port, so a poweruser's ad-hoc session can point it at any host and port and get around rdp_allowed_networks and the non-admin fence. Could you check it with allowed_address like the RDP host (default port 443)?
  • Inner host: with a gateway set, rustguac still resolves and allowlists the inner RDP host locally. Hosts behind a gateway usually only resolve on the gateway side, so I think most real setups will fail with "DNS did not answer" or "not in the allowed network list". It probably wants treating like a jump host: check the gateway, skip resolving the target.
  • Connect-time overrides: load_balance_info and the gateway credentials can be overridden at connect time by anyone who can connect to the entry. Overriding load_balance_info lets someone pick a different collection than the admin set, so I'd drop it from the connect request.
  • Docs: the new fields want adding to docs/api.md, plus a short RD Gateway section.
  • Commit author: the commit is authored as root@ your dev box. Could you re-author it with your GitHub identity?

Also, which gateway have you tested this against? We don't have one here, so a quick note on what you ran it with would help.

Main has moved on since you opened this. The entry update merge is merge_entry_update now, and gateway_password needs adding there or editing an entry wipes it. Rebasing onto main should show you where.

@skolarianer
skolarianer force-pushed the feat/rdp-gateway-load-balance branch from 1b2eea2 to f213b1f Compare October 20, 2026 01:09
@skolarianer

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I pushed the requested fixes: non-admin ad-hoc sessions validate and pin the RD Gateway against rdp_allowed_networks, while the gateway resolves the inner RDP target. Saved-entry gateway credentials and load-balance settings can no longer be overridden at connect time, and entry updates preserve gateway_password. I also added the API documentation and corrected the commit author.

I tested this against an RD Gateway provided by our hosting provider. We don’t know any details about their gateway’s implementation or configuration.

Validation passed: cargo test, cargo fmt --check, and cargo clippy --offline -- -D warnings.

@skolarianer
skolarianer force-pushed the feat/rdp-gateway-load-balance branch from 26861d3 to c215e4e Compare October 20, 2026 14:57
@skolarianer
skolarianer force-pushed the feat/rdp-gateway-load-balance branch from c215e4e to 0c03b04 Compare October 20, 2026 15:00
@skolarianer

Copy link
Copy Markdown
Contributor Author

oops... there still was a commit by root@. Sorry for the mess!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants