Skip to content

Commit 9dc1727

Browse files
authored
Revert "Azure OpenAI On Your Data - Search Trusted Service"
1 parent 9942241 commit 9dc1727

File tree

6 files changed

+42
-47
lines changed

6 files changed

+42
-47
lines changed

articles/ai-services/openai/how-to/use-your-data-securely.md

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ recommendations: false
1414

1515
# Securely use Azure OpenAI On Your Data
1616

17-
> [!NOTE]
18-
> As of June 2024, the application form for the Microsoft managed private endpoint to Azure AI Search is no longer needed.
19-
>
20-
> The managed private endpoint will be deleted from the Microsoft managed virtual network at July 2025. If you have already provisioned a managed private endpoint through the application process before June 2024, migrate to the [Azure AI Search trusted service](#enable-trusted-service-1) as early as possible to avoid service disruption.
21-
2217
Use this article to learn how to use Azure OpenAI On Your Data securely by protecting data and resources with Microsoft Entra ID role-based access control, virtual networks, and private endpoints.
2318

2419
This article is only applicable when using [Azure OpenAI On Your Data with text](/azure/ai-services/openai/concepts/use-your-data). It does not apply to [Azure OpenAI On Your Data with images](/azure/ai-services/openai/concepts/use-your-image-data).
@@ -33,12 +28,12 @@ When you use Azure OpenAI On Your Data to ingest data from Azure blob storage, l
3328
* Downloading URLs to your blob storage is not illustrated in this diagram. After web pages are downloaded from the internet and uploaded to blob storage, steps 3 onward are the same.
3429
* Two indexers, two indexes, two data sources and a [custom skill](/azure/search/cognitive-search-custom-skill-interface) are created in the Azure AI Search resource.
3530
* The chunks container is created in the blob storage.
36-
* If the schedule triggers the ingestion, the ingestion process starts from step 7.
31+
* If the ingestion is triggered by a [scheduled refresh](../concepts/use-your-data.md#schedule-automatic-index-refreshes), the ingestion process starts from step 7.
3732
* Azure OpenAI's `preprocessing-jobs` API implements the [Azure AI Search customer skill web API protocol](/azure/search/cognitive-search-custom-skill-web-api), and processes the documents in a queue.
3833
* Azure OpenAI:
3934
1. Internally uses the first indexer created earlier to crack the documents.
40-
1. Uses a heuristic-based algorithm to perform chunking. It honors table layouts and other formatting elements in the chunk boundary to ensure the best chunking quality.
41-
1. If you choose to enable vector search, Azure OpenAI uses the selected embedding setting to vectorize the chunks.
35+
1. Uses a heuristic-based algorithm to perform chunking, honoring table layouts and other formatting elements in the chunk boundary to ensure the best chunking quality.
36+
1. If you choose to enable vector search, Azure OpenAI uses the selected embedding deployment to vectorize the chunks internally.
4237
* When all the data that the service is monitoring are processed, Azure OpenAI triggers the second indexer.
4338
* The indexer stores the processed data into an Azure AI Search service.
4439

@@ -48,32 +43,32 @@ For the managed identities used in service calls, only system assigned managed i
4843

4944
:::image type="content" source="../media/use-your-data/inference-architecture.png" alt-text="A diagram showing the process of using the inference API." lightbox="../media/use-your-data/inference-architecture.png":::
5045

51-
When you send API calls to chat with an Azure OpenAI model on your data, the service needs to retrieve the index fields during inference to perform fields mapping. Therefore the service requires the Azure OpenAI identity to have the `Search Service Contributor` role for the search service even during inference.
46+
When you send API calls to chat with an Azure OpenAI model on your data, the service needs to retrieve the index fields during inference to perform fields mapping automatically if the fields mapping isn't explicitly set in the request. Therefore the service requires the Azure OpenAI identity to have the `Search Service Contributor` role for the search service even during inference.
5247

53-
If an embedding dependency is provided in the inference request, Azure OpenAI will vectorize the rewritten query, and both query and vector are sent to Azure AI Search for vector search.
48+
If an embedding deployment is provided in the inference request, the rewritten query will be vectorized by Azure OpenAI, and both query and vector are sent Azure AI Search for vector search.
5449

5550
## Document-level access control
5651

5752
> [!NOTE]
5853
> Document-level access control is supported for Azure AI search only.
5954
60-
Azure OpenAI On Your Data lets you restrict the documents that can be used in responses for different users with Azure AI Search [security filters](/azure/search/search-security-trimming-for-azure-search-with-aad). When you enable document level access, Azure AI Search will trim the search results based on user Microsoft Entra group membership specified in the filter. You can only enable document-level access on existing Azure AI Search indexes. To enable document-level access:
55+
Azure OpenAI On Your Data lets you restrict the documents that can be used in responses for different users with Azure AI Search [security filters](/azure/search/search-security-trimming-for-azure-search-with-aad). When you enable document level access, the search results returned from Azure AI Search and used to generate a response will be trimmed based on user Microsoft Entra group membership. You can only enable document-level access on existing Azure AI Search indexes. To enable document-level access:
6156

62-
1. To register your application and create users and groups, follow the steps in the [Azure AI Search documentation](/azure/search/search-security-trimming-for-azure-search-with-aad).
63-
1. [Index your documents with their permitted groups](/azure/search/search-security-trimming-for-azure-search-with-aad#index-document-with-their-permitted-groups). Be sure that your new [security fields](/azure/search/search-security-trimming-for-azure-search#create-security-field) have the schema:
57+
1. Follow the steps in the [Azure AI Search documentation](/azure/search/search-security-trimming-for-azure-search-with-aad) to register your application and create users and groups.
58+
1. [Index your documents with their permitted groups](/azure/search/search-security-trimming-for-azure-search-with-aad#index-document-with-their-permitted-groups). Be sure that your new [security fields](/azure/search/search-security-trimming-for-azure-search#create-security-field) have the schema below:
6459

6560
```json
6661
{"name": "group_ids", "type": "Collection(Edm.String)", "filterable": true }
6762
```
6863

6964
`group_ids` is the default field name. If you use a different field name like `my_group_ids`, you can map the field in [index field mapping](../concepts/use-your-data.md#index-field-mapping).
7065

71-
1. Make sure each sensitive document in the index has this security field value set to the permitted groups of the document.
72-
1. In [Azure OpenAI Studio](https://oai.azure.com/portal), add your data source. in the [index field mapping](../concepts/use-your-data.md#index-field-mapping) section, you can map zero or one value to the **permitted groups** field, as long as the schema is compatible. If the **permitted groups** field isn't mapped, document level access is disabled.
66+
1. Make sure each sensitive document in the index has the value set correctly on this security field to indicate the permitted groups of the document.
67+
1. In [Azure OpenAI Studio](https://oai.azure.com/portal), add your data source. in the [index field mapping](../concepts/use-your-data.md#index-field-mapping) section, you can map zero or one value to the **permitted groups** field, as long as the schema is compatible. If the **Permitted groups** field isn't mapped, document level access won't be enabled.
7368

7469
**Azure OpenAI Studio**
7570

76-
Once the Azure AI Search index is connected, your responses in the studio have document access based on the Microsoft Entra permissions of the logged in user.
71+
Once the Azure AI Search index is connected, your responses in the studio will have document access based on the Microsoft Entra permissions of the logged in user.
7772

7873
**Web app**
7974

@@ -110,10 +105,13 @@ When using the API, pass the `filter` parameter in each API request. For example
110105

111106
## Resource configuration
112107

113-
Use the following sections to configure your resources for optimal secure usage. Even if you plan to only secure part of your resources, you still need to follow all the steps.
108+
Use the following sections to configure your resources for optimal secure usage. Even if you plan to only secure part of your resources, you still need to follow all the steps below.
114109

115110
This article describes network settings related to disabling public network for Azure OpenAI resources, Azure AI search resources, and storage accounts. Using selected networks with IP rules is not supported, because the services' IP addresses are dynamic.
116111

112+
> [!TIP]
113+
> You can use the bash script available on [GitHub](https://github.com/microsoft/sample-app-aoai-chatGPT/blob/main/scripts/validate-oyd-vnet.sh) to validate your setup, and determine if all of the requirements listed here are being met.
114+
117115
## Create resource group
118116

119117
Create a resource group, so you can organize all the relevant resources. The resources in the resource group include but are not limited to:
@@ -129,18 +127,19 @@ Create a resource group, so you can organize all the relevant resources. The res
129127

130128
The virtual network has three subnets.
131129

132-
1. The first subnet is used for the virtual network gateway.
133-
1. The second subnet is used for the private endpoints for the three key services.
130+
1. The first subnet is used for the private IPs of the three private endpoints.
131+
1. The second subnet is created automatically when you create the virtual network gateway.
134132
1. The third subnet is empty, and used for Web App outbound virtual network integration.
135133

136134
:::image type="content" source="../media/use-your-data/virtual-network.png" alt-text="A diagram showing the virtual network architecture." lightbox="../media/use-your-data/virtual-network.png":::
137135

136+
Note the Microsoft managed virtual network is created by Microsoft, and you cannot see it. The Microsoft managed virtual network is used by Azure OpenAI to securely access your Azure AI Search.
138137

139138
## Configure Azure OpenAI
140139

141140
### Enabled custom subdomain
142141

143-
The [custom subdomain](/azure/ai-services/cognitive-services-custom-subdomains) is required for Microsoft Entra ID based authentication, and private DNS zone. If the Azure OpenAI resource is created using ARM template, the custom subdomain must be specified explicitly.
142+
If you created the Azure OpenAI via Azure portal, the [custom subdomain](/azure/ai-services/cognitive-services-custom-subdomains) should have been created already. The custom subdomain is required for Microsoft Entra ID based authentication, and private DNS zone.
144143

145144
### Enable managed identity
146145

@@ -180,7 +179,7 @@ To allow access to your Azure OpenAI service from your client machines, like usi
180179

181180
## Configure Azure AI Search
182181

183-
You can use basic pricing tier and higher for the search resource. It's not necessary, but if you use the S2 pricing tier, [advanced options](#create-shared-private-link) are available.
182+
You can use basic pricing tier and higher for the configuration below. It's not necessary, but if you use the S2 pricing tier you will see [additional options](#create-shared-private-link) available for selection.
184183

185184
### Enable managed identity
186185

@@ -189,44 +188,36 @@ To allow your other resources to recognize the Azure AI Search using Microsoft E
189188
:::image type="content" source="../media/use-your-data/outbound-managed-identity-ai-search.png" alt-text="A screenshot showing the managed identity setting for Azure AI Search in the Azure portal." lightbox="../media/use-your-data/outbound-managed-identity-ai-search.png":::
190189

191190
### Enable role-based access control
192-
As Azure OpenAI uses managed identity to access Azure AI Search, you need to enable role-based access control in your Azure AI Search. To do it on Azure portal, select **Both** or **Role-based access control** in the **Keys** tab in the Azure portal.
191+
As Azure OpenAI uses managed identity to access Azure AI Search, you need to enable role-based access control in your Azure AI Search. To do it on Azure portal, select **Both** in the **Keys** tab in the Azure portal.
193192

194193
:::image type="content" source="../media/use-your-data/managed-identity-ai-search.png" alt-text="A screenshot showing the managed identity option for Azure AI search in the Azure portal." lightbox="../media/use-your-data/managed-identity-ai-search.png":::
195194

196-
For more information, see the [Azure AI Search RBAC article](/azure/search/search-security-enable-roles).
195+
To enable role-based access control via the REST API, set `authOptions` as `aadOrApiKey`. For more information, see the [Azure AI Search RBAC article](/azure/search/search-security-rbac?tabs=config-svc-rest%2Croles-portal%2Ctest-portal%2Ccustom-role-portal%2Cdisable-keys-portal#configure-role-based-access-for-data-plane).
196+
197+
```json
198+
"disableLocalAuth": false,
199+
"authOptions": {
200+
"aadOrApiKey": {
201+
"aadAuthFailureMode": "http401WithBearerChallenge"
202+
}
203+
}
204+
```
197205

198206
### Disable public network access
199207

200208
You can disable public network access of your Azure AI Search resource in the Azure portal.
201209

202210
To allow access to your Azure AI Search resource from your client machines, like using Azure OpenAI Studio, you need to create [private endpoint connections](/azure/search/service-create-private-endpoint) that connect to your Azure AI Search resource.
203211

212+
> [!NOTE]
213+
> To allow access to your Azure AI Search resource from Azure OpenAI resource, you need to submit an [application form](https://aka.ms/applyacsvpnaoaioyd). The application will be reviewed in 5 business days and you will be contacted via email about the results. If you are eligible, we will provision the private endpoint in Microsoft managed virtual network, and send a private endpoint connection request to your search service, and you will need to approve the request.
204214
205-
### Enable trusted service
206-
207-
You can enable trusted service of your search resource from Azure portal.
208-
209-
Go to your search resource's network tab. With the public network access set to **disabled**, select **Allow Azure services on the trusted services list to access this search service.**
210-
211-
:::image type="content" source="../media/use-your-data/search-trusted-service.png" alt-text="A diagram showing the search trusted service." lightbox="../media/use-your-data/search-trusted-service.png":::
212-
213-
You can also use the REST API to enable trusted service. This example uses the Azure CLI and the `jq` tool.
214-
215-
```bash
216-
rid=/subscriptions/<YOUR-SUBSCRIPTION-ID>/resourceGroups/<YOUR-RESOURCE-GROUP>/providers/Microsoft.Search/searchServices/<YOUR-RESOURCE-NAME>
217-
apiVersion=2024-03-01-Preview
218-
#store the resource properties in a variable
219-
az rest --uri "https://management.azure.com$rid?api-version=$apiVersion" > search.json
215+
:::image type="content" source="../media/use-your-data/approve-private-endpoint.png" alt-text="A screenshot showing private endpoint approval screen." lightbox="../media/use-your-data/approve-private-endpoint.png":::
220216

221-
#replace bypass with AzureServices using jq
222-
jq '.properties.networkRuleSet.bypass = "AzureServices"' search.json > search_updated.json
217+
The private endpoint resource is provisioned in a Microsoft managed tenant, while the linked resource is in your tenant. You can't access the private endpoint resource by just clicking the **private endpoint** link (in blue font) in the **Private access** tab of the **Networking page**. Instead, click elsewhere on the row, then the **Approve** button above should be clickable.
223218

224-
#apply the updated properties to the resource
225-
az rest --uri "https://management.azure.com$rid?api-version=$apiVersion" \
226-
--method PUT \
227-
--body @search_updated.json
219+
Learn more about the [manual approval workflow](/azure/private-link/private-endpoint-overview#access-to-a-private-link-resource-using-approval-workflow).
228220

229-
```
230221

231222
### Create shared private link
232223

@@ -237,15 +228,19 @@ This section is only applicable for S2 pricing tier search resource, because it
237228

238229
To create shared private link from your search resource connecting to your Azure OpenAI resource, see the [search documentation](/azure/search/search-indexer-howto-access-private). Select **Resource type** as `Microsoft.CognitiveServices/accounts` and **Group ID** as `openai_account`.
239230

240-
With shared the private link, [step 8](#data-ingestion-architecture) of the data ingestion architecture diagram is changed from **bypass trusted service** to **shared private link**.
231+
With shared private link, [step eight](#data-ingestion-architecture) of the data ingestion architecture diagram is changed from **bypass trusted service** to **private endpoint**.
241232

242233
:::image type="content" source="../media/use-your-data/ingestion-architecture-s2.png" alt-text="A diagram showing the process of ingesting data with an S2 search resource." lightbox="../media/use-your-data/ingestion-architecture-s2.png":::
243234

235+
The Azure AI Search shared private link you created is also in a Microsoft managed virtual network, not your virtual network. The difference compared to the other managed private endpoint created [earlier](#disable-public-network-access-1) is that the managed private endpoint `[1]` from Azure OpenAI to Azure Search is provisioned through the [form application](#disable-public-network-access-1), while the managed private endpoint `[2]` from Azure Search to Azure OpenAI is provisioned via Azure portal or REST API of Azure Search.
236+
237+
:::image type="content" source="../media/use-your-data/virtual-network-s2.png" alt-text="A diagram showing the virtual network architecture with S2 search resource." lightbox="../media/use-your-data/virtual-network-s2.png":::
238+
244239
## Configure Storage Account
245240

246241
### Enable trusted service
247242

248-
To allow access to your Storage Account from Azure OpenAI and Azure AI Search, you need to set up Storage Account to bypass your Azure OpenAI and Azure AI Search as [trusted services based on managed identity](/azure/storage/common/storage-network-security?tabs=azure-portal#trusted-access-based-on-a-managed-identity).
243+
To allow access to your Storage Account from Azure OpenAI and Azure AI Search, while the Storage Account has no public network access, you need to set up Storage Account to bypass your Azure OpenAI and Azure AI Search as [trusted services based on managed identity](/azure/storage/common/storage-network-security?tabs=azure-portal#trusted-access-based-on-a-managed-identity).
249244

250245
In the Azure portal, navigate to your storage account networking tab, choose "Selected networks", and then select **Allow Azure services on the trusted services list to access this storage account** and click Save.
251246

-7.46 KB
Loading
-17.3 KB
Loading
-8.9 KB
Loading
Binary file not shown.
-32.8 KB
Loading

0 commit comments

Comments
 (0)