question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using '--public-access off' when creating storage container causes creation to fail

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
usrmecommented, May 3, 2020

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?

$ az version
{
  "azure-cli": "2.4.0",
  "azure-cli-command-modules-nspkg": "2.0.3",
  "azure-cli-core": "2.4.0",
  "azure-cli-nspkg": "3.0.4",
  "azure-cli-telemetry": "1.0.4",
  "extensions": {}
}
0reactions
Juliehzlcommented, May 25, 2020

dupe of #13373 Fixed in azure cli 2.6.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found