-
Notifications
You must be signed in to change notification settings - Fork 343
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
[Feature Request] In memory token cache in confidential client application is well partitioned for all flows, non longer serialized and can be shared between instances of confidential client apps #2861
Comments
Flow 1 - TokenCacheAdapter to move to MSAL (P2 - not required to solve this problem)
IdWeb work
Flow 2 - Well partitioned cache for User Cache (lots of testing required) P1Flow 3 - Static option in MSAL P0
IdWeb work (P1)
Better eviction (P2)
Flow 4 - Emit warnings for bad usage of MSAL P0Emit warnings / errors when we detect bad usage of MSAL.
|
What do you mean by flows? as discussed yesterday, none of the work, except removing the id web memory cache is dependent on the other work. nit: can you write out id web or microsoft.identity.web so it's clear what you are referring to? we never use an acronym for it. thx should this be in the one-pager or a separate doc so we can comment more easily? |
Just work streams for the problem we are trying to solve. The work streams can be tacked in parallel. The first one is indeed not mandatory for tackling this problem and we should take the time to design right. @pmaytak is looking at 2, @trwalke is looking at 4, and I'm looking at 3 For 1, since Id web is taking a breaking change, let's make sure we get the right token cache interface in place. Since the interface goes into MSAL, the design needs to go in an API governance doc at some point, so that other MSALs can benefit from it. Until then - whatever is simpler for you (1-pager, github issue, api review doc etc) is fine. @trwalke also looked so looking forward to his comments / help. Would also like your opinion the rest of the work items, especially 4. |
Flow 1 is actually two separate items.
Two is moving the MsalAbstractTokenAdapter to MSAL.NET
|
Creating a default MSAL token cache that works for all auth flows would definitely make ADAL to MSAL migration much easier! I just want to add that my service has code that clears the ADAL's token cache sometimes, so this may be something to think about when developing the MSAL's token cache or maybe "multiple_matching_tokens_detected" is not something that'll ever happen with MSAL.
Here's another piece of code that deletes a specific item from ADAL's token cache: The above code is used to get a fresh MS Graph token using a native app and username/password flow in a multi-tenant scenario. Here's the full code:
I don't really know why we had to write this code. Folks who did it have left the company. I do wonder what to do with this code during ADAL to MSAL migration. Thanks. |
@zhenyar. I think that this was defensive code due to the fact that ADAL's cache had not initially been designed to support some scenarios. You shouldn't need to do any of that with MSAL. I would recommend you just delete this code. |
When is the default cache support expected to be available in Microsoft.Identity.Client? Will the default cache support multi-tenant OBO, username/password and client credentials auth flows? Unfortunately Microsoft.Identity.Web.TokenCache is not going to work for me due to nuget hell. |
Is your feature request related to a problem? Please describe.
For context see Token cache vision 1-pager
Describe the solution you'd like
Out of the box, confidential client applications should internally have a token cache which is:
P1:
P2:
Describe alternatives you've considered
see Token cache vision 1-pager
Additional context
This issue overrides:
The text was updated successfully, but these errors were encountered: