Skip to content

Update cache keys for MSI scenarios #746

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 1 commit into from
Nov 7, 2023
Merged

Conversation

Avery-Dunn
Copy link
Collaborator

@Avery-Dunn Avery-Dunn commented Nov 2, 2023

Addresses #710

In both MSAL .NET and MSAL Java, the cache key for access tokens contains the tenant. For .NET this tenant value is a constant "managed_identity" for MSI scenarios, however in Java we had a default authority value which we extracted the tenant from, which meant it was always "common" instead of "managed_identity"

The changes in this PR add a new 'tenant' field to Public/Confidential/ManagedIdentity apps, which is then used in the token cache instead of parsing the authority. This will allow the cache keys in Java to better match those in .NET, and hopefully be more clear about where the tenant in a cache key came from.

(tests covering both the old and new cases will be coming soon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants