Closed felickz closed 11 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
AuthenticationFailed
Author: | felickz |
---|---|
Assignees: | - |
Labels: | `Service Attention`, `Storage`, `customer-reported`, `needs-triage`, `question` |
Milestone: | - |
@blueww Wei Wei could you please look at this issue.
@felickz
Thanks for raising the issue! ? has been in the SAS connection string from Powershell from very long time ago, and the behavior comes from old SDK. It might not be so difficult to remove ? from the connection string of Storage Context, but this is a potential breaking change, as the connection string might be used by many user in many different tools, and remove ? might will break part of them.
I will need time to do more investigation to see the possibility for breaking, then decide how to fix it.
@felickz
We are considering to remove the "?" from connection string, but since this is a potential breaking change, we prefer to do the change in the next Azure PowerShell major release (generally, Azure PowerShell has major release twice a year.)
Besides that, I am contacting SDK team, to see if can make SDK also support connectionString with '?' to unblock your scenario. Feel free to let us know if you have any concern or comments.
I'm seeing the same error when using az storage file download
, using --sas-token
to authenticate.
However, strangely, it works using --connection-string
, even when the string passed is a SAS token.
The current plan is to remove the leading question mark in the next PSH major release in Nov.
Close since the leading question mark of Azure Powershell generated SAS is already removed in latest Az.storage release: https://www.powershellgallery.com/packages/Az.Storage/6.0.0
Description
ConnectionString returned from
New-AzStorageContext -StorageAccountName $storageAccountName -SasToken $SASToken
contains an erroneous '?' in: ;SharedAccessSignature=?BlobEndpoint=https://xyz.blob.core.windows.net/;QueueEndpoint=https://xyz.queue.core.windows.net/;TableEndpoint=https://xyz.table.core.windows.net/;FileEndpoint=https://xyz.file.core.windows.net/;SharedAccessSignature=?sv=2019-07-07&sig=<sig-goes-here>&spr=https&se=2021-12-18T19%3A41%3A31Z&srt=co&ss=f&sp=rcwl
Azure portal does not create with the
?
Further, when passing this Connection String into the .NET package (and also tested 12.7)
Azure.Storage.Files.Shares
Receive error (removing the
?
fixes this error):Steps to reproduce
Workaround
Environment data
Module versions