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: deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level.md
+41-2Lines changed: 41 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,20 +210,29 @@ To configure document-level security (DLS), you create a custom role where you d
210
210
1. Go to the **Custom Roles** page using the navigation menu or the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
211
211
1. Select **Create role**.
212
212
1. Give your custom role a meaningful name and description.
213
-
1. In the **Index privileges** area, specify the data stream pattern, For example, enter `events-*`.
213
+
1. In the **Index privileges** area, specify the data stream pattern and the privilege you want to grant. For example, enter `events-*` and `read`.
214
214
1. Enable the **Grant read privileges to specific documents** toggle and add your query using the QueryDSL syntax.
215
-
* For example, to allow read access only to documents that belong to the click category within all the events-* data streams, enter the following query:
215
+
* For example, to allow read access only to documents that belong to the click category within all the `events-*` data streams, enter the following query:
:title: Configuring document-level security another example
235
+
:::
227
236
228
237
1. Optional: To grant this role access to {{kib}} spaces for feature access and visibility, click **Assign to this space**. Specify the level of access required and click **Assign role**.
229
238
1. Select **Create role** to save your custom role.
@@ -421,6 +430,36 @@ The resulting permission is equal to:
421
430
Field-level security should not be set on [`alias`](elasticsearch://reference/elasticsearch/mapping-reference/field-alias.md) fields. To secure a concrete field, its field name must be used directly.
422
431
::::
423
432
433
+
### Configuring field-level security in {{serverless-short}} [field-level-serverless]
434
+
```{applies_to}
435
+
serverless: ga
436
+
```
437
+
438
+
As an administrator, you can create custom roles that enable users to access data and project features. When you create a custom role, you can assign {{es}} [cluster](/deploy-manage/users-roles/serverless-custom-roles.md#custom-roles-es-cluster-privileges) and [index](/deploy-manage/users-roles/serverless-custom-roles.md#custom-roles-es-index-privileges) privileges and [{{kib}}](/deploy-manage/users-roles/serverless-custom-roles.md#custom-roles-kib-privileges) privileges.
439
+
440
+
To configure field-level security (FLS), you create a custom role where you define the specific fields that this role grants or denies access to:
441
+
442
+
1. Go to the **Custom Roles** page using the navigation menu or the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md).
443
+
1. Select **Create role**.
444
+
1. Give your custom role a meaningful name and description.
445
+
1. In the **Index privileges** area, specify the data stream pattern and the privilege you want to grant. For example, enter `events-*` and `read`.
446
+
1. Enable the **Grant access to specific fields** toggle.
447
+
* To grant access to specific fields within each document in all the `events-*` data streams, add the fields to the **Granted fields** list. For example, you can add `category`, `@timestamp`, and `message` as individual fields, or you can specify a field expression such as `event_*` that grants read access to all the fields that start with an `event_` prefix.
:title: Configuring field-level security by granting access to fields
451
+
:::
452
+
453
+
* To deny access to specific fields within each document, add the fields to the **Denied fields** list. For example, you can add the `customer.handle` field.
:title: Configuring field-level security by denying access to fields
457
+
:::
458
+
459
+
1. Optional: To grant this role access to {{kib}} spaces for feature access and visibility, click **Assign to this space**. Specify the level of access required and click **Assign role**.
460
+
1. Select **Create role** to save your custom role.
461
+
462
+
424
463
## Multiple roles with document and field level security [multiple-roles-dls-fls]
425
464
426
465
A user can have many roles and each role can define different permissions on the same data stream or index. When assigning users multiple roles, be careful that you don’t inadvertently grant wider access than intended.
0 commit comments