Overview
The Azure Storage setting Allow Blob Anonymous Access (a.k.a. allowBlobPublicAccess) controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment.
Rationale
If "Allow Blob Anonymous Access" is enabled, blobs can be accessed by adding the blob name to the URL to see the contents. An attacker can enumerate a blob using methods such as brute force and access them.
If this setting is set to 'Enabled', data may be exfiltrated by brute-force enumeration of items from a storage account.
Impact
Additional consideration may be required in exceptional circumstances where elements of a storage account require public accessibility. In these circumstances, it is highly recommended that all data stored in the public-facing storage account be reviewed for sensitive or potentially compromising data and that sensitive or compromising data never be stored in these storage accounts.
Default Value
Disabled
Remediation guidance
From Azure Console
- Open the storage account in the Azure Portal using the
Open in Azurebutton. - Click on a Storage Account.
- Under the Settings section, click
Configuration. - Under Allow Blob Anonymous Access, select
Disabled.
Repeat these steps for each Storage Account.
From Azure Powershell
For every storage account in scope, run the following:
$storageAccount = Get-AzStorageAccount -ResourceGroupName "<yourResourceGroup>" -Name "<yourStorageAccountName>"
$storageAccount.AllowBlobPublicAccess = $false
Set-AzStorageAccount -InputObject $storageAccount
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
Azure
Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Azure Storage Accounts Allowing Blob Public Access
Connectors
Covered asset types
Expected check: eq []
{
storageAccounts(where: { allowBlobPublicAccess: true }) {
...AssetFragment
}
}
Microsoft Azure