π Azure Subscription Resource Lock Administrator Custom Role does not exist π’
- Contextual name: π Resource Lock Administrator Custom Role does not exist π’
- ID:
/ce/ca/azure/subscription/resource-lock-administrator-custom-role
- Located in: π Azure Subscription
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Descriptionβ
Descriptionβ
Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.
Rationaleβ
Given the resource lock functionality is outside of standard Role Based Access Control(RBAC),s it would be prudent to create a resource lock administrator role to prevent inadvertent unlocking of resources.
Impactβ
By adding this role, specific permissions may be granted for managing just resource locks rather than needing to provide the wide Owner or User Access Administrator role, reducing the risk of the user being able to do unintentional damage.
Auditβ
From Azure Portalβ
- In the Azure portal, open a subscription or resource group where you want to view assigned roles.
- Select
Access control (IAM)
.- Select
Roles
.- Search for the custom role named "role_name" e.g. from remediation
Resource Lock Administrator
.- Ensure that the role is assigned to the appropriate users.
Referencesβ
... see more
Remediationβ
Remediationβ
From Azure Portalβ
- In the Azure portal, open a subscription or resource group where you want the custom role to be assigned.
- Select
Access control (IAM)
.- Click
Add
.- Select
Add custom role
.- In the
Custom Role Name
field enterResource Lock Administrator
.- In the Description field enter
Can Administer Resource Locks
.- For Baseline permissions select
Start from scratch
- Select
Next
.- In the Permissions tab select
Add permissions
.- In the Search for a permission box, type in
Microsoft.Authorization/locks
to search for permissions.- Click on the result.
- Check the box next to
Permission
.- Select
Add
.- Select
Review + create
.- Select
Create
.- Assign the newly created role to the appropriate user.
From PowerShellβ
Below is a power shell definition for a resource lock administrator role created at an Azure Management group level:
Import-Module Az.Accounts Connect-AzAccount $role = Get-AzRoleDefinition "User Access Administrator" $role.Id = $null $role.Name = "Resource Lock Administrator" $role.Description = "Can Administer Resource Locks" $role.Actions.Clear() $role.Actions.Add("Microsoft.Authorization/locks/*") $role.AssignableScopes.Clear() * Scope at the Management group level Management group $role.AssignableScopes.Add("/providers/Microsoft.Management/managementGroups/MG-Name") New-AzRoleDefinition -Role $role Get-AzureRmRoleDefinition "Resource Lock Administrator"
... [see more](remediation.md)
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS Azure v2.1.0 β πΌ 1.23 Ensure a Custom Role is Assigned Permissions for Administering Resource Locks - Level 2 (Manual) | 1 | |||
πΌ CIS Azure v3.0.0 β πΌ 2.24 Ensure a Custom Role is Assigned Permissions for Administering Resource Locks (Manual) | 1 | |||
πΌ Cloudaware Framework β πΌ Role-Based Access Control (RBAC) Management | 9 |