Container Registry Data Importer and Data ReaderAzure built-in role
Provides the ability to import images into a registry through the registry import operation. Provides the ability to list repositories, view images and tags, get manifests, and pull images. Does not provide permissions for importing images through configuring registry transfer pipelines such as import and export pipelines. Does not provide permissions for importing through configuring Artifact Cache or Sync rules.
Medium risk. It can create, change or delete some resources in scope.
In short: Container Registry Data Importer and Data Reader is an Azure built-in role with 3 actions and 3 data actions.
| Role ID | 577a9874-89fd-4f24-9dbd-b5034d0ad23a |
|---|---|
| Category | Containers |
| Actions | 3 |
| Data actions | 3 |
Before you assign it
- It reaches the data, not just the resource. It has 3 data actions, such as reading blobs, secrets or messages.
What it can do
| Permission | What it allows |
|---|---|
Microsoft.ContainerRegistry/registries/importImage/action | Import Image to container registry with the specified parameters. |
Microsoft.ContainerRegistry/registries/read | Gets the properties of the specified container registry or lists all the container registries under the specified resource group or subscription. |
Microsoft.ContainerRegistry/registries/pull/read | Pull or Get images from a container registry. |
Data actions
| Permission | What it allows |
|---|---|
Microsoft.ContainerRegistry/registries/repositories/content/read | Pull or Get images from a container registry. |
Microsoft.ContainerRegistry/registries/repositories/metadata/read | Gets the metadata of a specific repository for a container registry |
Microsoft.ContainerRegistry/registries/catalog/read | List repositories in a container registry. |
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 "Container Registry Data Importer and Data Reader" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Container Registry Data Importer and Data Reader" `
-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, '577a9874-89fd-4f24-9dbd-b5034d0ad23a')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '577a9874-89fd-4f24-9dbd-b5034d0ad23a')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "577a9874-89fd-4f24-9dbd-b5034d0ad23a"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other containers roles
- AcrDelete · 1 permission
- AcrPull · 1 permission
- Connected Cluster Managed Identity CheckAccess Reader · 1 permission
- Container Registry Cache Rule Reader · 1 permission
- Container Registry Credential Set Reader · 1 permission
- Container Registry Repository Catalog Lister · 1 permission
- AcrImageSigner · 2 permissions
- AcrPush · 2 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/container-registry-data-importer-and-data-reader/">Container Registry Data Importer and Data Reader Azure role explained</a>Spotted something out of date or wrong? Tell us and we'll fix it.