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/search/search-manage.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.author: heidist
9
9
tags: azure-portal
10
10
ms.service: cognitive-search
11
11
ms.topic: conceptual
12
-
ms.date: 12/21/2022
12
+
ms.date: 01/12/2023
13
13
---
14
14
# Service administration for Azure Cognitive Search in the Azure portal
15
15
@@ -62,8 +62,8 @@ Several aspects of a search service are determined when the service is provision
62
62
Service administration includes the following tasks:
63
63
64
64
*[Adjust capacity](search-capacity-planning.md) by adding or removing replicas and partitions
65
-
*[Rotate API keys](search-security-api-keys.md) used for admin and query operations
66
-
*[Control access to admin operations](search-security-rbac.md) through role-based security
65
+
*[Manage API keys](search-security-api-keys.md) used for admin and query operations
66
+
*[Allow or deny access using Azure roles](search-security-rbac.md)
67
67
*[Configure IP firewall rules](service-configure-firewall.md) to restrict access by IP address
68
68
*[Configure a private endpoint](service-create-private-endpoint.md) using Azure Private Link and a private virtual network
69
69
*[Monitor service health and operations](monitor-azure-cognitive-search.md): storage, query volumes, and latency
@@ -92,22 +92,24 @@ Internally, Microsoft collects telemetry data about your service and the platfor
92
92
| Telemetry | One and a half years |
93
93
94
94
> [!NOTE]
95
-
> This section is about monitoring data. For questions about customer data and privacy, see the ["Data residency"](search-security-overview.md#data-residency) section of the security overview article.
95
+
> See the ["Data residency"](search-security-overview.md#data-residency) section of the security overview article for more information about data location and privacy.
96
96
97
97
## Administrator permissions
98
98
99
99
When you open the search service overview page, the Azure role assigned to your account determines what portal content is available to you. The overview page at the beginning of the article shows the portal content available to an Owner or Contributor.
100
100
101
-
Control plane roles include the following items:
101
+
Azure roles used for service administration include:
102
102
103
103
* Owner
104
104
* Contributor (same as Owner, minus the ability to assign roles)
105
-
* Reader (access to service information and the Monitoring tab)
105
+
* Reader (provides access to service information in Essentials section and in the Monitoring tab)
106
106
107
-
If you want a combination of control plane and data plane permissions, consider Search Service Contributor. For more information, see [Built-in roles](search-security-rbac.md#built-in-roles-used-in-search).
107
+
By default, all search services start with at least one Owner. Owners, service administrators, and co-administrators have permission to create other administrators and other role assignments.
108
+
109
+
Also by default, search services start with API keys for content-related tasks that an Owner or Contributor might perform in the portal. However, it's possible to turn off [API key authentication](search-security-api-keys.md) and use [Azure role-based access control](search-security-rbac.md#built-in-roles-used-in-search) exclusively. If you turn off API keys, be sure to set up data access role assignments so that all features in the portal remain operational.
108
110
109
111
> [!TIP]
110
-
> By default, any Owner or Co-owner can create or delete services. To prevent accidental deletions, you can[lock resources](../azure-resource-manager/management/lock-resources.md).
112
+
> By default, any owner or administrator can create or delete services. To prevent accidental deletions, you can [lock resources](../azure-resource-manager/management/lock-resources.md).
Copy file name to clipboardExpand all lines: articles/search/search-security-api-keys.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Connect with API keys
2
+
title: Connect using API keys
3
3
titleSuffix: Azure Cognitive Search
4
4
description: Learn how to use an admin or query API key for inbound access to an Azure Cognitive Search service endpoint.
5
5
@@ -15,10 +15,10 @@ ms.date: 01/10/2023
15
15
16
16
Cognitive Search offers key-based authentication that you can use on connections to your search service. An API key is a unique string composed of 52 randomly generated numbers and letters. A request made to a search service endpoint will be accepted if both the request and the API key are valid.
17
17
18
-
API keys are frequently used when making REST API calls to a search service. You can also use them in search solutions if Azure Active Directory isn't an option.
18
+
API keys are used for content-related requests, such as creating or querying an index. Upon service creation, it's the only authentication mechanism for data plane (content) operations, but you can replace or supplement key authentication with [Azure roles](search-security-rbac.md) if you can't use hard-coded keys in your code.
19
19
20
20
> [!NOTE]
21
-
> A quick note about "key" terminology in Cognitive Search. An "API key", which is described in this article, refers to a GUID used for authenticating a request. A "document key" refers to a unique string in your indexed content that's used to uniquely identify documents in a search index. API keys and document keys are unrelated.
21
+
> A quick note about how "key" terminology is used in Cognitive Search. An "API key", which is described in this article, refers to a GUID used for authenticating a request. A separate term, "document key", refers to a unique string in your indexed content that's used to uniquely identify documents in a search index.
Copy file name to clipboardExpand all lines: articles/search/search-security-rbac.md
+26-9Lines changed: 26 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
8
8
ms.author: heidist
9
9
ms.service: cognitive-search
10
10
ms.topic: how-to
11
-
ms.date: 05/24/2022
11
+
ms.date: 01/12/2023
12
12
ms.custom: subject-rbac-steps, references_regions
13
13
---
14
14
@@ -95,7 +95,7 @@ In this step, configure your search service to recognize an **authorization** he
95
95
| Role-based access control | Preview | Requires membership in a role assignment to complete the task, described in the next step. It also requires an authorization header. Choosing this option limits you to clients that support the 2021-04-30-preview REST API. |
96
96
| Both | Preview | Requests are valid using either an API key or an authorization token. |
97
97
98
-
If you can't save your selection, or if you get "API access control failed to update for search service `<name>`. DisableLocalAuth is preview and not enabled for this subscription", your subscription enrollment hasn't been initiated or it hasn't been processed.
98
+
All network calls for search service operations and content will respect the option you select: API keys for **API Keys**, an RBAC token for **Role-based access control**, or API keys and RBAC tokens equally for **Both**. This applies to both portal features and clients that access a search service programmatically.
99
99
100
100
### [**REST API**](#tab/config-svc-rest)
101
101
@@ -201,6 +201,8 @@ Recall that you can only scope access to top-level resources, such as indexes, s
201
201
202
202
## Test role assignments
203
203
204
+
When testing roles, remember that roles are cumulative and inherited roles that are scoped to the subscription or resource group can't be deleted or denied at the resource (search service) level.
205
+
204
206
### [**Azure portal**](#tab/test-portal)
205
207
206
208
1. Open the [Azure portal](https://portal.azure.com).
@@ -209,13 +211,15 @@ Recall that you can only scope access to top-level resources, such as indexes, s
209
211
210
212
1. On the Overview page, select the **Indexes** tab:
211
213
214
+
+ Members of the Contributor role can view and create any object, but can't query an index using Search Explorer.
215
+
212
216
+ Members of Search Index Data Reader can use Search Explorer to query the index. You can use any API version to check for access. You should be able to issue queries and view results, but you shouldn't be able to view the index definition.
213
217
214
218
+ Members of Search Index Data Contributor can select **New Index** to create a new index. Saving a new index will verify write access on the service.
215
219
216
220
### [**REST API**](#tab/test-rest)
217
221
218
-
+ Register your application with Azure Active Directory.
222
+
+ Register your REST client with Azure Active Directory.
219
223
220
224
+ Revise your code to use a [Search REST API](/rest/api/searchservice/) (any supported version) and set the **Authorization** header on requests, replacing the **api-key** header.
221
225
@@ -395,13 +399,27 @@ The PowerShell example shows the JSON syntax for creating a custom role that's a
395
399
396
400
## Disable API key authentication
397
401
398
-
API keys can't be deleted, but they can be disabled on your service. If you're using the Search Service Contributor, Search Index Data Contributor, and Search Index Data Reader preview roles and Azure AD authentication, you can disable API keys, causing the search service to refuse all data-related requests that pass an API key in the header for content-related requests.
402
+
API keys can't be deleted, but they can be disabled on your service if you're using the Search Service Contributor, Search Index Data Contributor, and Search Index Data Reader roles and Azure AD authentication. Disabling API keys causes the search service to refuse all data-related requests that pass an API key in the header.
403
+
404
+
Owner or Contributor permissions are required to disable features.
405
+
406
+
To disable [key-based authentication](search-security-api-keys.md), use Azure portal or the Management REST API.
407
+
408
+
### [**Portal**](#tab/disable-keys-portal)
409
+
410
+
1. In the Azure portal, navigate to your search service.
399
411
400
-
To disable [key-based authentication](search-security-api-keys.md), use the Management REST API version 2021-04-01-Preview and send two consecutive requests for [Update Service](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update).
412
+
1. In the left-navigation pane, select **Keys**.
401
413
402
-
Owner or Contributor permissions are required to disable features. Use Postman or another web testing tool to complete the following steps (see Tip below):
414
+
1. Select **Role-based access control**.
403
415
404
-
1. On the first request, set ["AuthOptions"](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#dataplaneauthoptions) to "aadOrApiKey" to enable Azure AD authentication. Notice that the option indicates availability of either approach: Azure AD or the native API keys.
416
+
The change is effective immediately. Assuming you have permission to assign roles as a member of Owner, service administrator, or co-administrator, you can use portal features to test role-based access.
417
+
418
+
### [**REST API**](#tab/disable-keys-rest)
419
+
420
+
Use Postman or another REST client to send two consecutive requests for [Update Service](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update). See [Manage a search service using REST APIs](search-manage-rest.md) for instructions on setting up the client.
421
+
422
+
1. On the first request, set ["AuthOptions"](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#dataplaneauthoptions) to "aadOrApiKey" to enable Azure AD authentication. Activating Azure AD authentication is a prerequisite to setting "disableLocalAuth".
405
423
406
424
```http
407
425
PUT https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}?api-version=2021-04-01-Preview
@@ -439,8 +457,7 @@ You can't combine steps one and two. In step one, "disableLocalAuth" must be fal
439
457
440
458
To re-enable key authentication, rerun the last request, setting "disableLocalAuth" to false. The search service will resume acceptance of API keys on the request automatically (assuming they're specified).
441
459
442
-
> [!TIP]
443
-
> Management REST API calls are authenticated through Azure Active Directory. For guidance on setting up a security principal and a request, see this blog post [Azure REST APIs with Postman (2021)](https://blog.jongallant.com/2021/02/azure-rest-apis-postman-2021/). The previous example was tested using the instructions and Postman collection provided in the blog post.
0 commit comments