Closed
Conversation
added 5 commits
November 5, 2025 19:09
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/PublicAPI/net462/PublicAPI.Shipped.txt
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/ConfidentialClientApplicationBuilderExtension.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/ConfidentialClientApplicationBuilderExtension.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 11, 2025
tests/Microsoft.Identity.Web.Test.Common/Mocks/MockMtlsHttpClientFactory.cs
Show resolved
Hide resolved
bgavrilMS
requested changes
Nov 11, 2025
Member
bgavrilMS
left a comment
There was a problem hiding this comment.
See comments. DevEx needs more clarity.
MZOLN
reviewed
Nov 11, 2025
MZOLN
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
MZOLN
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderProvider.cs
Outdated
Show resolved
Hide resolved
MZOLN
reviewed
Nov 11, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderProvider.cs
Show resolved
Hide resolved
jmprieur
reviewed
Nov 11, 2025
Collaborator
jmprieur
left a comment
There was a problem hiding this comment.
Sorry I forgot to press "Submit review"
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderBoundProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
tests/Microsoft.Identity.Web.Test.Common/Mocks/MockMtlsHttpClientFactory.cs
Show resolved
Hide resolved
Co-authored-by: Jean-Marc Prieur <jmprieur@microsoft.com>
Co-authored-by: Jean-Marc Prieur <jmprieur@microsoft.com>
…m/cpp11nullptr/microsoft-identity-web into iepoly/add-token-binding-scenario
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds token binding support for mTLS (mutual TLS) authentication scenarios. The implementation enables acquiring tokens bound to certificates and using those certificates when calling downstream APIs.
Key Changes
- Introduced
MsalMtlsHttpClientFactoryfor creating HTTP clients configured with binding certificates - Extended
DefaultAuthorizationHeaderProviderto implementIAuthorizationHeaderProvider2for returning binding certificates alongside tokens - Updated
TokenAcquisitionto detect mTLS scenarios via authentication scheme and configure token binding accordingly
Reviewed Changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
MsalMtlsHttpClientFactory.cs |
New factory for creating mTLS-enabled HTTP clients with certificate pooling |
DefaultAuthorizationHeaderProvider.cs |
Extended to support IAuthorizationHeaderProvider2 interface for token binding scenarios |
TokenAcquisition.cs |
Added logic to detect mTLS authentication scheme and enable token binding via WithMtlsProofOfPossession |
DownstreamApi.cs |
Updated to use mTLS HTTP client factory when binding certificate is present |
ConfidentialClientApplicationBuilderExtension.cs |
Added WithBindingCertificateAsync method for configuring binding certificates |
MergedOptions.cs |
Added IsTokenBinding property to track token binding state |
TokenAcquirer.cs |
Updated to populate BindingCertificate in AcquireTokenResult |
| Test files | Comprehensive test coverage for new token binding functionality |
| PublicAPI files | Updated API surface documentation for all target frameworks |
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…m/cpp11nullptr/microsoft-identity-web into iepoly/add-token-binding-scenario
MZOLN
reviewed
Nov 20, 2025
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisitionOptionsHelper.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 24, 2025
src/Microsoft.Identity.Web.TokenAcquisition/DefaultAuthorizationHeaderProvider.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 24, 2025
src/Microsoft.Identity.Web.TokenAcquisition/MsalMtlsHttpClientFactory.cs
Show resolved
Hide resolved
bgavrilMS
reviewed
Nov 24, 2025
bgavrilMS
reviewed
Nov 24, 2025
Contributor
Author
|
Reopened as #3622. |
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.
Purpose
Introduce a “token binding scenario” for confidential client (app-only) token acquisition and downstream API calls:
cnfclaim – thumbprint / key reference).AuthorizationHeaderProviderOptions.ProtocolScheme.High-level scenario
ProtocolScheme = "Pop"or futureProtocolScheme = "mtls-pop"/"mtls") inAuthorizationHeaderProviderOptions.cnf) when certificate binding is active.Bearer <token>; protocol-specific transformations for schemes like Pop are applied internally).cnfclaim (x5t thumbprint).