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

Auth error when running inside VS Code #2306

Closed
thomasfrederikhoeck opened this issue Mar 20, 2024 · 3 comments
Closed

Auth error when running inside VS Code #2306

thomasfrederikhoeck opened this issue Mar 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@thomasfrederikhoeck
Copy link
Contributor

Environment

Delta-rs version: 0.16.1

Binding: python

Environment:

  • Cloud provider:Azure
  • OS:Windows
  • Other:

Bug

What happened: When my colleage run the following code against a specific storage account inside VS Code she get the following error while if she runs it as a script no error occurs. It however works for some other storage account. I can run it fine within VS Code and as as script. I suppect something funny is going on with object_store and how credentials are cached for VisualStudioCodeCredential.

Code:

from deltalake import DeltaTable
blob_path = "abfss://<container>/<path>" 
storage_account = '<account>'
container = '<container>'
storage_options = {"AZURE_STORAGE_ACCOUNT_NAME": storage_account, "AZURE_CONTAINER_NAME":container, 'use_azure_cli': 'true'}

dt = DeltaTable(blob_path, storage_options=storage_options)

Error msg:

OSError: Generic MicrosoftAzure error: Client error with status 403 Forbidden: <?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:85066fd9-201e-0058-47c6-7a707b000000
Time:2024-03-20T12:57:00.7481649Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request '<redacted>' is not the same as any computed signature. Server used following string to sign: 'GET





Wed, 20 Mar 2024 12:57:00 GMT





x-ms-version:2023-11-03
/<account>/<container>/<path>/_delta_log/_last_checkpoint'.</AuthenticationErrorDetail></Error>

What you expected to happen:
No error
How to reproduce it:
Hard to reproduce as it only is happening for one of us.
More details:

@thomasfrederikhoeck thomasfrederikhoeck added the bug Something isn't working label Mar 20, 2024
@ion-elgreco
Copy link
Collaborator

Sounds like a misconfiguration of some credentials to me rather than a bug

@thomasfrederikhoeck
Copy link
Contributor Author

thomasfrederikhoeck commented Mar 20, 2024

@ion-elgreco I tought the same but if we run the code on the same computer (but just copied into a python file) and use same conda env it doensn't give the issue? I have open a question on object_store just to figure out if they use that kind of auth.

@thomasfrederikhoeck
Copy link
Contributor Author

@ion-elgreco I figured it out (apache/arrow-rs#5534) and it is not a bug in delta-rs but maybe more a little confusing behaviour from the Azure Rust SDK. I will close :-)

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

No branches or pull requests

2 participants