← cd ~/roles
// roles/azure · security
Key Vault Certificate UserAzure built-in role
Read certificate contents. Only works for key vaults that use the 'Azure role-based access control' permission model.
| Role ID | db79e9a7-68ee-4b58-9aeb-b90e7c24fcba |
|---|---|
| Category | Security |
| Actions | 0 |
| Data actions | 4 |
Before you assign it
- It reaches the data, not just the resource. It has 4 data actions, such as reading blobs, secrets or messages.
What it can do
No control-plane actions.
Data actions
| Permission | What it allows |
|---|---|
Microsoft.KeyVault/vaults/certificates/read | List certificates in a specified key vault, or get information about a certificate. |
Microsoft.KeyVault/vaults/secrets/getSecret/action | Gets the value of a secret. |
Microsoft.KeyVault/vaults/secrets/readMetadata/action | List or view the properties of a secret, but not its value. |
Microsoft.KeyVault/vaults/keys/read | List the keys in a specified vault, or read the current version of a specified key. |
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 "Key Vault Certificate User" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Key Vault Certificate User" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'db79e9a7-68ee-4b58-9aeb-b90e7c24fcba')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'db79e9a7-68ee-4b58-9aeb-b90e7c24fcba')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "db79e9a7-68ee-4b58-9aeb-b90e7c24fcba"
| 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
- Microsoft Sentinel Playbook Operator · 4 permissions