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

Can anyone give an example for usage with Azure Blob Storage? #311

Open
danielkokott opened this issue Dec 4, 2023 · 5 comments
Open

Can anyone give an example for usage with Azure Blob Storage? #311

danielkokott opened this issue Dec 4, 2023 · 5 comments

Comments

@danielkokott
Copy link

danielkokott commented Dec 4, 2023

Hey,

I cannot get it to work with Azure Blob Storage. I keep htting the InvalidAuthenticationInfo error.

Would anyone be so kind to provide an example?
I've tried using AZURE_STORAGE_ACCOUNT_NAME + AZURE_STORAGE_ACCOUNT_KEY
I've tried using AZURE_STORAGE_SAS_KEY.

No luck. I just keep getting:

thread 'main' panicked at /Users/runner/work/roapi/roapi/columnq/src/io/object_store.rs:127:18:
called `Result::unwrap()` on an `Err` value: Generic { store: "MicrosoftAzure", source: ListRequest { source: Error { retries: 0, message: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication information is not given in the correct format. Check the value of Authorization header.\nRequestId:e8f6f322-601e-0004-43b4-26717b000000\nTime:2023-12-04T13:16:43.6487418Z</Message></Error>", source: Some(reqwest::Error { kind: Status(400), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("REDACTED.blob.core.windows.net")), port: None, path: "/sdp-test", query: Some("restype=container&comp=list&prefix=Current%2F"), fragment: None } }), status: Some(400) } } }
@danielkokott
Copy link
Author

danielkokott commented Dec 4, 2023

Actually, I was a bit too quick here. I got it to work now. (I think a value in env AZURE_STORAGE_TENANT_ID was still floating about.)
In a fresh shell using only AZURE_STORAGE_ACCOUNT_NAME + AZURE_STORAGE_ACCOUNT_KEY.
Or only: AZURE_STORAGE_ACCOUNT_NAME + AZURE_STORAGE_SAS_KEY
...it works :)

@danielkokott
Copy link
Author

@danielkokott
Copy link
Author

I also now got it to work with an Microsoft Entra ID App registration aka. service principle. In this case these four env vars are used:
AZURE_STORAGE_TENANT_ID
AZURE_STORAGE_ACCOUNT_NAME
AZURE_STORAGE_CLIENT_ID
AZURE_STORAGE_CLIENT_SECRET

@houqp
Copy link
Member

houqp commented Dec 19, 2023

@danielkokott do you mind sending a MR to improve the docs at https://github.com/roapi/docs?

@danielkokott
Copy link
Author

I would love to! Let me give it a shot ASAP.

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

No branches or pull requests

2 participants