azure-cli: az storage account generate-sas creating invalid token (Expiry format incorrect)
Expiry portion of the SAS token ends up like:
se=2019-12-12T03%3A21%3A25Z
Where it should be like:
se=2019-12-12T03:21:25Z
I have no idea where that format is valid but for most practical uses it seems like complete gibberish (e.g if passing token to azcopy)
Furthermore az cli should generate sas tokens in identical format to the Azure Portal for consistency sake.
Azure Portal generated SAS:
?sv=2019-02-02&ss=bfqt&srt=sco&sp=rwdlacup&se=2119-11-12T10:31:28Z&st=2019-11-12T02:31:28Z&spr=https&sig=REDACTED
Azure CLI generated SAS:
se=2019-12-12T03%3A21%3A25Z&sp=rwdlacup&sv=2018-03-28&ss=bqtf&srt=sco&sig=REDACTED
Command Name
az storage account generate-sas
az storage account generate-sas --account-name {} --services {} --permissions {} --resource-type {} --expiry {} --output {}
Environment Summary
Linux-5.3.7-050307-generic-x86_64-with-debian-buster-sid
Python 3.6.5
Shell: bash
azure-cli 2.0.76
Extensions:
interactive 0.4.3
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 16 (6 by maintainers)
This is a snippet of a working example for AzCopy
I have tried with Azcopy 10.3.4 and the sas token generated with azure cli 2.6.0. it works to me. @nofunatall can you have a try again? and if there is any problem, could you provide log file to help figure out root cause?