Description
When the account permits anonymous access and the network permits the connection, blob allows anyone with a blob’s URL to read it. container also allows listing the blobs. Neither grants anonymous writes.
Potential impact
Private files can be read without signing in. Listing also exposes names and storage structure.
Remediation
Separate intentionally public data and set container_access_type = "private" on protected containers. Disable anonymous reads on the account if no container needs them. From an allowed network, test the same blob anonymously and with the required data permission or valid SAS. Only the authorized read should succeed.
Examples
Both excerpts target vhds and omit account settings. They use AzureRM syntax that supports storage_account_name.
Before
resource "azurerm_storage_container" "artifact_container" {
name = "vhds"
storage_account_name = azurerm_storage_account.example.name
container_access_type = "blob"
}
After
resource "azurerm_storage_container" "artifact_container" {
name = "vhds"
storage_account_name = azurerm_storage_account.example.name
container_access_type = "private"
}