-
Notifications
You must be signed in to change notification settings - Fork 234
Add Claims and Capability Support to Managed Identity Flows #3350
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
Conversation
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.ManagedIdentity.cs
Show resolved
Hide resolved
544e885
to
797a382
Compare
src/Microsoft.Identity.Web.TokenAcquisition/ManagedIdentityTestHooks.cs
Outdated
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.
I'd like to understand first what you are doing and why.
In particular I'm not too keen in adding test features in product code
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquirerFactoryTesting.cs
Outdated
Show resolved
Hide resolved
69c1e47
to
8478dd3
Compare
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquirerTestHooks.cs
Outdated
Show resolved
Hide resolved
@jmprieur this enables us to inject HttpClient into ManagedIdentityApplication, but now this uses DI for the mocks. |
f2795da
to
4f5cd8d
Compare
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.ManagedIdentity.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/IManagedIdentityHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
19bab4b
to
ef579b2
Compare
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.
LGTM
once you have addressed at least the namespace.
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquirerFactoryTesting.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquirerTestHooks.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquirerTestHooks.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/IManagedIdentityTestHttpClientFactory.cs
Outdated
Show resolved
Hide resolved
Thanks @jmprieur @bgavrilMS @jennyf19, just needs one re-approval |
Add Claims and Capability Support to Managed Identity Flows
Summary of the changes (copilot generated)
This pull request introduces several updates to the
Microsoft.Identity.Web
library, focusing on enabling Continuous Access Evaluation (CAE) for Managed Identity, adding a new test-only interface for custom HTTP client factories, and enhancing token acquisition functionality. Additionally, it includes updates to the solution file and adds a new test application. Below is a summary of the most important changes:Continuous Access Evaluation (CAE) for Managed Identity
cp1
client capability in Managed Identity applications. This includes automatic handling of 401 responses with claims challenges, bypassing the token cache, and retrying the request with a fresh token. [1] [2] [3]docs/design/managed_identity_capabilities_devex.md
.New Test-Only Interface for Custom HTTP Client Factories
IManagedIdentityTestHttpClientFactory
, an internal interface to allow unit tests to provide customIMsalHttpClientFactory
implementations.Enhancements to Token Acquisition
TokenAcquisition
class to support client capabilities and claims challenges during token acquisition for Managed Identity. [1] [2] [3]_miHttpFactory
to inject custom HTTP client factories into Managed Identity applications. [1] [2]Solution File Updates
daemon-app-msi
, to the solution file (Microsoft.Identity.Web.sln
). This includes updates to the project list, build configurations, and project dependencies. [1] [2] [3]New Test Application
daemon-app-msi
, to demonstrate token acquisition for Managed Identity and interaction with a downstream API (e.g., Azure Key Vault).Detail
Fixes #2759650
Fixes #3370