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/api-management/using-network-security-perimeter.md
+35-11Lines changed: 35 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,22 @@ ai-usage: ai-assisted
11
11
12
12
# How to front a network security perimeter-protected Azure resource with Azure API Management
13
13
14
-
This article shows how to secure an Azure service resource with a network security perimeter and access it through Azure API Management. You'll configure an Azure Storage account with a network security perimeter to allow traffic from your subscription (containing the API Management instance), use API Management's managed identity to authenticate to Azure Storage, and verify access with the API Management test console.
14
+
This article shows how to secure an Azure service resource with an Azure [network security perimeter](/azure/private-link/network-security-perimeter-concepts) and access it through Azure API Management.
15
+
16
+
You'll configure an Azure Storage account with a network security perimeter to allow traffic from your subscription (containing the API Management instance), use API Management's managed identity to authenticate to Azure Storage, and verify access with the API Management test console. Trusted service connectivity and public access to the storage account will be disabled.
15
17
16
-
For background concepts and terminology, see [What is a network security perimeter?](/azure/private-link/network-security-perimeter-concepts)
17
18
18
19
## Why use a network security perimeter with API Management?
19
20
20
-
Beginning March 2026, [API Management is retiring trusted service connectivity](breaking-changes/trusted-service-connectivity-retirement-march-2026.md) from the gateway to select backend Azure services. If those backends such as Azure storage accounts rely on trusted Microsoft services or resource instances for network access, you must migrate. A network security perimeter provides the supported, centralized perimeter to explicitly allow traffic while keeping public access disabled.
21
+
A network security perimeter provides a supported, centralized perimeter to explicitly allow traffic while keeping public access disabled. It provides:
21
22
22
23
-**Modern token trust model:** Managed identity tokens now include trust mode claims that no longer permit implicit network bypass. A network security perimeter establishes the explicit network path your backend requires.
23
24
-**Centralized governance:** A network security perimeter consolidates per‑service network rules into a single perimeter, improving consistency and observability across protected resources.
24
25
-**Works without a virtual network:** For API Management instances not isolated with a virtual network, network security perimeter enables secure access by subscription or IP range. If virtual network isolation is available and preferred, you can continue to use that approach.
25
26
27
+
> [!NOTE]
28
+
> Beginning March 2026, [API Management is retiring trusted service connectivity](breaking-changes/trusted-service-connectivity-retirement-march-2026.md) from the gateway to select backend Azure services. If those backends such as Azure storage accounts rely on trusted Microsoft services or resource instances for network access, you must migrate. A network security perimeter provides the supported, centralized perimeter to explicitly allow traffic while keeping public access disabled.
29
+
26
30
## Prerequisites
27
31
28
32
- An Azure subscription and Owner or Contributor permissions.
@@ -35,6 +39,8 @@ Beginning March 2026, [API Management is retiring trusted service connectivity](
35
39
36
40
1. Configure API Management to call Azure Storage using a managed identity.
37
41
42
+
1. Block public network access to the storage account.
43
+
38
44
1. Create a network security perimeter profile and associate the storage account.
39
45
40
46
1. Add an inbound access rule to allow API Management traffic.
@@ -103,21 +109,40 @@ Expected results:
103
109
- The call succeeds with a `200 OK` response and returns the blob content.
104
110
- If you enabled **Trace**, you can verify that API Management added the managed identity token to the Authorization header.
105
111
106
-
> [!TIP]
107
-
> If you disable public network access on the storage account before configuring the network security perimeter, the call fails with a `403 Forbidden` response.
112
+
## Step 2. Block public network access to the storage account
113
+
114
+
If you now block public network access to the storage account, the API call from API Management fails because trusted service connectivity is disabled.
115
+
116
+
1. In the Azure portal, go to your storage account.
117
+
1. In the left menu, under **Security + networking**, select **Networking**.
118
+
1. On the **Public access** tab, select **Manage**. **Disable** public network access.
119
+
1. Select **Save**.
120
+
121
+
### Test the API operation
108
122
109
-
## Step 2. Create a network security perimeter profile and associate the storage account
123
+
Test that the API operation can no longer reach the storage account.
124
+
125
+
1. In the Azure portal, go to your API Management instance.
126
+
1. In the left menu, under **APIs**, select your API and operation.
127
+
1. Select the **Test** tab.
128
+
1. Select **Test** and call the operation. Optionally select **Trace** to capture detailed telemetry.
129
+
130
+
Expected result:
131
+
- The call fails with a `403 Forbidden` response.
132
+
133
+
134
+
## Step 3. Create a network security perimeter profile and associate the storage account
110
135
111
136
1. In the Azure portal, search for **Network Security Perimeters** and select it.
112
137
1. Select **+ Create** and provide a name and region. Accept the defaults for other settings.
113
138
1. Select **Review + create** and then **Create**.
114
139
1. After deployment, configure the network security perimeter profile:
115
140
1. In the left menu, select **Settings** > **Associated resources** > **+ Add** > **Associate resources with an existing profile**.
116
141
1. Select the profile you created. Select **+ Add**.
117
-
1. Select the storage account that the API Management gateway is accessing.
142
+
1. Select the storage account that you want to secure, but still allow the API Management gateway to access.
118
143
1. Select **Associate**.
119
144
120
-
## Step 3. Add an inbound access rule to allow API Management traffic
145
+
## Step 4. Add an inbound access rule to allow API Management traffic
121
146
122
147
To allow API Management to reach the storage account through the perimeter, add an inbound rule. The simplest approach is by Azure subscription.
123
148
@@ -129,19 +154,18 @@ To allow API Management to reach the storage account through the perimeter, add
129
154
1. Select **Add**.
130
155
131
156
> [!NOTE]
132
-
> If you select IP address-based control, specify API Management's outbound public IP address range in the inbound rule. Ensure you include all outbound IP addresses for your API Management instance.
157
+
> If you select IP address-based control, specify API Management's outbound public IP address range in the inbound rule. Ensure you include all outbound [IP addresses](api-management-howto-ip-addresses.md) for your API Management instance.
133
158
>
134
159
135
160
### Confirm the network configuration in the storage account
136
161
137
162
1. In the Azure portal, go to your storage account.
138
163
1. In the left menu, under **Security + networking**, select **Networking**.
139
-
1. On the **Public access** tab, select **Manage**. **Disable** public network access.
140
164
1. Under **Network security perimeter**, confirm that the storage account is associated with your network security perimeter profile and that the access rule is listed.
141
165
142
166
:::image type="content" source="media/using-network-security-perimeter/public-access-settings.png" alt-text="Screenshot of public access settings in the storage account in the portal.":::
143
167
144
-
## Step 4. Test access from API Management
168
+
## Step 5. Test access from API Management
145
169
146
170
Test that the API operation can reach the storage account in the network security perimeter.
0 commit comments