| name | cis-azure-foundations-9.3.1.3 |
| description | Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled' |
| category | cis-azure-foundations |
| version | 5.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","storage-accounts","shared-key","access-keys","entra-id","authorization"] |
| cis_id | 9.3.1.3 |
| cis_benchmark | CIS Microsoft Azure Foundations Benchmark v5.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled'
Description
Every secure request to an Azure Storage account must be authorized. By default, requests can be authorized with either Microsoft Entra credentials or by using the account access key for Shared Key authorization.
Rationale
Microsoft Entra ID provides superior security and ease of use compared to Shared Key and is recommended by Microsoft. To require clients to use Microsoft Entra ID for authorizing requests, you can disallow requests to the storage account that are authorized with Shared Key.
Impact
When you disallow Shared Key authorization for a storage account, any requests to the account that are authorized with Shared Key, including shared access signatures (SAS), will be denied. Client applications that currently access the storage account using the Shared Key will no longer function.
Audit Procedure
Audit from Azure Portal
- Go to
Storage accounts.
- Click on a storage account.
- Under
Settings, click Configuration.
- Under
Allow storage account key access, ensure that the radio button next to Disabled is selected.
- Repeat steps 1-4 for each storage account.
Audit from Azure CLI
Run the following command to list storage accounts:
az storage account list
For each storage account, run the following command:
az storage account show --resource-group <resource-group> --name <storage-account>
Ensure that allowSharedKeyAccess is set to false.
Audit from PowerShell
Run the following command to list storage accounts:
Get-AzStorageAccount
Run the following command to get the storage account in a resource group with a given name:
$storageAccount = Get-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account>
Run the following command to get the shared key access setting for the storage account:
$storageAccount.allowSharedKeyAccess
Ensure that the command returns False.
Expected Result
allowSharedKeyAccess should be set to false for all storage accounts.