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-document-level-access-overview.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,12 @@ Document-level permissions in Azure AI Search provide a structured framework for
53
53
54
54
To help you dive deeper into document-level access control in Azure AI Search, here’s a table of key resources:
55
55
56
-
| Functionality | Reference |
56
+
| Functionality | Reference |Sample |
57
57
|---|---|
58
-
|**Index permissions using REST API**|[Index permissions using REST API](search-index-access-control-lists-and-rbac-push-api.md)|
59
-
|**Index ADLS Gen2 permissions metadata using built-in indexers**|[Index permissions using ADLS Gen2 indexer](search-indexer-access-control-lists-and-role-based-access.md)|
60
-
|**Query using Microsoft Entra token-based permissions**|[Query using Microsoft Entra token-based permissions](https://aka.ms/azs-query-preserving-permissions)|
61
-
|**Security trimming via filters**|[Security trimming via filters](search-security-trimming-for-azure-search.md)|
58
+
|**Index permissions using Push APIs**|[Index permissions using REST API](search-index-access-control-lists-and-rbac-push-api.md)|[azure-search-rest-samples/Quickstart-ACL](https://github.com/Azure-Samples/azure-search-rest-samples-pr/tree/main/Quickstart-ACL) or [azure-search-python-samples/Quickstart-ACL](https://github.com/Azure-Samples/azure-search-python-samples-pr/blob/main/Quickstart-ACL)|
59
+
|**Index ADLS Gen2 permissions metadata using built-in indexers**|[Index permissions using ADLS Gen2 indexer](search-indexer-access-control-lists-and-role-based-access.md)|[azure-search-python-samples/Quickstart-Document-Permissions](https://github.com/Azure-Samples/azure-search-python-samples/blob/main/Quickstart-Document-Permissions)|
60
+
|**Query using Microsoft Entra token-based permissions**|[Query using Microsoft Entra token-based permissions](https://aka.ms/azs-query-preserving-permissions)|See previous samples. |
61
+
|**Security trimming via filters**|[Security trimming via filters](search-security-trimming-for-azure-search.md)|Not available. |
Copy file name to clipboardExpand all lines: articles/search/search-query-access-control-rbac-enforcement.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,21 @@ ms.author: magottei
13
13
14
14
Query-time access control ensures that users only retrieve search results they're authorized to access, based on their identity, group memberships, roles, or attributes. This functionality is essential for secure enterprise search and compliance-driven workflows.
15
15
16
+
Azure Data Lake Storage (ADLS) Gen2 provides an access model that makes fine-grained access control easier to implement, but you can use other data sources, providing you use the push APIs and you send documents that include permission metadata alongside other indexable fields.
17
+
16
18
## Requirements
17
19
18
-
- Permission metadata must be in `filterable` string fields.
20
+
- Permission metadata must be in `filterable` string fields. You won't use the filter in your queries, but the search engine builds a filter internally to exclude unauthorized content.
19
21
20
22
- Permission metadata must consist of either POSIX-style permissions that identify the level of access and the group or user ID, or the resource ID of the container in ADLS Gen2 if you're using RBAC scope.
21
23
22
24
- For ADLS Gen2 data sources, you must have configured Access Control Lists (ACLs) and/or Azure role-based access control (RBAC) roles at the container level. You can use a [built-in indexer](search-indexer-access-control-lists-and-role-based-access.md) or [Push APIs](search-index-access-control-lists-and-rbac-push-api.md) to index permission metadata in your index.
23
25
24
-
- Use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK to query the index.
26
+
- Use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK to query the index. This API version supports internal queries that filter out unauthorized results.
25
27
26
28
## How query-time enforcement works
27
29
28
-
This section lists the order of operations for ACL enforcement at query time.
30
+
This section lists the order of operations for ACL enforcement at query time. Operations vary depending on whether you use Azure RBAC scope or Microsoft Entra ID group or user IDs.
29
31
30
32
### 1. User permissions input
31
33
The end-user application sends user permission as part of the search query request. The following table lists the source of the user permissions Azure AI Search uses for ACL enforcement:
@@ -36,9 +38,11 @@ The end-user application sends user permission as part of the search query reque
36
38
| groupIds | Group membership fetched using the [Microsoft Graph](/graph/api/resources/groups-overview) API |
37
39
| rbacScope | Permissions the user from `x-ms-query-source-authorization` has on a storage container |
38
40
39
-
### 2. Security filter construction
41
+
### 2. Security filter construction
40
42
Azure AI Search dynamically constructs security filters based on the user permissions provided. These security filters are automatically appended to any filters that might come in with the query if the index has the permission filter option enabled.
41
43
44
+
For Azure RBAC, permissions are list of resource ID strings, and there must an Azure role assignment (Storage Blob Data Reader) on the data the source that grants access to the security principal token in the authorization header. The filter excludes documents if there's no role assignment for the principal behind the access token on the request.
45
+
42
46
### 3. Results filtering
43
47
The security filter efficiently matches the userIds, groupIds, and rbacScope from the user against each list of ACLs in every document in the search index to limit the results returned to ones the user has access to. It's important to note that each filter is applied independently and a document is considered authorized if any filter succeeds. For example, if a user has access to a document through userIds but not through groupIds, the document is still considered valid and returned to the user.
0 commit comments