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

Azure SAS authorization fails with <AuthenticationErrorDetail>Signature fields not well formed. #910

Closed
xbrianh opened this issue Nov 1, 2022 · 7 comments · Fixed by #1036
Labels
bug Something isn't working

Comments

@xbrianh
Copy link

xbrianh commented Nov 1, 2022

Environment

Delta-rs version: 0.6.2
Binding: python

Using a sas token to access a deltalake on AzureStorage throws an authorization error. The sas token was verified out of band.

Interestingly, the thrown error provides a failed blob url. Comparing this with a working url, the sas fields in the failed url are url-quoted. For instance:

>>> from urllib.parse import quote_plus
>>> failed_url_sas_sig == quote_plus(working_url_sas_sig)
True
@xbrianh xbrianh added the bug Something isn't working label Nov 1, 2022
@wjones127
Copy link
Collaborator

Hey @xbrianh, thanks for reporting. I'm working on improving our testing for Azure in #912.

Could you share exactly how you are passing credentials to DeltaTable? Are you passing through storage_options? Or using environment variables? And which variables are you passing?

@xbrianh
Copy link
Author

xbrianh commented Nov 3, 2022

Hi @wjones127, thanks for looking into this so quickly!

Here's my access pattern:

storage_options = dict(account_name=storage_account, sas_token=sas)
t = deltalake.DeltaTable(azure_uri, storage_options=storage_options)

I also tried some aliases for "account_name" and "sas_token" found here

@roeap
Copy link
Collaborator

roeap commented Nov 7, 2022

@xbrianh - could you confirm really quick. I think we are expecting the sas token in the form as it would be if generated in the Storage Explorer. I that how you are passing it in?

@xbrianh
Copy link
Author

xbrianh commented Nov 7, 2022

Same issue with sas token generated in Storage Explorer.

@wjones127
Copy link
Collaborator

I'm not able to reproduce with Azurite, so the SAS token signature might not be validated there in full. We should test against the real API.

@roeap
Copy link
Collaborator

roeap commented Nov 17, 2022

I was able to reproduce the error against a real account. Will have to do some digging, as we tested this quite throughly when integrating it into object store.

@dominik7680
Copy link

I faced the same problem with SAS tokens generated by Azure Portal or Azure Storage explorer.
I'm using deltalake-0.6.4

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants