Information
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.
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.
Solution
Remediate from Azure Portal
- Go to Storage accounts
- Click on a storage account.
- Under Settings click Configuration
- Under Allow storage account key access click the radio button next to Disabled
- Click Save
- Repeat steps 1-5 for each storage account requiring remediation.
Remediate from Azure CLI
For each storage account requiring remediation, run the following command to disallow shared key authorization:
az storage account update --resource-group <resource-group> --name <storage-account> --allow-shared-key-access false
Remediate from PowerShell
For each storage account requiring remediation, run the following command to disallow shared key authorization:
Set-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account> -AllowSharedKeyAccess $false
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.