Skip to content
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

AzureStorage fails with valid connection string using shared access signature #1307

Closed
KristofBruyninckxOmina opened this issue Sep 25, 2023 · 1 comment · Fixed by #1312
Closed

Comments

@KristofBruyninckxOmina
Copy link

KristofBruyninckxOmina commented Sep 25, 2023

In version 4.2, additional checks have been added to the initialiser of AzureStorage

if self.connection_string and (not self.account_name or not self.account_key):
self.account_name = re.search(r'AccountName=(\w+);', self.connection_string)[1]
self.account_key = re.search(r'AccountKey=(.*);', self.connection_string)[1]

However, when using a connection string with shared access signature, the account name, and specifically, the account key should be omitted.

From azure docs https://learn.microsoft.com/en-gb/rest/api/storageservices/delegate-access-with-shared-access-signature:

A shared access signature (SAS) is a URI that grants restricted access rights to Azure Storage resources. You can provide a shared access signature to clients who should not be trusted with your storage account key but whom you wish to delegate access to certain storage account resources. By distributing a shared access signature URI to these clients, you grant them access to a resource for a specified period of time.

Because of the additional checks, a connection string that worked fine on v1.13.2 now fails on v1.14

@jschneier
Copy link
Owner

Thanks for the report, the fix is now going in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants