Azure role · security
Managed HSM contributorAzure built-in role
Lets you manage managed HSM pools, but not access to them.
Read onlyChange some thingsChange anythingGive access to others
Medium risk. It can create, change or delete some resources in scope.
In short: Managed HSM contributor is an Azure built-in role with 5 actions.
| Role ID | 18500a29-7fe2-46b2-a342-b16a415e101d |
|---|---|
| Category | Security |
| Actions | 5 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.KeyVault/managedHSMs/* | Every operation under Microsoft.KeyVault/managedHSMs |
Microsoft.KeyVault/deletedManagedHsms/read | View the properties of a deleted managed hsm |
Microsoft.KeyVault/locations/deletedManagedHsms/read | View the properties of a deleted managed hsm |
Microsoft.KeyVault/locations/deletedManagedHsms/purge/action | Purge a soft deleted managed hsm |
Microsoft.KeyVault/locations/managedHsmOperationResults/read | Check the result of a long run operation |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Managed HSM contributor" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Managed HSM contributor" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"What each line does
- Line 1: Creates a role assignment in Azure. Makes a change.
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '18500a29-7fe2-46b2-a342-b16a415e101d')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18500a29-7fe2-46b2-a342-b16a415e101d')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "18500a29-7fe2-46b2-a342-b16a415e101d"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other security roles
- App Compliance Automation Reader · 1 permission
- Key Vault Crypto Service Release User · 1 permission
- Security Assessment Contributor · 1 permission
- Attestation Reader · 2 permissions
- Key Vault Secrets User · 2 permissions
- Attestation Contributor · 3 permissions
- Locks Contributor · 3 permissions
- Key Vault Certificate User · 4 permissions
Find the smallest role for a task →
Link to this page
Writing a guide or answering a question? Copy this link.
<a href="https://azureblog.co.uk/roles/azure/managed-hsm-contributor/">Managed HSM contributor Azure role explained</a>Spotted something out of date or wrong? Tell us and we'll fix it.