You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-repository-scoped-permissions.md
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,10 @@ Scenarios for creating a token include:
21
21
22
22
This feature is available in the **Premium** container registry service tier. For information about registry service tiers and limits, see [Azure Container Registry service tiers](container-registry-skus.md).
23
23
24
-
> [!IMPORTANT]
25
-
> This feature is currently in preview, and some [limitations apply](#preview-limitations). Previews are made available to you on the condition that you agree to the [supplemental terms of use][terms-of-use]. Some aspects of this feature may change prior to general availability (GA).
26
-
27
-
## Preview limitations
24
+
## Limitations
28
25
29
26
* You can't currently assign repository-scoped permissions to an Azure Active Directory identity, such as a service principal or managed identity.
30
-
* You can't create a scope map in a registry enabled for [anonymous pull access](container-registry-faq.yml#how-do-i-enable-anonymous-pull-access-).
27
+
31
28
32
29
## Concepts
33
30
@@ -60,7 +57,7 @@ The following image shows the relationship between tokens and scope maps.
60
57
61
58
## Prerequisites
62
59
63
-
***Azure CLI** - Azure CLI commands command examples in this article require Azure CLI version 2.17.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
60
+
***Azure CLI** - Azure CLI command examples in this article require Azure CLI version 2.17.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
64
61
***Docker** - To authenticate with the registry to pull or push images, you need a local Docker installation. Docker provides installation instructions for [macOS](https://docs.docker.com/docker-for-mac/), [Windows](https://docs.docker.com/docker-for-windows/), and [Linux](https://docs.docker.com/engine/installation/#supported-platforms) systems.
65
62
***Container registry** - If you don't have one, create a Premium container registry in your Azure subscription, or upgrade an existing registry. For example, use the [Azure portal](container-registry-get-started-portal.md) or the [Azure CLI](container-registry-get-started-azure-cli.md).
66
63
@@ -150,7 +147,7 @@ You can use the Azure portal to create tokens and scope maps. As with the `az ac
150
147
The following example creates a token, and creates a scope map with the following permissions on the `samples/hello-world` repository: `content/write` and `content/read`.
151
148
152
149
1. In the portal, navigate to your container registry.
153
-
1. Under **Repository permissions**, select **Tokens (Preview) > +Add**.
150
+
1. Under **Repository permissions**, select **Tokens > +Add**.
154
151
155
152
:::image type="content" source="media/container-registry-repository-scoped-permissions/portal-token-add.png" alt-text="Create token in portal":::
156
153
1. Enter a token name.
@@ -171,7 +168,7 @@ After the token is validated and created, token details appear in the **Tokens**
171
168
To use a token created in the portal, you must generate a password. You can generate one or two passwords, and set an expiration date for each one. New passwords created for tokens are available immediately. Regenerating new passwords for tokens will take 60 seconds to replicate and be available.
172
169
173
170
1. In the portal, navigate to your container registry.
174
-
1. Under **Repository permissions**, select **Tokens (Preview)**, and select a token.
171
+
1. Under **Repository permissions**, select **Tokens**, and select a token.
175
172
1. In the token details, select **password1** or **password2**, and select the Generate icon.
176
173
1. In the password screen, optionally set an expiration date for the password, and select **Generate**. It's recommended to set an expiration date.
177
174
1. After generating a password, copy and save it to a safe location. You can't retrieve a generated password after closing the screen, but you can generate a new one.
@@ -259,7 +256,7 @@ az acr scope-map update \
259
256
In the Azure portal:
260
257
261
258
1. Navigate to your container registry.
262
-
1. Under **Repository permissions**, select **Scope maps (Preview)**, and select the scope map to update.
259
+
1. Under **Repository permissions**, select **Scope maps**, and select the scope map to update.
263
260
1. Under **Repositories**, enter `samples/nginx`, and under **Permissions**, select `content/read` and `content/write`. Then select **+Add**.
264
261
1. Under **Repositories**, select `samples/hello-world` and under **Permissions**, deselect `content/write`. Then select **Save**.
265
262
@@ -341,7 +338,7 @@ Sample output:
341
338
342
339
### List scope maps
343
340
344
-
Use the [az acr scope-map list][az-acr-scope-map-list] command, or the **Scope maps (Preview)** screen in the portal, to list all the scope maps configured in a registry. For example:
341
+
Use the [az acr scope-map list][az-acr-scope-map-list] command, or the **Scope maps** screen in the portal, to list all the scope maps configured in a registry. For example:
To view the details of a token, such as its status and password expiration dates, run the [az acr token show][az-acr-token-show] command, or select the token in the **Tokens (Preview)** screen in the portal. For example:
361
+
To view the details of a token, such as its status and password expiration dates, run the [az acr token show][az-acr-token-show] command, or select the token in the **Tokens** screen in the portal. For example:
365
362
366
363
```azurecli
367
364
az acr scope-map show \
368
365
--name MyScopeMap --registry myregistry
369
366
```
370
367
371
-
Use the [az acr token list][az-acr-token-list] command, or the **Tokens (Preview)** screen in the portal, to list all the tokens configured in a registry. For example:
368
+
Use the [az acr token list][az-acr-token-list] command, or the **Tokens** screen in the portal, to list all the tokens configured in a registry. For example:
372
369
373
370
```azurecli
374
371
az acr token list --registry myregistry --output table
375
372
```
376
373
377
374
### Regenerate token passwords
378
375
379
-
If you didn't generate a token password, or you want to generate new passwords, run the [az acr token credential generate][az-acr-token-credential-generate] command.Regenerating new passwords for tokens will take 60 seconds to replicate and be available.
376
+
If you didn't generate a token password, or you want to generate new passwords, run the [az acr token credential generate][az-acr-token-credential-generate] command.Regenerating new passwords for tokens will take 60 seconds to replicate and be available.
380
377
381
378
The following example generates a new value for password1 for the *MyToken* token, with an expiration period of 30 days. It stores the password in the environment variable `TOKEN_PWD`. This example is formatted for the bash shell.
In the portal, on the **Tokens (preview)** screen, select the token, and under **Scope map**, select a different scope map.
397
+
In the portal, on the **Tokens** screen, select the token, and under **Scope map**, select a different scope map.
401
398
402
399
> [!TIP]
403
400
> After updating a token with a new scope map, you might want to generate new token passwords. Use the [az acr token credential generate][az-acr-token-credential-generate] command or regenerate a token password in the Azure portal.
0 commit comments