Skip to content

Commit 5d1b532

Browse files
Adding documentation for supporting Rbac Scope ingestion for Azure Blobs
1 parent 127bb89 commit 5d1b532

File tree

2 files changed

+162
-0
lines changed

2 files changed

+162
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
title: Use Blob indexer to ingest Rbac scopes metadata
3+
titleSuffix: Azure AI Search
4+
description: Learn how to configure Azure AI Search indexers for ingesting Azure Role-Based Access (RBAC) metadata on Azure Blobs.
5+
ms.service: azure-ai-search
6+
ms.topic: how-to
7+
ms.date: 07/07/2025
8+
author: vaishalishah
9+
ms.author: vaishalishah
10+
---
11+
12+
# Use an Blob indexer to ingest Rbac scopes metadata
13+
14+
[!INCLUDE [Feature preview](./includes/previews/preview-generic.md)]
15+
16+
Starting in 2025-05-01-preview, you can now include Rbac scope alongside document ingestion in Azure AI Search and use those permissions to control access to search results.
17+
18+
You can use the push APIs to upload and index content and permission metadata manually, or you can use an indexer to automate data ingestion. This article focuses on the indexer approach.
19+
20+
The indexer approach is built on this foundation:
21+
22+
+ [Role-based access control (Azure RBAC)](/azure/storage/blobs/data-lake-storage-access-control-model#role-based-access-control-azure-rbac). There's no support for Attribute-based access control (Azure ABAC).
23+
24+
+ [An Azure AI Search indexer for Blob](search-howto-indexing-azure-blob-storage.md) that retrieves and ingests data and metadata, including permission filters. To get permission filter support, you must use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK that supports the feature.
25+
26+
+ [An index in Azure AI Search](search-how-to-create-search-index.md) containing the ingested documents and corresponding permissions. Permission metadata is stored as fields in the index. To set up queries that respect the permission filters, you must use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK that supports the feature.
27+
28+
## Prerequisites
29+
30+
+ Microsoft Entra ID authentication and authorization. Services and apps must be in the same tenant. Role assignments are used for each authenticated connection.
31+
32+
+ Azure AI Search, any region, but you must have a billable tier (basic and higher) for managed identity support. The search service must be [configured for role-based access](search-security-enable-roles.md) and it must [have a managed identity (either system or user)](search-howto-managed-identities-data-sources.md).
33+
34+
## Limitations
35+
36+
+ The following indexer features don't support permission preservation capabilities but are otherwise operational for Azure Blob content-only indexing:
37+
+ One-to-many [parsing modes](/rest/api/searchservice/indexers/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true#blobindexerparsingmode), such as: `delimitedText`, `jsonArray`, `jsonLines`, and `markdown` with sub-mode `oneToMany`
38+
39+
40+
### Authorization
41+
42+
For indexer execution, your search service identity must have **Storage Blob Data Reader** permission.
43+
44+
If you're testing locally, you should also have a **Storage Blob Data Reader** role assignment. For more information, see [Connect to Azure Storage using a managed identity](search-howto-managed-identities-storage.md).
45+
46+
## Configure Azure AI Search for indexing permission filters
47+
48+
Recall that the search service must have:
49+
50+
+ [Role-based access enabled](search-security-enable-roles.md)
51+
+ [Managed identity configured](search-howto-managed-identities-data-sources.md)
52+
53+
### Authorization
54+
55+
For indexer execution, the client issuing the API call must have **Search Service Contributor** permission to create objects, **Search Index Data Contributor** permission to perform data import, and **Search Index Data Reader** to query an index.
56+
57+
If you're testing locally, you should have the same role assignments. For more information, see [Connect to Azure AI Search using roles](search-security-rbac.md).
58+
59+
## Indexing permission metadata
60+
61+
In Azure AI Search, configure an indexer, data source, and index to pull permission metadata from blobs.
62+
63+
### Configure the data source
64+
65+
+ Data Source type must be `azureblob`.
66+
67+
+ Data source must have `indexerPermissionOptions` with `rbacScope`.
68+
69+
+ For`rbacScope`, configure the [connection string](search-howto-index-azure-data-lake-storage.md#supported-credentials-and-connection-strings) with managed identity format.
70+
71+
+ For connection strings using a [user-assigned managed identity](search-howto-managed-identities-storage.md#user-assigned-managed-identity), you must also specify the `identity` property.
72+
73+
<!-- Question/Comment: check this example -->
74+
JSON example with system managed identity:
75+
76+
```json
77+
{
78+
"name" : "my-blob-datasource",
79+
"type": "azureblob",
80+
"indexerPermissionOptions": ["rbacScope"],
81+
"credentials": {
82+
"connectionString": "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.Storage/storageAccounts/<your storage account name>/;"
83+
},
84+
"container": {
85+
"name": "<your container name>",
86+
"query": "<optional-virtual-directory-name>"
87+
}
88+
}
89+
```
90+
91+
JSON schema example with a user-managed identity in the connection string:
92+
93+
```json
94+
{
95+
"name" : "my-blob-datasource",
96+
"type": "azureblob",
97+
"indexerPermissionOptions": ["rbacScope"],
98+
"credentials": {
99+
"connectionString": "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.Storage/storageAccounts/<your storage account name>/;"
100+
},
101+
"container": {
102+
"name": "<your container name>",
103+
"query": "<optional-virtual-directory-name>"
104+
},
105+
"identity": {
106+
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
107+
"userAssignedIdentity": "/subscriptions/{subscription-ID}/resourceGroups/{resource-group-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{user-assigned-managed-identity-name}"
108+
}
109+
}
110+
```
111+
112+
### Create permission fields in the index
113+
114+
In Azure AI Search, make sure your index contains field definitions for the permission metadata. Permission metadata can be indexed when `indexerPermissionOptions` is specified in the data source definition.
115+
116+
Recommended schema attributes RBAC Scope:
117+
118+
+ RBAC scope field with `rbacScope` permissionFilter value.
119+
+ Property `permissionFilterOption` to enable filtering at querying time.
120+
+ Use string fields for permission metadata
121+
+ Set `filterable` to true on all fields.
122+
123+
Notice that `retrievable` is false. You can set it true during development to verify permissions are present, but remember to set to back to false before deploying to a production environment.
124+
125+
JSON schema example:
126+
127+
```json
128+
{
129+
...
130+
"fields": [
131+
...
132+
{ "name": "RbacScope", "type": "Edm.String", "permissionFilter": "rbacScope", "filterable": true, "retrievable": false }
133+
],
134+
"permissionFilterOption": "enabled"
135+
}
136+
```
137+
138+
### Configure the indexer
139+
140+
Field mappings within an indexer set the data path to fields in an index. Target and destination fields that vary by name or data type require an explicit field mapping. The following metadata fields in Azure Blob might need field mappings if you vary the field name:
141+
142+
+ **metadata_rbac_scope** (`Edm.String`) - the container RBAC scope.
143+
144+
Specify `fieldMappings` in the indexer to route the permission metadata to target fields during indexing.
145+
146+
JSON schema example:
147+
148+
```json
149+
{
150+
...
151+
"fieldMappings": [
152+
{ "sourceFieldName": "metadata_rbac_scope", "targetFieldName": "RbacScope" }
153+
]
154+
}
155+
```
156+
157+
## Deletion tracking
158+
159+
To effectively manage blob deletion, ensure that you have enabled [deletion tracking](search-howto-index-changed-deleted-blobs.md) before your indexer runs for the first time. This feature allows the system to detect deleted blobs from your source and have them deleted from the index.
160+

articles/search/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,8 @@ items:
535535
href: search-index-access-control-lists-and-rbac-push-api.md
536536
- name: Pull ADLS Gen2 permissions into an index
537537
href: search-indexer-access-control-lists-and-role-based-access.md
538+
- name: Pull Blob Rbac scopes into an index
539+
href: search-blob-indexer-role-based-access.md
538540
- name: Query with permission filters
539541
href: search-query-access-control-rbac-enforcement.md
540542
- name: Data encryption

0 commit comments

Comments
 (0)