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
{{ message }}
Repository navigation
feat(credssp): use the KdcResolution enum instead of KDC url - #1987
This PR adds the KdcResolution enum, which specifies how Kerberos should resolve the KDC, either by using IAKERB proxy or by connecting directly to an external KDC specified by URL.
THis PR is part of integration of the IAKERB extension in sspi-rs and updates the codebase to use the updated public API of sspi-rs.
github-actionsBot
added
needs-review
A human reviewer is the current next actor
risk/unknown
Risk could not be determined automatically; needs maintainer-level scrutiny
scope/core
Touches the core architectural tier
scope/ffi
Affects native or .NET bindings
scope/web
Affects the web/WASM ecosystem
size/L
Size: up to 899 counted lines and 20 files; exceeds M in either measure
labels
Sep 24, 2026
Clear stale kdcproxyname when mirroring explicit Kerberos config
crates/ironrdp-client/src/config.rs:1347
When cfg selects IAKerb, an existing kdcproxyname loaded from the property set survives because only kdcproxyurl is cleared. The built config uses IAKERB, but its public properties() still advertises the old proxy; feeding those properties into another builder then selects KdcUrl instead. Clear kdcproxyname whenever an explicit Kerberos config is mirrored so the two representations cannot conflict.
…751)
This PR adds support for the IAKERB extension according to the [IAKERB
specification](https://datatracker.ietf.org/doc/html/draft-ietf-kitten-iakerb-03).
The main changes are focused on the `Kerberos` state machine.
Previously, the `Preauthentication` state handled the entire KDC message
exchange withing a single async `intialize_security_context` call. This
approach does not work with IAKERB, where KDC messages are exchanged via
a server that acts as a proxy. The `Preauthentication` state has
therefore been split into multiple states, allowing the state machine to
save `Kerberos` state between KDC message exchanges.
Additionaly, the `AS` and `TGS` exchanges have been extracted into
separate state machines. These new state machines are KDC
transport-agnostic and can be used with both external KDC and an IAKERB
proxy.
## What is IAKERB
IAKERB extends Kerberos to support scenarios where the client cannot
directly access the KDC. Instead, KDC messages are encapsulated in
GSS-API tokens and exchanged through an IAKERB proxy. The server
forwards these messages to the LocalKDC, allowing the client to obtain
the required Kerberos tickets without direct network access to the KDC.
Microsoft recently introduced IAKERB support in Windows Insider builds
as part of its effort to reduce NTLM dependency:
https://techcommunity.microsoft.com/blog/windows-itpro-blog/reducing-ntlm-dependency-iakerb-and-localkdc-in-windows-insider-preview/4524615.
## Related PRs
* picky-rs: Devolutions/picky-rs#531
* IronRDP: Devolutions/IronRDP#1987
The reason will be displayed to describe this comment to others. Learn more.
PR #1987 migrates KerberosConfig to a new crate-owned KdcResolution enum (IAKerb vs KdcUrl) mirroring the sspi 0.23.1 API, bumps sspi/picky/picky-krb/winscard in the lockfile and pinned picky floors, always clears kdcproxyname in with_kerberos_config, and adds one regression test. The migration is mechanically correct and protocol-neutral. Five published findings, all low severity: the new enum duplicates an sspi type that is already publicly re-exported; the new_with_iakerb constructor has no callers; both changed Kerberos tests lack independent oracle provenance (the new test's invariant is specified only by the implementation's own rustdoc); the reworked KdcUrl(Some) upsert branch of with_kerberos_config is unpinned by tests; and the sspi manifest floors remain at 0.23 even though the code now requires the 0.23.1 IAKerb API, so minimal-version or 0.23.0-pinned resolutions fail to compile.
[dependency] sspi manifest floors stay at 0.23 while the code now requires the 0.23.1 API — low 🟡 — crates/ironrdp-connector/Cargo.toml
The lockfile widens sspi 0.23.0 -> 0.23.1 via the unchanged "0.23" requirements (connector Cargo.toml:29, also ironrdp and ironrdp-mstsgu), but the migrated code hard-depends on the 0.23.1 IAKerb API: credssp.rs:23 constructs sspi::KdcResolution::IAKerb and mstsgu http_auth.rs:302 calls sspi::KerberosConfig::new_with_kdc_url, which per the PR discussion only exists after the sspi-rs IAKerb release. Consumers resolving without this lockfile, or pinning/minimal-versions on 0.23.0, will fail to compile; raise the sspi floors to at least 0.23.1.
Push a commit after addressing these findings. If no code change is needed, you may resolve inline threads and comment @github-actions review-ready to request human review.
The reason will be displayed to describe this comment to others. Learn more.
[skeptical + code-compressor] Local KdcResolution enum and From impl duplicate the already-re-exported sspi::KdcResolution — low 🟡 — The enum, variants, and From impl are a 1:1 mirror of sspi::KdcResolution with no added behavior, and the connector already does `pub use sspi;` (lib.rs:25) with sspi marked `# public`, so sspi types are established public API here. Replacing lines 14-30 with `pub use sspi::KdcResolution;` preserves the public path ironrdp_connector::credssp::KdcResolution (used by ironrdp-client, ironrdp-web, and the testsuite) with no call-site edits and avoids keeping a mirror enum and exhaustive match in sync with upstream sspi.
The reason will be displayed to describe this comment to others. Learn more.
[skeptical + code-compressor] new_with_iakerb constructor has no callers in the workspace — low 🟡 — A workspace-wide search finds no call of new_with_iakerb; every in-repo producer (client kerberos_config_from_properties, web connect, mstsgu gateway auth) builds KdcResolution::KdcUrl(...), and the only IAKerb construction (the new test) uses a struct literal directly since all fields are public. The constructor is speculative public surface; it can be dropped until a consumer exists, or kept knowingly as ergonomic downstream API for the sspi-rs IAKerb integration announced in the PR body.
The reason will be displayed to describe this comment to others. Learn more.
[test] Changed Kerberos tests lack independent oracle provenance — low 🟡 — Both changed tests carry no `// oracle:` marker although sibling tests use the convention (line 1697). The new test's requirement — an explicit KerberosConfig clears kdcproxyname/kdcproxyurl so properties cannot select a different KDC — is stated only in with_kerberos_config's own rustdoc (config.rs:1592-1595), i.e. the code under test, and the modified test's https://{name}/KdcProxy normalization value likewise rests only on the implementation. Such self-derived oracles detect change rather than bugs; specify the invariant in an independent intent/contract source and mark both tests with it.
The reason will be displayed to describe this comment to others. Learn more.
[test] Reworked KdcUrl(Some) upsert branch of with_kerberos_config is unpinned by tests — low 🟡 — with_kerberos_config was reworked to branch on KdcResolution: KdcUrl(Some(url)) upserts kdcproxyurl while everything else clears both properties (config.rs:1598-1603). The new test covers only the IAKerb branch; no existing test pins that an explicit KdcUrl(Some) overrides pre-existing, differing kdcproxyname/kdcproxyurl properties, which is the invariant the updated doc comment introduces. Add a case (e.g. explicit_kerberos_config_kdc_url_overrides_properties) covering that path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ai-reviewed/1One automated review completedbreaking-changeIncludes a breaking change, and requires special scrutiny at the boundarieskind/protocolAffects RDP or related protocol behaviorrisk/highSubstantial core public API impact, or fail-closed triage; needs maintainer-level scrutinyscope/coreTouches the core architectural tierscope/cross-cuttingSpans multiple architectural boundariesscope/webAffects the web/WASM ecosystemsize/MSize: up to 449 counted lines and 10 files; exceeds S in either measure
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
KdcResolutionenum, which specifies how Kerberos should resolve the KDC, either by using IAKERB proxy or by connecting directly to an external KDC specified by URL.THis PR is part of integration of the IAKERB extension in
sspi-rsand updates the codebase to use the updated public API ofsspi-rs.Related PRs