You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dgw): route KDC traffic through agent tunnel (DGW-384)
When an agent advertises the KDC's subnet or DNS domain, route Kerberos
traffic through the QUIC tunnel just like every other proxy path. This
closes the last gap left after the transparent routing PR (#1741).
Two paths now use the same routing pipeline as connection forwarding:
- `/jet/KdcProxy` HTTP endpoint — `send_krb_message` consults the
routing pipeline before falling back to direct TCP.
- RDP CredSSP/NLA — `rdp_proxy.rs::send_network_request` previously
hard-coded `None` for the agent handle. Plumb `agent_tunnel_handle`,
`session_id`, and `explicit_agent_id` from `RdpProxy` down through
`perform_credssp_as_*` -> `resolve_*_generator` -> `send_network_request`.
The same change reaches the credential-injection clean path
(`rd_clean_path.rs`).
Session correlation:
- RDP CredSSP callers pass the parent association's `jet_aid` so KDC
sub-traffic ties back to its parent RDP session in agent-side logs.
- The HTTP `/jet/KdcProxy` handler passes the KDC token's own `jti`
(the most persistent identifier available without a parent
association). `KdcToken` now carries `jti` alongside the claims for
this purpose.
Explicit-agent routing (matches every other proxy path):
- `send_krb_message` takes `explicit_agent_id: Option<Uuid>` and
forwards it to `agent_tunnel::routing::try_route`. When the parent
association pins `jet_agent_id`, the KDC sub-traffic is routed via
that agent or fails -- never silently falls back to a different
agent or to direct connect. The HTTP handler passes `None`.
Hardening (came along since they live in the same file):
- 64 KiB `MAX_KDC_REPLY_MESSAGE_LEN` DoS cap on the announced
TCP-framed KDC reply length, with overflow-safe length math.
- UDP scheme guard: KDC over UDP keeps going direct because the agent
tunnel only carries TCP today.
Drive-by: `crates/agent-tunnel/src/listener.rs` move-after-move on
`ca_manager` introduced by #1775 -- fixed with `Arc::clone` to keep
master building on `--no-default-features` configurations.
Stack: based on #1741. Picks up `agent_tunnel::routing::try_route`.
Issue: DGW-384
0 commit comments