🛡️ Azure Storage Account uses ReadOnly lock🟢⚪
- Contextual name: 🛡️ Storage Account uses ReadOnly lock🟢⚪
- ID:
/ce/ca/azure/storage/account-use-readonly-lock - Tags:
- Policy Type:
BEST_PRACTICE - Policy Categories:
SECURITY,RELIABILITY
Description
Description
Adding an Azure Resource Manager
ReadOnlylock can prevent users from accidentally or maliciously deleting a storage account, modifying its properties and containers, or creating access assignments. The lock must be removed before the storage account can be deleted or updated. It provides more protection than aCannotDelete-type of resource manager lock.This feature prevents
POSToperations on a storage account and containers to the Azure Resource Manager control plane, management.azure.com. Blocked operations includelistKeyswhich prevents clients from obtaining the account shared access keys.Microsoft does not recommend
ReadOnlylocks for storage accounts with Azure Files and Table service containers.This Azure Resource Manager REST API documentation (spec) provides information about the control plane
POSToperations for Microsoft.Storage resources.While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining storage accounts that require ReadOnly locks depends on the context and requirements of each organization and environment.
... see more
Remediation
Remediation
From Azure Portal
- Navigate to the storage account in the Azure portal.
- Under the
Settingssection, selectLocks.- Select
Add.- Provide a Name, and choose
ReadOnlyfor the type of lock.- Add a note about the lock if desired.
From Azure CLI
Replace the information within <> with appropriate values:
az lock create --name <lock> \ --resource-group <resource-group> \ --resource <storage-account> \ --lock-type ReadOnly \ --resource-type Microsoft.Storage/storageAccountsFrom Powershell
Replace the information within <> with appropriate values:
New-AzResourceLock -LockLevel ReadOnly ` -LockName <lock> ` -ResourceName <storage-account> ` -ResourceType Microsoft.Storage/storageAccounts ` -ResourceGroupName <resource-group>
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 CIS Azure v5.0.0 → 💼 9.3.10 Ensure Azure Resource Manager ReadOnly locks are considered for Azure Storage Accounts (Manual) | 1 | no data | |||
| 💼 Cloudaware Framework → 💼 Data Protection and Recovery | 18 | no data |