-
Couldn't load subscription status.
- Fork 378
Add Service Fabric token revocation support #5421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
trwalke
reviewed
Aug 5, 2025
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Outdated
Show resolved
Hide resolved
trwalke
reviewed
Aug 5, 2025
tests/Microsoft.Identity.Test.Integration.netcore/HeadlessTests/ManagedIdentityTests.NetFwk.cs
Show resolved
Hide resolved
trwalke
reviewed
Aug 5, 2025
tests/Microsoft.Identity.Test.Unit/ManagedIdentityTests/ManagedIdentityTests.cs
Show resolved
Hide resolved
715419f to
ccf5f92
Compare
Avery-Dunn
reviewed
Aug 6, 2025
src/client/Microsoft.Identity.Client/ManagedIdentity/ManagedIdentityRequest.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Outdated
Show resolved
Hide resolved
tests/Microsoft.Identity.Test.Common/Core/Mocks/MockHttpManagerExtensions.cs
Outdated
Show resolved
Hide resolved
15fc53c to
4d4728e
Compare
Avery-Dunn
approved these changes
Aug 7, 2025
trwalke
reviewed
Aug 8, 2025
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Show resolved
Hide resolved
trwalke
reviewed
Aug 8, 2025
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/ManagedIdentitySourceExtensions.cs
Outdated
Show resolved
Hide resolved
323932f to
ca9d468
Compare
neha-bhargava
approved these changes
Aug 8, 2025
This was referenced Aug 16, 2025
This was referenced Sep 8, 2025
Closed
This was referenced Sep 15, 2025
This was referenced Sep 25, 2025
Closed
This was referenced Oct 24, 2025
Open
Open
Open
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.
Fixes #5420
Changes proposed in this request
This pull request introduces support for claims and revoked token handling in Managed Identity authentication, along with improvements to token caching logic and query parameter parsing. The main changes include new properties for claims and revoked token hash, enhanced cache bypass logic to handle claims and force refresh, and the ability to pass client capabilities and revoked token hashes to Managed Identity endpoints. Additionally, the parsing of key-value query strings is made more robust to handle edge cases.
Managed Identity Claims and Revoked Token Support
ClaimsandRevokedTokenHashproperties toAcquireTokenForManagedIdentityParameters, and updated logging to reflect their usage. [1] [2]ManagedIdentityAuthRequestto bypass cache when claims are present, compute hash of revoked tokens, and pass this information to the endpoint, ensuring correct token issuance in claims-based scenarios. [1] [2] [3] [4]Client Capabilities and Claims Integration
ManagedIdentityRequestto include client capabilities (xms_cc) and revoked token hash (token_sha256_to_refresh) in requests; integrated this inAbstractManagedIdentityfor sources that support claims and capabilities. [1] [2]ManagedIdentitySourceExtensionsto track which Managed Identity sources support claims and capabilities.Key-Value Query String Parsing Improvements
CoreHelpers.ParseKeyValueListto correctly handle values containing=, such as base64-encoded strings, by splitting only on the first=character. Also enhanced trimming and logging. [1] [2]Test and Dependency Updates
TestConstants.ATSecretfor access tokens and added flags for capability and claims support in mock handlers. [1] [2] [3]Dependency Injection and Usability
ICryptographyManagerviaManagedIdentityAuthRequestconstructor for hash computation, and updated dependencies in Managed Identity source files. [1] [2] [3] [4] [5] [6]Testing
Performance impact
none
Documentation