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

'Missing mandatory parameters for valid Shared Access Signature' with an account SAS URI #383

Open
tomswedlund opened this issue Feb 10, 2021 · 1 comment
Labels

Comments

@tomswedlund
Copy link

tomswedlund commented Feb 10, 2021

Hi there,

I'm an FTE with the CosmosDB team (my alias is toswedlu, I couldn't log into GitHub with it for some reason today) and I'm having an issue with some end-to-end testing for some features we are GA'ing shortly. When using the storage SDK, we previously only used service SAS URIs, but now are using account SAS URIs in addition to. When using the account SAS URIs to access blobs, I'm now seeing the error 'Missing mandatory parameters for valid Shared Access Signature'. I've tracked down the line of code that throws this exception (shared_access_signature.cpp, line 121) and it seems that the "sr" parameter is expected on the SAS token, though this is not a valid parameter for account SAS tokens. Could this be a bug, or does this mean that account SAS tokens are not supported?

We are running short on time considering a looming GA deadline, so any help would be appreciated. I've also run a quick test by appending "&sr=" or "&sr=something" and this seems to resolve the issue, at least in a small SDK test. Could this be an acceptable work around, if this is truly a bug?

Thanks!,
Tom

@Jinming-Hu
Copy link
Member

Hi @tomswedlund , thanks for reporting this issue. You’re right, sr should not be mandatory for account SAS. I believe this is a bug. And I think your workaround is fine. I don’t think your fix will bring other issues.

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

No branches or pull requests

2 participants