π‘οΈ Azure Resource Lock is not enabled for mission-critical resourcesπ’βͺ
- Contextual name: π‘οΈ Resource Lock is not enabled for mission-critical resourcesπ’βͺ
- ID:
/ce/ca/azure/resource-manager/mission-critical-azure-resources-use-locks - Tags:
- βͺ Impossible policy
- π’ Policy with categories
- π’ Policy with type
- Policy Type:
BEST_PRACTICE - Policy Categories:
SECURITY,RELIABILITY
Similar Policiesβ
- Cloud Conformity: Enable Azure Resource Locks
Descriptionβ
Descriptionβ
Resource Manager Locks provide a way for administrators to lock down Azure resources to prevent deletion of, or modifications to, a resource. These locks sit outside of the Role Based Access Controls (RBAC) hierarchy and, when applied, will place restrictions on the resource for all users. These locks are very useful when there is an important resource in a subscription that users should not be able to delete or change. Locks can help prevent accidental and malicious changes or deletion.
Rationaleβ
As an administrator, it may be necessary to lock a subscription, resource group, or resource to prevent other users in the organization from accidentally deleting or modifying critical resources. The lock level can be set to to
CanNotDeleteorReadOnlyto achieve this purpose.
CanNotDeletemeans authorized users can still read and modify a resource, but they cannot delete the resource.ReadOnlymeans authorized users can read a resource, but they cannot delete or update the resource. Applying this lock is similar to restricting all authorized users to the permissions granted by the Reader role.... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Navigate to the specific Azure Resource or Resource Group.
- For each mission critical resource, click on
Locks.- Click
Add.- Give the lock a name and a description, then select the type,
Read-onlyorDeleteas appropriate.- Click
OK.From Azure CLIβ
To lock a resource, provide the name of the resource, its resource type, and its resource group name:
az lock create --name <LockName> --lock-type <CanNotDelete/Read-only> --resource-group <resourceGroupName> --resource-name <resourceName> --resource-type <resourceType>From Powershellβ
Get-AzResourceLock -ResourceName <Resource Name> -ResourceType <Resource Type> -ResourceGroupName <Resource Group Name> -Locktype <CanNotDelete/Read-only>
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ CIS Azure v2.1.0 β πΌ 10.1 Ensure that Resource Locks are set for Mission-Critical Azure Resources - Level 2 (Manual) | 1 | no data | |||
| πΌ CIS Azure v3.0.0 β πΌ 10.1 Ensure that Resource Locks are set for Mission-Critical Azure Resources (Manual) | 1 | no data | |||
| πΌ CIS Azure v4.0.0 β πΌ 7.2 Ensure that Resource Locks are set for Mission-Critical Azure Resources (Manual) | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Data Protection and Recovery | 18 | no data |