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't omit expiry when using Stored Access Policies #174

Open
fdr opened this issue Sep 5, 2020 · 0 comments
Open

Can't omit expiry when using Stored Access Policies #174

fdr opened this issue Sep 5, 2020 · 0 comments
Assignees

Comments

@fdr
Copy link

fdr commented Sep 5, 2020

The gem doesn't handle "must be omitted" very well as it comes to using stored access policies.

https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas#specifying-the-access-policy

  • permissions, aka sp. This defaults to "r", but should not be applied if "identifier" is passed. It can be worked around via passing permissions: nil. How often are people defining Storage Access Policies with no permission? That said, it's probably not good to foreclose the more obscure use case, so if it is set, it should be respected.

  • expiry, aka se. This one less ambiguous: it is okay to pass it if the stored access policy is indefinite, and not okay to pass it if it is also defined in the stored access policy. This gem forces you to include it, making Stored Access Policies with expirations unavailable. I removed this line in a local hacked version of the gem, and this got it to work.

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

No branches or pull requests

2 participants