storage-blob sets accessPolicy to be undefined for SignedIdentifier with empty policy fields
See original GitHub issue- Package Name: @azure/storage-blob
- Package Version: 12.5.0
- Operating system: all
- nodejs
- version:
- browser
- name/version:
- typescript
- version:
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://docs.microsoft.com
Describe the bug
The return value getAccessPolicies
is inconsistent with the provided typings if one of the stored access policies has no defined fields.
To Reproduce Steps to reproduce the behavior:
- For a container, create an access policy without a start, expiry, or any permissions
- Get the container’s access policies
- Observe the returned value
Expected behavior
The return value matches the typing. Specifically accessPolicy
is always defined, only the fields inside of it are optional:
Screenshots
The SignedIdentifier
has an undefined accessPolicy
:
Additional context N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Define a stored access policy - Azure Storage | Microsoft Learn
Each SignedIdentifier field, with its unique Id field, corresponds to one access policy. Trying to set more than five access policies at one ......
Read more >azblob - Go Packages
String produces the access policy permission string for an Azure Storage container. Call this method to set AccessPolicy's Permission field.
Read more >azure-storage.blob.js - gists · GitHub
azure-storage.blob.js ... When absorbConditionalErrorsOnRetry is set (for append blob) ... if (typeof policy === 'undefined') {.
Read more >BlobContainerClient (Azure SDK for Java ... - javadoc.io
The container access policy. setAccessPolicy. public void setAccessPolicy(PublicAccessType accessType, List<SignedIdentifier> identifiers). Sets the container's ...
Read more >Azure Stored access policy, Signature did not match
I believe you are getting this error is because you have not specified the blob container name in your GetBlobSas() method.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any update to this issue?
Hi @craxal ,
We’d intend to have a consistent behavior between SDKs for different languages, I’m starting a discussion to determine on the correct behavior.
Thanks Emma