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/ai-services/openai/how-to/network-security-perimeter.md
+77-36Lines changed: 77 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,7 @@ ms.service: azure-ai-openai
13
13
14
14
> [!IMPORTANT]
15
15
> Azure OpenAI service support for network security perimeter is in public preview under supplemental terms of use. It's available in regions providing the feature. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
16
-
17
-
Review the limitations and considerations section before you start.
16
+
> Review the limitations and considerations section before you start.
18
17
19
18
## Overview
20
19
This article explains how to join an Azure OpenAI service to a network security perimeter to control network access to your Azure OpenAI account. By joining a network security perimeter, you can:
@@ -25,22 +24,26 @@ This article explains how to join an Azure OpenAI service to a network security
25
24
You can add an Azure OpenAI service to a network security perimeter in the Azure portal, as described in this article. Alternatively, you can use the Azure Virtual Network Manager REST API to join a service, and use the Management REST APIs to view and synchronize the configuration settings.
26
25
27
26
## Limitations and considerations
28
-
Azure OpenAI customer-managed keys might not behave as expected. The Azure OpenAI resources in the Azure subscription might not be able to use the fine-tune API or assistants API.
27
+
* Azure OpenAI customer-managed keys might not behave as expected. The Azure OpenAI resources in the Azure subscription might not be able to use the fine-tune API or assistants API.
28
+
29
+
* Network security perimeter controls only data plane operations within Azure OpenAI, not control plane operations. For example, users can deploy a model within their Azure OpenAI resource secured by the perimeter, but cannot use finetune models, upload files, or start a session in the Chat Playground. In these data plane scenarios, an error message will show that access is blocked by the Network Security Perimeter, as expected.
30
+
31
+
* For an Azure OpenAI service within a network security perimeter, the resource must use a system or user-assigned managed identity and have a role assignment that permits read-access to data sources.
29
32
30
33
## Prerequisites
31
34
32
35
> [!CAUTION]
33
36
> Make sure you fully understand the limitations and impact to your Azure Subscription listed in the previous section before registering the preview feature.
34
37
35
-
First step, contact your Microsoft rep to allowlist your Azure subscription with the following feature flags:
38
+
1. Contact your Microsoft rep to allowlist your Azure subscription with the following feature flags:
36
39
37
40
|Namespace |Feature name | Description |
38
41
|---------|---------|
39
42
|`Microsoft.CognitiveServices`|`OpenAI.NspPreview`| Allow your Azure subscription to add Azure OpenAI resource into NSP.|
40
43
41
44
To check if the feature flags are allowlisted, use command `az feature registration list`.
42
45
43
-
Second, register the Network Security Perimeter feature from the Azure portal Preview features. The feature name is `AllowNSPInPublicPreview`. After registration, wait for 2 hours to take effect.
46
+
2. Register the Network Security Perimeter feature from the Azure portal Preview features. The feature name is `AllowNSPInPublicPreview`. After registration, wait for 2 hours to take effect.
44
47
45
48
### Configure managed identity on your Azure OpenAI account
46
49
To allow your Storage account to recognize your Azure OpenAI service via Microsoft Entra ID authentication, you need to enable the managed identity for your Azure OpenAI service. The easiest way is to toggle on system assigned managed identity on Azure portal. The required role for your Storage account is “Storage Blob Data Contributor.” Ensure the role is assigned to your Storage account from your Azure OpenAI account.
@@ -51,11 +54,20 @@ Azure Network Security Perimeter allows administrators to define a logical netwo
51
54
You can add Azure OpenAI to a network security perimeter so that all indexing and query requests occur within the security boundary.
52
55
53
56
1. In the Azure portal, find the network security perimeter service for your subscription.
54
-
1. Select **Resources** from the left-hand menu.
55
-
1. Select **Add** > **Associate** resources with an existing profile.
56
-
1. Select the profile you created when you created the network security perimeter for Profile.
57
-
1. Select Associate, and then select the Azure OpenAI service you created.
58
-
1. Select Associate in the bottom left-hand section of the screen to create the association.
57
+
2. Select **Resources** from the left-hand menu.
58
+
59
+
[Image 1]
60
+
61
+
3. Select **Add** > **Associate** resources with an existing profile.
62
+
63
+
[Image 2]
64
+
65
+
4. Select the profile you created when you created the network security perimeter for Profile.
66
+
5. Select Associate, and then select the Azure OpenAI service you created.
67
+
68
+
[Image 3]
69
+
70
+
6. Select Associate in the bottom left-hand section of the screen to create the association.
59
71
60
72
### Network security perimeter access modes
61
73
Network security perimeter supports two different access modes for associated resources:
@@ -74,17 +86,31 @@ The `publicNetworkAccess` setting determines the Azure OpenAI services associati
74
86
### Change the network security perimeter access mode
75
87
1. Navigate to your network security perimeter resource in the Azure portal.
76
88
2. Select **Resources** in the left-hand menu.
89
+
90
+
[Image 4]
91
+
77
92
3. Find your Azure OpenAI service in the table.
78
93
4. Select the three dots in the far right of the Azure OpenAI service row. Select Change access mode in the popup.
94
+
95
+
[Image 5]
96
+
79
97
5. Select the desired access mode and select Apply.
80
98
99
+
[Image 6]
100
+
81
101
## Enable logging network access
82
102
1. Navigate to your network security perimeter resource in the Azure portal.
83
103
2. Select **Diagnostic settings** in the left-hand menu.
104
+
105
+
[Image 7]
106
+
84
107
3. Select **Add diagnostic setting**.
85
108
4. Enter any name such as "diagnostic" for Diagnostic setting name.
86
109
5. Under Logs, select `allLogs`. `allLogs` ensures all inbound and outbound network access to resources in your network security perimeter is logged.
87
110
6. Under Destination details, select Archive to a storage account or Send to Log Analytics workspace. The storage account must be in the same region as the network security perimeter. You can either use an existing storage account or create a new one. A Log Analytics workspace can be in a different region than the one used by the network security perimeter. You can also select any of the other applicable destinations.
111
+
112
+
[Image 8]
113
+
88
114
7. Select Save to create the diagnostic setting and start logging network access.
89
115
90
116
### Reading network access logs
@@ -102,14 +128,6 @@ Here's an example of the `network-security-perimeterPublicInboundResourceRulesAl
102
128
| SourceIPAddress | Source IP of the inbound network access, if applicable |`1.1.1.1`|
103
129
| AccessRuleVersion | Version of the network-security-perimeter access rules used to enforce the network access rules | 0 |
104
130
105
-
#### Storage Account
106
-
The storage account has containers for every log category (for example `insights-logs-network-security-perimeterpublicinboundperimeterrulesallowed`). The folder structure inside the container matches the resource ID of the network security perimeter and the time the logs were taken. Each line on the JSON log file contains a record of the network security perimeter network access that matches the log category.
107
-
108
-
For example, the inbound perimeter rules allowed category log uses the following format:
109
-
```json
110
-
TBD
111
-
```
112
-
113
131
## Add an access rule for your Azure OpenAI service
114
132
115
133
A network security perimeter profile specifies rules that allow or deny access through the perimeter.
@@ -133,23 +151,33 @@ Inbound access rules can allow the internet and resources outside the perimeter
133
151
To add an inbound access rule in the Azure portal:
134
152
135
153
1. Navigate to your network security perimeter resource in the Azure portal.
136
-
1. Select **Profiles** in the left-hand menu.
154
+
2. Select **Profiles** in the left-hand menu.
155
+
156
+
[Image 9]
157
+
158
+
3. Select the profile you're using with your network security perimeter.
137
159
138
-
1. Select the profile you're using with your network security perimeter.
160
+
[Image 10]
139
161
140
-
1. Select **Inbound access rules** in the left-hand menu.
162
+
4. Select **Inbound access rules** in the left-hand menu.
141
163
142
-
1. Select **Add**.
164
+
[Image 11]
143
165
144
-
1. Enter or select the following values:
166
+
5. Select **Add**.
167
+
168
+
[Image 12]
169
+
170
+
6. Enter or select the following values:
145
171
146
172
| Setting | Value |
147
173
|---------|-------|
148
174
| Rule name | The name for the inbound access rule (for example, `MyInboundAccessRule`). |
149
175
| Source Type | Valid values are IP address ranges or subscriptions. |
150
176
| Allowed Sources | If you selected IP address ranges, enter the IP address range in a CIDR format that you want to allow inbound access from. Azure IP ranges are available at this link. If you selected **Subscriptions**, use the subscription you want to allow inbound access from. |
151
177
152
-
1. Select **Add** to create the inbound access rule.
178
+
7. Select **Add** to create the inbound access rule.
179
+
180
+
[Image 13]
153
181
154
182
### Add an outbound access rule
155
183
@@ -161,41 +189,54 @@ Network security perimeter supports outbound access rules based on the Fully Qua
161
189
162
190
To add an outbound access rule in the Azure portal:
163
191
164
-
Navigate to your network security perimeter resource in the Azure portal.
192
+
1. Navigate to your network security perimeter resource in the Azure portal.
193
+
2. Select **Profiles** in the left-hand menu.
165
194
166
-
1. Select **Profiles** in the left-hand menu.
167
-
1. Select the profile you're using with your network security perimeter.
168
-
1. Select **Outbound access rules** in the left-hand menu.
169
-
1. Select **Add**.
170
-
1. Enter or select the following values:
195
+
[Image 14]
196
+
197
+
3. Select the profile you're using with your network security perimeter.
198
+
199
+
[Image 15]
200
+
201
+
4. Select **Outbound access rules** in the left-hand menu.
202
+
203
+
[Image 16]
204
+
205
+
5. Select **Add**.
206
+
207
+
[Image 17]
208
+
209
+
6. Enter or select the following values:
171
210
172
211
| Setting | Value |
173
212
|---------|-------|
174
213
| Rule name | The name for the outbound access rule (for example, "MyOutboundAccessRule") |
175
214
| Destination Type | Leave as FQDN |
176
215
| Allowed Destinations | Enter a comma-separated list of FQDNs you want to allow outbound access to |
177
216
178
-
1. Select **Add** to create the outbound access rule.
217
+
7. Select **Add** to create the outbound access rule.
218
+
219
+
[Image 18]
179
220
180
221
## Test your connection through network security perimeter
181
222
182
223
To test your connection through network security perimeter, you need access to a web browser, either on a local computer with an internet connection or an Azure VM.
183
224
184
-
1. Change your network security perimeter association to [enforced mode](../../../search/search-security-network-security-perimeter.md#network-security-perimeter-access-modes) to start enforcing network security perimeter requirements for network access to your Azure OpenAI service.
225
+
1. Change your network security perimeter association to __enforced mode__ to start enforcing network security perimeter requirements for network access to your Azure OpenAI service.
185
226
186
-
1. Decide if you want to use a local computer or an Azure VM.
227
+
2. Decide if you want to use a local computer or an Azure VM.
187
228
188
229
1. If you're using a local computer, you need to know your public IP address.
189
230
190
231
1. If you're using an Azure virtual machine, you can either use a [private link](/azure/private-link/private-link-overview) or [check the IP address using the Azure portal](/azure/virtual-network/ip-services/virtual-network-network-interface-addresses).
191
232
192
-
1. Using the IP address, you can create an [inbound access rule](../../../search/search-security-network-security-perimeter.md#add-an-inbound-access-rule) for that IP address to allow access. You can skip this step if you're using private link.
233
+
3. Using the IP address, you can create an __inbound access rule__ for that IP address to allow access. You can skip this step if you're using private link.
193
234
194
-
1. Finally, try navigating to the Azure OpenAI service in the Azure portal. If you can view the indexes successfully, then the network security perimeter is configured correctly.
235
+
4. Finally, try navigating to the Azure OpenAI service in the Azure portal. If you can view the indexes successfully, then the network security perimeter is configured correctly.
195
236
196
237
## View and manage network security perimeter configuration
197
238
198
-
You can use the [Network Security Perimeter Configuration REST APIs](/rest/api/searchmanagement/network-security-perimeter-configurations?view=rest-searchmanagement-2024-06-01-preview&preserve-view=true) to review and reconcile perimeter configurations. **Be sure to use preview API version**`2024-06-01-preview`. See the [Azure AI Search documentation](../../../search/search-manage-rest.md) for information on how to call the Management REST APIs.
239
+
You can use the [Network Security Perimeter Configuration REST APIs](/rest/api/searchmanagement/network-security-perimeter-configurations?view=rest-searchmanagement-2024-06-01-preview&preserve-view=true) to review and reconcile perimeter configurations. **Be sure to use preview API version**`2024-10-01`.
0 commit comments