-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Enhancement Proposal] Add config option to disable token cache encryption #19506
Comments
Enhancement |
Regarding to this:
One of its comment linked to this MSAL Ex .Net PR which adds WithUnprotectedFile() option. So, if that kind of "opt-in to unprotected token cache" behavior is what you want, you can use the |
Totally understand. That's why this issue is opened in Azure CLI repo. |
plaintext
to disable token cache encryption
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Azure PowerShell's token encryption issues
Various issues have been reported regarding Azure PowerShell's token encryption functionality:
Windows:
MacOS:
The workaround is to disable persistent token cache between sessions:
However, this approach is not feasible for Azure CLI, as there is no concept of session - Azure CLI is a
python
application and there is no connection between commands.Python SDK status
In current Python SDKs, a fallback mechanism is used:
allow_unencrypted
fallback_to_plaintext
But this fallback mechanism only takes effect when initializing
LibsecretPersistence
on Linux fails - it is possible that failures can also occur whenFilePersistenceWithDataProtection
on Windows,KeychainPersistence
on MacOS are initialized or actually used. (Token encryption is enforced on Windows and MacOS)LibsecretPersistence
on Linux is actually usedWhen failures happen on various platforms, forcing token encryption will render Azure CLI totally unusable.
Proposed solution
Instead of using
allow_unencrypted
orfallback_to_plaintext
and let Azure CLI try its best to encrypt, we should introduce a definitive option likeplaintext
to force unencrypted token cache, so that complex platform-dependent problems can be bypassed.Reference email: Workaround for DPAPI/KeyChain Errors
The text was updated successfully, but these errors were encountered: