Azure / Azure/Azurite

set_container_access_policy returns 400 Bad Request on a valid request

Open
#2,378 3 comments 0 reactions 1 assignee Claimed by @EmmaZhu View on GitHub
blob-storage bug
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
blob
### Which version of the Azurite was used?
3.29.0
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
DockerHub
### What's the Node.js version?
--
### What problem was encountered?
API set_container_access_policy returns with 400 Bad Request on a valid request. The same request succeeds with Azure (Requests were made using the Python SDK).
### Steps to reproduce the issue?
The following code should reproduce it
```
from azure.storage.blob import BlobServiceClient
from azure.storage.blob import PublicAccess
from azure.storage.blob import AccessPolicy

blob_service_client = BlobServiceClient.from_connection_string(f'{conn_string}')
container_client = blob_service_client.get_container_client('container')

container_client.create_container()
container_client.set_container_access_policy(signed_identifiers={'test': AccessPolicy()}, public_access=PublicAccess.Container)
```
>azure.core.exceptions.HttpResponseError: Bad Request
ErrorCode:None

If possible, please provide the debug log using the -d parameter, replacing \ with an appropriate path for your OS, or review the instructions for docker containers:

```
-d ""
```

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

### Have you found a mitigation/solution?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.