|
2 | 2 | title: Firewall access rules
|
3 | 3 | description: Configure rules to access an Azure container registry from behind a firewall, by allowing access to ("whitelisting") REST API and storage endpoint domain names or service-specific IP address ranges.
|
4 | 4 | ms.topic: article
|
5 |
| -ms.date: 02/11/2020 |
| 5 | +ms.date: 04/28/2020 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Configure rules to access an Azure container registry behind a firewall
|
9 | 9 |
|
10 | 10 | This article explains how to configure rules on your firewall to allow access to an Azure container registry. For example, an Azure IoT Edge device behind a firewall or proxy server might need to access a container registry to pull a container image. Or, a locked-down server in an on-premises network might need access to push an image.
|
11 | 11 |
|
12 |
| -If instead you want to configure inbound network access rules on a container registry only within an Azure virtual network or from a public IP address range, see [Restrict access to an Azure container registry from a virtual network](container-registry-vnet.md). |
| 12 | +If instead you want to configure inbound network access to a container registry only within an Azure virtual network or from a public IP address range, see [Configure Azure Private Link for an Azure container registry](container-registry-private-link.md) or [Restrict access to an Azure container registry from a virtual network](container-registry-vnet.md). |
13 | 13 |
|
14 | 14 | ## About registry endpoints
|
15 | 15 |
|
16 | 16 | To pull or push images or other artifacts to an Azure container registry, a client such as a Docker daemon needs to interact over HTTPS with two distinct endpoints.
|
17 | 17 |
|
18 |
| -* **Registry REST API endpoint** - Authentication and registry management operations are handled through the registry's public REST API endpoint. This endpoint is the login server name of the registry, or an associated IP address range. |
| 18 | +* **Registry REST API endpoint** - Authentication and registry management operations are handled through the registry's public REST API endpoint. This endpoint is the login server name of the registry, or an associated IP address range. Example: `myregistry.azurecr.io` |
19 | 19 |
|
20 |
| -* **Storage endpoint** - Azure [allocates blob storage](container-registry-storage.md) in Azure Storage accounts on behalf of each registry to manage the data for container images and other artifacts. When a client accesses image layers in an Azure container registry, it makes requests using a storage account endpoint provided by the registry. |
| 20 | +* **Data endpoint** - Azure [allocates blob storage](container-registry-storage.md) in Azure Storage accounts on behalf of each registry to manage the data for container images and other artifacts. When a client accesses image layers in an Azure container registry, it makes requests using a storage account endpoint provided by the registry. |
21 | 21 |
|
22 |
| -If your registry is [geo-replicated](container-registry-geo-replication.md), a client might need to interact with REST and storage endpoints in a specific region or in multiple replicated regions. |
| 22 | +If your registry is [geo-replicated](container-registry-geo-replication.md), a client might need to interact with data endpoints in a specific region or in multiple replicated regions. |
23 | 23 |
|
24 |
| -## Allow access to REST and storage domain names |
| 24 | +## Allow access to REST and data endpoints |
25 | 25 |
|
26 |
| -* **REST endpoint** - Allow access to the fully qualified registry login server name, such as `myregistry.azurecr.io` |
27 |
| -* **Storage (data) endpoint** - Allow access to all Azure blob storage accounts using the wildcard `*.blob.core.windows.net` |
| 26 | +* **REST endpoint** - Allow access to the fully qualified registry login server name, such as `myregistry.azurecr.io` |
| 27 | +* **Storage (data) endpoint** - Allow access to all Azure blob storage accounts using the wildcard `*.blob.core.windows.net`. More securely, enable access to a [dedicated data endpoint](#configure-dedicated-data-endpoints-(preview)) (preview) in each region where the registry is replicated, such as `myregistry.westeurope.azurecr.io`. |
28 | 28 |
|
| 29 | +## Configure dedicated data endpoints (preview) |
| 30 | + |
| 31 | +> [!WARNING] |
| 32 | +> If you previously configured client firewall access to the existing `*.blob.core.windows.net` endpoints, switching to dedicated data endpoints will impact client connectivity, causing pull failures. To assure clients have consistent access, add the new data endpoint rules to the client firewall rules. Once completed, enable dedicated data endpoints for your registries using the Azure CLI or other tools. |
| 33 | +
|
| 34 | +### Enable data endpoint |
| 35 | + |
| 36 | +To enable data endpoints using the Azure CLI, use Azure CLI version 2.4.0 or higher. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli). |
| 37 | + |
| 38 | +The following [az acr update][az-acr-update] command enables data endpoints on a registry *myregistry* that's replicated in two regions: |
| 39 | + |
| 40 | +```azurecli |
| 41 | +az acr update --name myregistry --data-endpoint-enabled |
| 42 | +``` |
| 43 | + |
| 44 | +To view the data endpoints, including regional endpoints for geo-replicated registries, use the [az acr show-endpoints][az-acr-show-endpoints] command: |
| 45 | + |
| 46 | +```azurecli |
| 47 | +az acr show-endpoints --name myregistry |
| 48 | +``` |
| 49 | + |
| 50 | +Output: |
| 51 | + |
| 52 | +``` |
| 53 | +{ |
| 54 | + "loginServer": "myregistry.azurecr.io", |
| 55 | + "dataEndpoints": [ |
| 56 | + { |
| 57 | + "region": "eastus", |
| 58 | + "endpoint": "myregistry.eastus.data.azurecr.io", |
| 59 | + }, |
| 60 | + { |
| 61 | + "region": "westus", |
| 62 | + "endpoint": "myregistry.westus.data.azurecr.io", |
| 63 | + } |
| 64 | + ] |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +After you set up dedicated data endpoints for your registry, your client firewall access rules for the endpoints are enabled. |
29 | 69 |
|
30 | 70 | ## Allow access by IP address range
|
31 | 71 |
|
@@ -129,3 +169,6 @@ If you need to access Microsoft Container Registry (MCR) from behind a firewall,
|
129 | 169 |
|
130 | 170 | <!-- LINKS - Internal -->
|
131 | 171 |
|
| 172 | +[az-acr-update]: /cli/azure/acr#az-acr-update |
| 173 | +[az-acr-show-endpoints]: /cli/azure/acr#az-acr-show-endpoints |
| 174 | + |
0 commit comments