Skip to content

Conversation

@gladjohn
Copy link
Contributor

Fixes #5398

Changes proposed in this request
This pull request introduces significant enhancements to the mutual TLS Proof-of-Possession (mTLS PoP) functionality, refactors client assertion handling, and updates public APIs to support these changes. The most important changes include adding support for certificate-bound client assertions, refactoring the ClientCredential classes, and introducing new public APIs for client assertion configuration.

Enhancements to mTLS Proof-of-Possession:

Refactoring of Client Assertion Handling:

  • Introduced ClientAssertionDelegateCredential: Added a new class to handle client assertions supplied via a delegate, supporting JWTs with optional certificates for mTLS PoP. This replaces the removed SignedAssertionDelegateClientCredential class. (src/client/Microsoft.Identity.Client/Internal/ClientCredential/ClientAssertionDelegateCredential.cs, [1]; src/client/Microsoft.Identity.Client/Internal/ClientCredential/SignedAssertionDelegateClientCredential.cs, [2]
  • Support for JWT-PoP assertion type: Added a new constant for JWT-PoP assertion type in OAuth2 parameters to support certificate-bound assertions. (src/client/Microsoft.Identity.Client/OAuth2/OAuthConstants.cs, src/client/Microsoft.Identity.Client/OAuth2/OAuthConstants.csR69)

Updates to Public APIs:

  • Added AssertionResponse class: Introduced a new public class to encapsulate client assertions and optional certificates for token binding. (src/client/Microsoft.Identity.Client/AppConfig/AssertionResponse.cs, src/client/Microsoft.Identity.Client/AppConfig/AssertionResponse.csR1-R22)
  • Enhanced WithClientAssertion methods: Refactored existing methods to use the new AssertionResponse class and added a new overload for configuring client assertions with certificate binding. (src/client/Microsoft.Identity.Client/AppConfig/ConfidentialClientApplicationBuilder.cs, [1] [2] [3]
  • Public API declarations: Updated PublicAPI.Unshipped.txt files across multiple frameworks to include new APIs for client assertion configuration. (src/client/Microsoft.Identity.Client/PublicApi/net462/PublicAPI.Unshipped.txt, [1]; src/client/Microsoft.Identity.Client/PublicApi/net472/PublicAPI.Unshipped.txt, [2]; src/client/Microsoft.Identity.Client/PublicApi/net8.0-android/PublicAPI.Unshipped.txt, [3]

Miscellaneous Changes:

These changes collectively improve the flexibility and robustness of client assertion handling and enhance support for mTLS PoP scenarios.

Testing
unit

Performance impact
none

Documentation

  • All relevant documentation is updated.

@gladjohn gladjohn requested a review from a team as a code owner July 28, 2025 20:12
Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use GetAwaiter / GetResult

@gladjohn gladjohn force-pushed the gladjohn/new-assertion-api branch from a71bc45 to b84be19 Compare August 9, 2025 19:45
@gladjohn gladjohn requested review from bgavrilMS and trwalke August 12, 2025 13:50
@gladjohn gladjohn force-pushed the gladjohn/new-assertion-api branch from f6f5a31 to cac7a77 Compare August 12, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow DSTS client_assertion over mtls call for FIC

5 participants