Open ejschoen opened 2 months ago
Hi @ejschoen,
2.63.0 is not the latest Azure CLI(2.64.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Describe the bug
Consider the case of an organization that periodically (i.e., daily) rotates storage account keys. There can be a delay between the key being rotated and the updated value being made available (i.e. in an Azure Kubernetes scenario, from the Azure key value to a Kubernetes secret that's managed by secrets-store.csi.k8s.io). During this interval, a software component may try to fetch a SAS token using the now invalid connection string.
az storage container generate-sas
will return a valid-looking SAS token that cannot be subsequently used. For example, azcopy will fail with an AuthorizationFailed error.This is an issue for organizations that use
az storage azcopy ...
commands. While these commands don't take SAS tokens, they do take connection strings. Furthermore, they always return status 0 even if the connection string is invalid. (See #20319, which is not getting any attention, even after 3 years). An application that needs to validate a connection string using generate-sas can't determine if the SAS token generated by a (bad) connection string is a bad SAS token.Related command
Call with a bogus ConnectionString
Errors
Outputs a righteous looking SAS token:
Issue script & Debug output
Expected behavior
Exit to shell with non-zero status.
Environment Summary
Additional context
No response