Conversation
Updated the API documentation to reflect changes in the mTLS-bound token handling, including new options and migration paths for IdWeb and direct MSAL consumers.
WithMtlsPopFallback() and MtlsPopOptions for managed identity mTLS PoP with automatic attested-to-non-attested fallback**WithMtlsPopFallback() and MtlsPopOptions for managed identity mTLS PoP with automatic attested-to-non-attested fallback
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a draft API specification document for a new managed identity mTLS PoP “fallback” experience, aiming to let higher-level SDKs request a bound token without having to orchestrate attestation behavior directly.
Changes:
- Adds a new markdown spec describing
WithMtlsPopFallback()andWithMtlsProofOfPossession(MtlsPopOptions)(withEnableFallback) for managed identity. - Documents proposed internal plumbing (
IsBoundTokenFallbackEnabled) and the intended fallback behavior inImdsV2ManagedIdentitySource. - Describes intended logging/telemetry and discusses cache key partitioning implications.
…ocs accuracy - Fix Section 7: Cache key partitioning was wrong - both token and cert caches use provider presence not actual outcome. Documented the bug and proposed concrete fix for fallback mode. - Fix Section 3: Full end-to-end plumbing for IsBoundTokenFallbackEnabled through ApplyMtlsPopAndAttestation() and AuthenticateAsync() capture. - Fix Section 4: Consistent use of _isBoundTokenFallbackEnabled instance field. Added Section 4.3 for credential_guard_requires_cng fallback. - Fix Section 2.2: Added ArgumentNullException for null options and NET462 guard matching existing WithMtlsProofOfPossession(). - Fix Section 2.3: MtlsPopOptions docs corrected - provider not configured is existing behavior not a fallback scenario. - Fix Section 1: Reframed value proposition - KeyAttestation dependency stays, fallback orchestration moves to MSAL. - Fix Section 5: Added FIC scope clarification. - Fix Section 6: Log messages now match Section 4 code exactly. - Fix WithAttestationSupport docs: call ordering is not required. - Fix behavior table: added CNG and NET462 rows. - Fix naming: MSAL .NET -> MSAL.NET per repo conventions. - Fix open questions numbering (2->4 skip). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Proposes a new public API on
AcquireTokenForManagedIdentityParameterBuilderthat enables mTLS Proof-of-Possession token acquisition with automatic fallback from attested to non-attested binding when attestation fails.Higher-level SDKs (e.g., Microsoft.Identity.Web) should not need to understand or orchestrate attestation internals. They need a bound token — MSAL should handle the "how."
Problem
Today, IdWeb must explicitly call:
This has three issues:
Proposed API
Two equivalent ways to opt in (Option 1 is sugar for Option 2):
Option 1:
WithMtlsPopFallback()(Recommended)Option 2:
WithMtlsProofOfPossession(MtlsPopOptions)New Options Class
Fallback Behavior
When
EnableFallback = true:attestation_failedmtls_pop_requires_keyguardHow IdWeb Changes
WithAttestationSupport()becomes a capability registration (brings in native DLL), not a strategy directive.WithMtlsProofOfPossession()(no args) remains as the strict, no-fallback API for advanced callers.Breaking Changes
None. Purely additive:
WithMtlsProofOfPossession()— unchangedWithAttestationSupport()— unchangedWithMtlsPopFallback()— newWithMtlsProofOfPossession(MtlsPopOptions)— new overloadMtlsPopOptions— new classRelated