Using '--public-access off' when creating storage container causes creation to fail
See original GitHub issueDescribe the bug
Command Name:
az storage container create
Errors:
The value for one of the HTTP headers is not in the correct format. ErrorCode: InvalidHeaderValue
<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:9821f33d-c01e-00e5-78a7-171d7d000000
Time:2020-04-21T06:39:11.6688523Z</Message><HeaderName>x-ms-blob-public-access</HeaderName><HeaderValue>off</HeaderValue></Error>
To Reproduce:
az storage container create --name {} --account-name {} --account-key {} --public-access off
Expected Behavior
A more meaningful error message stating that setting public-access
is no longer needed in the latest version.
Environment Summary
Linux-5.5.17-200.fc31.x86_64-x86_64-with-fedora-31-Thirty_One
Python 3.7.6
Installer: RPM
azure-cli 2.4.0
Also tested in:
Linux-5.0.0-1036-azure-x86_64-with-debian-buster-sid
Python 3.6.5
Installer: DEB
azure-cli 2.4.0
Additional Context
Removing the public-access
parameter entirely or setting a value of either blob
or container
will not cause issues.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Configure anonymous public read access for containers and ...
Keep in mind that public access to a container is always turned off by default and must be explicitly configured to permit anonymous...
Read more >Ensure public access level for Blob Containers is set to private
To set the permission for public access to private (off) for a specific blob container, use the container's name with the following command:...
Read more >Not sure whether the container is listed as [] in azure storage
The above error show that in your storage account you didn't create any containers and files. I have created one container and add...
Read more >Cheat Sheet: Microsoft Azure Blob Storage - Zuar
Python. This will create an access policy for the container, update the container with the policy (including Public Access), and print off the ......
Read more >Securing Azure data - Storage account configuration ...
When a storage account is created, Azure generates two 512-bit ... for public access to private(off) for the above container name, using the ......
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 Free
Top 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
Oh, damn! I must’ve missed that as I was sure that the default permission was to deny public access.
EDIT:
@flytzen, I just tested creating a storage container with the following command:
az storage container create --name "$1" --account-name "$2" --account-key "$3"
, which resulted in a storage container that has the Public access level as Private when viewing the container in the Azure Portal. Am I missing something crucial?dupe of #13373 Fixed in azure cli 2.6.0