azureblog.co.uk
← cd ~/roles
// roles/azure · containers

AcrQuarantineWriterAzure built-in role

acr quarantine data writer

Role IDc8d4ff99-41c3-41a8-9f60-21dfdad59608
CategoryContainers
Actions2
Data actions2

Before you assign it

  • It reaches the data, not just the resource. It has 2 data actions, such as reading blobs, secrets or messages.

What it can do

PermissionWhat it allows
Microsoft.ContainerRegistry/registries/quarantine/readPull or Get quarantined images from container registry
Microsoft.ContainerRegistry/registries/quarantine/writeWrite/Modify quarantine state of quarantined images

Data actions

PermissionWhat it allows
Microsoft.ContainerRegistry/registries/quarantinedArtifacts/readAllows pull or get of the quarantined artifacts from container registry. This is similar to Microsoft.ContainerRegistry/registries/quarantine/read except that it is a data action
Microsoft.ContainerRegistry/registries/quarantinedArtifacts/writeAllows write or update of the quarantine state of quarantined artifacts. This is similar to Microsoft.ContainerRegistry/registries/quarantine/write action except that it is a data action

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "AcrQuarantineWriter" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "AcrQuarantineWriter" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'c8d4ff99-41c3-41a8-9f60-21dfdad59608')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c8d4ff99-41c3-41a8-9f60-21dfdad59608')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "c8d4ff99-41c3-41a8-9f60-21dfdad59608"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other containers roles

Find the smallest role for a task →