Skip to content
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

Add support for MSAL Token Cache persistence with Azure authentication #1895

Open
cheenamalhotra opened this issue Jan 19, 2023 · 1 comment
Labels
💡 Enhancement New feature request

Comments

@cheenamalhotra
Copy link
Member

Presently, ActiveDirectoryAuthenticationProvider implements all authentication modes but MSAL Cache location is not customizable and is in-memory by default. Cache persistence is useful for system apps that want to cache access token to file system using MSAL/Azure.Identity's cache options.

Proposed solution:

Expose API/type to enable cache persistence in OS with user options, such as:

  • Cache file name
  • Cache file location
  • Cache encryption (enabled/disabled)
  • Cache Key format
    and so on..

These options can be extended based on what underlying libraries support, and most common options can be supported. Because underlying libraries are not same for all auth modes, exposing a SqlClient specific API will ensure this support continues to be available across all authentication modes that support silent authentication.

Alternatives

The only alternative solution as of now is to implement the SqlAuthenticationProvider abstract class to be able to customize cache location and enable persistence.

I still need to solidify API design proposal but putting out this feature request to exchange thoughts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants