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-firewall-access-rules.md
+57-12Lines changed: 57 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,32 @@
1
1
---
2
2
title: Firewall access rules
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.
3
+
description: Configure rules to access an Azure container registry from behind a firewall, by allowing access to ("whitelisting") REST API and data endpoint domain names or service-specific IP address ranges.
4
4
ms.topic: article
5
-
ms.date: 02/11/2020
5
+
ms.date: 05/07/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, see [Configure Azure Private Link for an Azure container registry](container-registry-private-link.md).
13
13
14
14
## About registry endpoints
15
15
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.
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. For clients that access a registry from behind a firewall, you need to configure access rules for both 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. 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
+
***Storage (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 the data endpoint in a specific region or in multiple replicated regions.
23
23
24
-
## Allow access to REST and storage domain names
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`
24
+
## Allow access to REST and data endpoints
28
25
26
+
***REST endpoint** - Allow access to the fully qualified registry login server name, `<registry-name>.azurecr.io`, or an associated IP address range
27
+
***Storage (data) endpoint** - Allow access to all Azure blob storage accounts using the wildcard `*.blob.core.windows.net`, or an associated IP address range.
28
+
> [!NOTE]
29
+
> Azure Container Registry is introducing [dedicated data endpoints](#enable-dedicated-data-endpoints-preview) (preview), allowing you to tightly scope client firewall rules for your registry storage. Optionally enable data endpoints in all regions where the registry is located or replicated, using the form `<registry-name>.<region>.data.azurecr.io`.
29
30
30
31
## Allow access by IP address range
31
32
@@ -34,7 +35,7 @@ If your organization has policies to allow access only to specific IP addresses
34
35
To find the ACR REST endpoint IP ranges for which you need to allow access, search for **AzureContainerRegistry** in the JSON file.
35
36
36
37
> [!IMPORTANT]
37
-
> IP address ranges for Azure services can change, and updates are published weekly. Download the JSON file regularly, and make necessary updates in your access rules. If your scenario involves configuring network security group rules in an Azure virtual network to access Azure Container Registry, use the **AzureContainerRegistry**[service tag](#allow-access-by-service-tag) instead.
38
+
> IP address ranges for Azure services can change, and updates are published weekly. Download the JSON file regularly, and make necessary updates in your access rules. If your scenario involves configuring network security group rules in an Azure virtual network or you use Azure Firewall, use the **AzureContainerRegistry**[service tag](#allow-access-by-service-tag) instead.
38
39
>
39
40
40
41
### REST IP addresses for all regions
@@ -111,6 +112,45 @@ In an Azure virtual network, use network security rules to filter traffic from a
111
112
112
113
For example, create an outbound network security group rule with destination **AzureContainerRegistry** to allow traffic to an Azure container registry. To allow access to the service tag only in a specific region, specify the region in the following format: **AzureContainerRegistry**.[*region name*].
113
114
115
+
## Enable dedicated data endpoints (preview)
116
+
117
+
> [!WARNING]
118
+
> 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 ensure 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.
119
+
120
+
Dedicated data endpoints is an optional feature of the **Premium** container registry service tier. For information about registry service tiers and limits, see [Azure Container Registry Tiers](container-registry-skus.md). 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).
121
+
122
+
The following [az acr update][az-acr-update] command enables dedicated data endpoints on a registry *myregistry*. For demonstration purpose, assume that the registry is replicated in two regions:
123
+
124
+
```azurecli
125
+
az acr update --name myregistry --data-endpoint-enabled
126
+
```
127
+
128
+
The data endpoints use a regional pattern, `<registry-name>.<region>.data.azurecr.io`. To view the data endpoints, use the [az acr show-endpoints][az-acr-show-endpoints] command:
129
+
130
+
```azurecli
131
+
az acr show-endpoints --name myregistry
132
+
```
133
+
134
+
Output:
135
+
136
+
```
137
+
{
138
+
"loginServer": "myregistry.azurecr.io",
139
+
"dataEndpoints": [
140
+
{
141
+
"region": "eastus",
142
+
"endpoint": "myregistry.eastus.data.azurecr.io",
143
+
},
144
+
{
145
+
"region": "westus",
146
+
"endpoint": "myregistry.westus.data.azurecr.io",
147
+
}
148
+
]
149
+
}
150
+
```
151
+
152
+
After you set up dedicated data endpoints for your registry, you can enable client firewall access rules for the data endpoints. Enable data endpoint access rules for all required registry regions.
153
+
114
154
## Configure client firewall rules for MCR
115
155
116
156
If you need to access Microsoft Container Registry (MCR) from behind a firewall, see the guidance to configure [MCR client firewall rules](https://github.com/microsoft/containerregistry/blob/master/client-firewall-rules.md). MCR is the primary registry for all Microsoft-published docker images, such as Windows Server images.
@@ -121,6 +161,8 @@ If you need to access Microsoft Container Registry (MCR) from behind a firewall,
121
161
122
162
* Learn more about [security groups](/azure/virtual-network/security-overview) in an Azure virtual network
123
163
164
+
* Learn more about [dedicated data endpoints](https://azure.microsoft.com/blog/azure-container-registry-mitigating-data-exfiltration-with-dedicated-data-endpoints/) for Azure Container Registry
165
+
124
166
125
167
126
168
<!-- IMAGES -->
@@ -129,3 +171,6 @@ If you need to access Microsoft Container Registry (MCR) from behind a firewall,
0 commit comments