-
Notifications
You must be signed in to change notification settings - Fork 324
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
SAS download returns 403 #2412
Comments
Thanks for reporting this issue! I can repro it. I will need more time to debug into SDK code to see what's the real stringTosign SDK use. And compare it with Azurite Code generated one. |
Could you please help to look at the user delegation SAS failure? |
Hi @danjohnso Could you share how you get the |
ServiceUri is "https://127.0.0.1:10000/devstoreaccount1/" for Azurite, real connection is "https://ACCOUNT_NAME.blob.core.windows.net/" |
Did a little more testing, maybe this is an issue with the SDK....
I notice there are less querystring params in this generated URL as compared to the SDK generated one. |
Hi @danjohnso , The URL you generated by Azure Storage Explorer seems generated by storage key credential instead of OAuth. It doesn't include delegation SAS required query values. |
Is there any chance of this getting fixed in the near future? |
Hi @danjohnso , Is this line of code to try to get user delegation key from Azure Storage Service: Azurite uses different base key to sign user delegation key with Azure Storage Service, the user delegation key gotten from Azure doesn't work with Azurite. Could you try with get user delegation key against Azurite? |
That's the line of code for it, I was definitely not getting the token from
Azure though as I was working on this in local only mode. I didn't even
have internet access when I ran into it
…On Wed, Sep 11, 2024, 9:59 PM EmmaZhu-MSFT ***@***.***> wrote:
Hi @danjohnso <https://github.com/danjohnso> ,
Is this line of code to try to get user delegation key from Azure Storage
Service:
UserDelegationKey key = await
_blobServiceClient.GetUserDelegationKeyAsync(DateTimeOffset.UtcNow,
DateTimeOffset.UtcNow.AddMinutes(5)); ?
Azurite uses different base key to sign user delegation key with Azure
Storage Service, the user delegation key gotten from Azure doesn't work
with Azurite.
Could you try with get user delegation key against Azurite?
—
Reply to this email directly, view it on GitHub
<#2412 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGQIA5PL6FD36EHQQGL4GLZWD7S7AVCNFSM6AAAAABJE4ORZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGE3DSMBZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @danjohnso , I just saw your code: The I used following code to test Azurite, and the uploading and downloading works fine:
Could you have a try with the above code? |
Hi @EmmaZhu I'm also having signature mismatch issue. actually I created my client using could you describe how you prepared the token for azurite? I tried some approaches.. but couldn't get it to work...
thank you. |
oh, I made it by referring to one test case. so, never mind my comment.. |
Which service(blob, file, queue, table) does this issue concern?
Blob
Which version of the Azurite was used?
Tested in 3.28.0 from Visual Studio initially, tried upgrading to 3.30.0 with VS Code as well
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
VS Code and Visual Studio 2022
What's the Node.js version?
20.10.0
What problem was encountered?
When trying to download file with a SAS token url, I get a 403 back from Azurite. Connecting to real storage account returns file as expected.
Steps to reproduce the issue?
Tried azurite versions from Visual Studio and VS Code (version info above). Using oauth, https and fixed file location. Flags like so:
Certificate is valid and I am able to use Azure Storage Explorer to connect and view the files in the instance
Using the Azure.Storage.Blobs SDK version 12.20.0, I have code like this:
Generates a link that looks like this:
When connected to Azurite, I get a 403 back. Connected to a real storage account, the file downloads as expected (confirmed in an incognito browser window).
I attached the debug.log, looks like it fails on validating the UDK?
azurite-debug.log
Have you found a mitigation/solution?
No, nothing I have done locally seems to work.
The text was updated successfully, but these errors were encountered: