feat(rdp): Kerberos logon through a configured KDC

An RDP profile can name a Kerberos KDC; CredSSP then authenticates with
Kerberos instead of NTLM, reaching the KDC through a small TCP client
(RFC 4120 length-prefixed framing, 5 s connect / 10 s read timeouts,
replies capped at 1 MiB so a hostile KDC can't force a huge allocation).
UDP KDCs are refused with a clear message. Tested against a fake KDC
(round trip, oversized reply, UDP); not against a real realm.

Smart-card logon is not implemented: it needs PC/SC hardware and a card
to build and test against.
This commit is contained in:
Andy Dixon
2026-10-12 18:30:30 +01:00
parent ae2b07db4b
commit 455d8fa6da
6 changed files with 75 additions and 9 deletions
+2
View File
@@ -411,6 +411,8 @@ pub struct RdpConfig {
pub allow_tls_only: bool,
/// Play remote audio locally.
pub audio: bool,
/// Log on with Kerberos through this KDC (`host` or `host:port`, TCP); empty uses NTLM.
pub kerberos_kdc: String,
/// Local folder shared with the remote desktop as a drive (empty: none). Linux and macOS.
pub shared_folder: String,
/// Offer a printer; print jobs are saved as PostScript files in Downloads.