Token encryption cache - exception handling improvements when attempting to decrypt #30402
Labels
ARM
az resource/group/lock/tag/deployment/policy/managementapp/account management-group
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Related command
az account show
az account get-access-token
Is your feature request related to a problem? Please describe.
The core problem is the lack of interoperability of encrypted token caches between different OSes.
Related to a bunch of open issues (not limited to):
Azure/azure-sdk-for-net#19167
#21010
#27176
AzureAD/microsoft-authentication-library-for-dotnet#3033
Describe the solution you'd like
When attempting to access/decrypt an encrypted (MSAL) token cache on an unsupported OS, there should be a very clear message explaining the compatibility, and/or linked to a troubleshooting guide.
I'm not asking for a working encrypted token cache solution in this feature/issue, as there are already enough open issues for that opened (see above). I don't feel that those will be solved any time soon. And even if they will be solved, there will always popup new decryption issues somewhere.
Suggested error message would be something like:
Encrypted credentials found but not able to decrypt
, this would help a ton, because then i know:Additional context
Current error when calling
az account get-access-token
when the cache is encrypted but accessed from an OS that does not support it:Current error message when using
DefaultAzureCredential
when the cache is encrypted but accessed from an OS that does not support it:The message when calling
az account show
is a200
response with the account details, where it seems there are no problems. It is questionable that it should return a200
, maybe that should throw an error or at the very least a warning, explicitly noting that there is an issue with the current stored MSAL credentials.Tagging @jiasli as recommended by @rayluo in AzureAD/microsoft-authentication-library-for-dotnet#3033 (comment)
The text was updated successfully, but these errors were encountered: