Skip to content

Commit 030491a

Browse files
committed
AzS: Authenticate with keys refresh
1 parent e8826a9 commit 030491a

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

articles/search/search-security-api-keys.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ ms.date: 1/16/2025
1515

1616
# Connect to Azure AI Search using keys
1717

18-
Azure AI Search offers both keyless and key-based authentication for connections to your search service. An API key is a unique string composed of 52 randomly generated numbers and letters. In your source code, you can specify it as an [environment variable](/azure/ai-services/cognitive-services-environment-variables) or as an app setting in your project, and then reference the variable on the request. A request made to a search service endpoint is accepted if both the request and the API key are valid.
18+
Azure AI Search supports both keyless and key-based authentication for connections to your search service. An API key is a unique string composed of 52 randomly generated numbers and letters. In your source code, you can specify it as an [environment variable](/azure/ai-services/cognitive-services-environment-variables) or as an app setting in your project, and then reference the variable on the request. A request made to a search service endpoint is accepted if both the request and the API key are valid.
1919

2020
> [!IMPORTANT]
21-
> When you create a search service, key-based authentication is the default, but it's not the most secure option. We recommend that you replace it with [role-based access](search-security-enable-roles.md), which eliminates the need for hardcoded keys in your codebase.
21+
> When you create a search service, key-based authentication is the default, but it's not the most secure option. We recommend that you replace it with [role-based access](search-security-enable-roles.md).
2222
2323
## Types of API keys
2424

articles/search/search-security-enable-roles.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
title: Enable role-based access control
33
titleSuffix: Azure AI Search
44
description: Enable or disable role-based access control for token authentication using Microsoft Entra ID on Azure AI Search.
5-
65
manager: nitinme
76
author: HeidiSteen
87
ms.author: heidist
98
ms.service: azure-ai-search
109
ms.topic: how-to
11-
ms.date: 10/30/2024
12-
10+
ms.date: 1/16/2025
11+
#customer intent: As a developer, I want to enable role-based access control for token authentication using Microsoft Entra ID on Azure AI Search so that I can secure my search service.
1312
---
1413

1514
# Enable or disable role-based access control in Azure AI Search
1615

17-
Azure AI Search uses [key-based authentication](search-security-api-keys.md) by default, but it fully supports Microsoft Entra ID authentication and authorization for all control plane and data plane operations through Azure role-based access control (RBAC).
16+
Azure AI Search supports both keyless and [key-based authentication](search-security-api-keys.md) for for all control plane and data plane operations. You can use Microsoft Entra ID authentication and authorization for all control plane and data plane operations through Azure role-based access control (RBAC).
17+
18+
> [!IMPORTANT]
19+
> When you create a search service, key-based authentication is the default, but it's not the most secure option. We recommend that you replace it with role-based access as described in this article.
1820
1921
Before you can assign roles for authorized data plane access to Azure AI Search, you must enable role-based access control on your search service. Roles for service administration (control plane) are built in and can't be enabled or disabled.
2022

@@ -37,18 +39,18 @@ The default failure mode for unauthorized requests is `http401WithBearerChalleng
3739

3840
### [**Azure portal**](#tab/config-svc-portal)
3941

40-
1. Sign in to the [Azure portal](https://portal.azure.com) and open the search service page.
42+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your search service.
4143

4244
1. Select **Settings** and then select **Keys** in the left navigation pane.
4345

4446
:::image type="content" source="media/search-security-rbac/search-security-enable-roles.png" lightbox="media/search-security-rbac/search-security-enable-roles.png" alt-text="Screenshot of the keys page with authentication options." border="true":::
4547

46-
1. Choose **Role-based control** or **Both** if you're currently using keys and need time to transition clients to role-based access control.
48+
1. Choose **Role-based control**. Only choose **Both** if you're currently using keys and need time to transition clients to role-based access control.
4749

4850
| Option | Description |
4951
|--------|--------------|
50-
| API Key | (default). Requires [API keys](search-security-api-keys.md) on the request header for authorization. |
51-
| Role-based access control | Requires membership in a role assignment to complete the task. It also requires an authorization header on the request. |
52+
| API Key (default) | Requires [API keys](search-security-api-keys.md) on the request header for authorization. |
53+
| Role-based access control (recommended) | Requires membership in a role assignment to complete the task. It also requires an authorization header on the request. |
5254
| Both | Requests are valid using either an API key or role-based access control, but if you provide both in the same request, the API key is used. |
5355

5456
1. As an administrator, if you choose a roles-only approach, [assign data plane roles](search-security-rbac.md) to your user account to restore full administrative access over data plane operations in the Azure portal. Roles include Search Service Contributor, Search Index Data Contributor, and Search Index Data Reader. You need the first two roles if you want equivalent access.
@@ -140,7 +142,7 @@ All calls to the Management REST API are authenticated through Microsoft Entra I
140142
141143
It's possible to disable role-based access control for data plane operations and use key-based authentication instead. You might do this as part of a test workflow, for example to rule out permission issues.
142144
143-
Reverse the steps you followed previously to enable role-based access.
145+
To disable role-based access control in the Azure portal:
144146
145147
1. Sign in to the [Azure portal](https://portal.azure.com) and open the search service page.
146148
@@ -221,9 +223,9 @@ To re-enable key authentication, set "disableLocalAuth" to false. The search ser
221223
222224
---
223225
224-
## Effects of role-based access control
226+
## Effects of multiple service principals
225227
226-
+ Role-based access control can increase the latency of some requests. Each unique combination of service resource (index, indexer, skillsets and so forth) and service principal triggers an authorization check. These authorization checks can add up to 200 milliseconds of latency per request.
228+
+ Each unique combination of service resource (index, indexer, skillsets and so forth) and service principal triggers an authorization check. These authorization checks can add up to 200 milliseconds of latency per request.
227229
228230
+ In rare cases where requests originate from a high number of different service principals, all targeting different service resources (indexes, indexers, and so forth), it's possible for the authorization checks to result in throttling. Throttling would only happen if hundreds of unique combinations of search service resource and service principal were used within a second.
229231

0 commit comments

Comments
 (0)