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 document for disabling token cache encryption #29193

Open
jiasli opened this issue Jun 18, 2024 · 3 comments
Open

Add document for disabling token cache encryption #29193

jiasli opened this issue Jun 18, 2024 · 3 comments
Assignees
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Possible-Solution Similar-Issue
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Jun 18, 2024

... So yes, using a token can be helpful but adding a possibility to allow a non encrypted cache flag can be useful as well. MSAL allow this even on Windows why not encrypt by default the token serialization cache and propose a flag to make the local cache not encrypted?

Originally posted by @SCOMnewbie in #28484 (comment)

Copy link

Hi @jiasli
Find similar issue #19506.

Issue title [Enhancement Proposal] Add config option to disable token cache encryption
Create time 2021-09-09
Comment number 4

Possible solution:
As mentioned in that issue, instead of using allow_unencrypted or fallback_to_plaintext and let Azure CLI try its best to encrypt, we should introduce a definitive option like plaintext to force unencrypted token cache, so that complex platform-dependent problems can be bypassed. This has been implemented in #20432 as core.encrypt_token_cache. Additionally, if you want to opt-in to unprotected token cache behavior, you can use the FilePersistence in MSAL EX Python.


Please confirm if this resolves your issue.

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 18, 2024

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team feature-request labels Jun 18, 2024
@yonzhan yonzhan added this to the Backlog milestone Jun 18, 2024
@jiasli jiasli changed the title Allow disabling token cache encryption Add document for disabling token cache encryption Jun 18, 2024
@jiasli
Copy link
Member Author

jiasli commented Jun 18, 2024

Allowing disabling token cache encryption was previously discussed in #19506.

Azure CLI does have a config option core.encrypt_token_cache for disabling token cache encryption:

az config set core.encrypt_token_cache=false

However, this feature is still marked as a EXPERIMENTAL and not officially documented:

# EXPERIMENTAL: Use core.encrypt_token_cache=False to turn off token cache encryption.
# encrypt_token_cache affects both MSAL token cache and service principal entries.
encrypt = cli_ctx.config.getboolean('core', 'encrypt_token_cache', fallback=fallback)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Possible-Solution Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants