-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Implemented functionality to skip the cache for MI when claims are provided #7207
Conversation
change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json
Outdated
Show resolved
Hide resolved
@Robbie-Microsoft - pls continue to the work we discussed, but do not commit. This work hasn't been OK-ed yet by the MSI team. It will anyway be required for MSIv2. @gladjohn - please close the work items until we get confirmation. |
lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts
Outdated
Show resolved
Hide resolved
@@ -142,7 +142,10 @@ export class ManagedIdentityApplication { | |||
correlationId: this.cryptoProvider.createNewGuid(), | |||
}; | |||
|
|||
if (managedIdentityRequest.forceRefresh) { | |||
if ( | |||
managedIdentityRequestParams.claims || |
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.
does msal js already have a way for app developers to provide this ?
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.
yes, but only per request basis. Hence, me adding the claims to the MI request params.
@@ -5,10 +5,12 @@ | |||
|
|||
/** | |||
* ManagedIdentityRequest | |||
* - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped |
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.
* - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped | |
* - claims - in case a resource refuses to authenticate with a token (e.g. because the token has been revoked by the tenant admin), it may send a 401 response and a WWW-Authenticate header with a claims parameter. When this is configured, MSAL always requests a new token from the identity provider, and will add the claims to the request where this is supported. |
Re-used functionality from ClientCredential flow.
This PR originally contained code to deprecate client assertion strings. That will now be a separate PR.