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(server): add run_connection_pre_authenticated for transport-encrypted streams
Adds a sibling to RdpServer::run_connection that walks the same
per-connection state machine but skips the IronRDP-managed TLS handshake.
The caller's stream must already be transport-encrypted at a lower layer
(typically a WebSocket Secure terminator in an RDCleanPath-shaped
deployment).
The implementation mirrors run_connection except for one step: on
BeginResult::ShouldUpgrade, instead of calling tls_acceptor.accept(stream),
the new method calls Acceptor::mark_security_upgrade_as_done() to advance
the state machine and re-wraps the inner stream as already-post-TLS. The
Hybrid CredSSP block, accept_finalize, and shutdown sequence are
identical to run_connection because CredSSP carries its own crypto via
TSRequest and does not require the underlying transport's TLS.
Builds on PR #1181 which made run_connection generic over any
AsyncRead+AsyncWrite stream. This method extends the same design intent
to streams that have been TLS-terminated by a lower layer.
Wire-level invariant preserved: the X.224 negotiation is untouched. The
acceptor still advertises whatever SecurityProtocol it was constructed
with; only the TLS-handshake step is skipped. Earlier attempts at a
wire-level signal (PR #1210, RdpServerSecurity::PreSecured) failed
interop with vanilla clients and were closed; this method sidesteps
that approach by relying on a higher-layer protocol (RDCleanPath) to
inform the client that TLS happened elsewhere.
Considered and rejected: a new RdpServerSecurity::PreAuthenticated
variant. The canonical deployment serves both vanilla TCP+TLS clients
and WSS+RDCleanPath clients from a single server instance on different
listeners; per-connection choice fits that use case, while a variant
would force splitting into two server instances and break exhaustive
matches downstream. Sibling method has zero API breakage.
A NOTE comment in the source records the synchronization requirement
with run_connection's ShouldUpgrade arm so future rebases catch
upstream divergence.
The motivating downstream consumer is lamco-rdp-server's WebSocket plus
RDCleanPath listener, which retires its external ws-rdp-proxy from the
production WASM-client path.
0 commit comments