-
Notifications
You must be signed in to change notification settings - Fork 364
Add MSI token revocation support for legacy sources #5139
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
base: main
Are you sure you want to change the base?
Conversation
4ac538d
to
579b189
Compare
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AppServiceManagedIdentitySource.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AzureArcManagedIdentitySource.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/CloudShellManagedIdentitySource.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/ImdsManagedIdentitySource.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/MachineLearningManagedIdentitySource.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/ServiceFabricManagedIdentitySource.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/ImdsManagedIdentitySource.cs
Outdated
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/ImdsManagedIdentitySource.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AppServiceManagedIdentitySource.cs
Show resolved
Hide resolved
src/client/Microsoft.Identity.Client/ManagedIdentity/AppServiceManagedIdentitySource.cs
Show resolved
Hide resolved
...t/Microsoft.Identity.Client/ApiConfig/Parameters/AcquireTokenForManagedIdentityParameters.cs
Outdated
Show resolved
Hide resolved
8334022
to
a51ffab
Compare
src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
Outdated
Show resolved
Hide resolved
312229f
to
76b0762
Compare
Fixes #5138
Spec: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/docs/msiv1_token_revocation.md
This pull request includes significant changes to the
Microsoft.Identity.Client
library, focusing on enhancing the handling of managed identity authentication requests. The key changes involve adding support for claims and capabilities, improving token handling logic, and refactoring various classes to accommodate these new features.Enhancements to Managed Identity Authentication:
src/client/Microsoft.Identity.Client/ApiConfig/Parameters/AcquireTokenForManagedIdentityParameters.cs
: Added new propertiesClaims
andBadTokenHash
to support claims and token hashing.src/client/Microsoft.Identity.Client/Internal/Requests/ManagedIdentityAuthRequest.cs
: IntroducedICryptographyManager
to compute token hashes and updated theExecuteAsync
method to handle claims and token caching more effectively. [1] [2] [3]Refactoring for Claims and Capabilities:
src/client/Microsoft.Identity.Client/ManagedIdentity/AbstractManagedIdentity.cs
: Refactored methods to include claims and capabilities in the managed identity request, including the newApplyClaimsAndCapabilities
method. [1] [2]Updates to Managed Identity Sources:
AppServiceManagedIdentitySource
,AzureArcManagedIdentitySource
,CloudShellManagedIdentitySource
,ImdsManagedIdentitySource
,MachineLearningManagedIdentitySource
,ServiceFabricManagedIdentitySource
) to use the newCreateRequest
method signature that includesAcquireTokenForManagedIdentityParameters
. [1] [2] [3] [4] [5] [6] [7]These changes collectively improve the robustness and flexibility of managed identity authentication in the
Microsoft.Identity.Client
library.Testing
unit tests
Performance impact
none
Documentation