Skip to content

Enable mTLS Proof‑of‑Possession for Client‑Assertion Delegates - #5409

Merged
Bogdan Gavril (bgavrilMS) merged 7 commits into
mainfrom
gladjohn/new-assertion-api
Aug 15, 2025
Merged

Bogdan Gavril (bgavrilMS) merged 7 commits into
mainfrom
gladjohn/new-assertion-api

Conversation

@gladjohn

Copy link
Copy Markdown
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
Gladwin Johnson VR (gladjohn) requested a review from a team as a code owner July 28, 2025 20:12

@bgavrilMS Bogdan Gavril (bgavrilMS) left a comment

Copy link
Copy Markdown
Member

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

Comment thread src/client/Microsoft.Identity.Client/IsExternalInit.cs Outdated
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