Skip to content

Commit 5e028db

Browse files
kibanamachinelegregogchapsjportner
authored
Document DLS configuration within Kibana role management (#90329) (#94163)
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Larry Gregory <larry.gregory@elastic.co> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
1 parent 376941d commit 5e028db

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

docs/user/security/authorization/index.asciidoc

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,71 @@ you cannot use `kibana_admin` to grant access. You must create custom roles that
1313
[[kibana-role-management]]
1414
=== {kib} role management
1515

16-
To create a role that grants {kib} privileges, open the menu, then click *Stack Management > Roles* and click **Create role**.
16+
Roles are a collection of privileges that allow you to perform actions in {kib} and {es}. Users are not directly granted privileges, but are instead assigned one or more roles that describe the desired level of access. When you assign a user multiple roles, the user receives a union of the roles’ privileges. This means that you cannot reduce the privileges of a user by assigning them an additional role. You must instead remove or edit one of their existing roles.
17+
18+
To create a role, open the menu, then click *Stack Management > Roles* and click **Create role**.
1719

1820
[float]
1921
==== Required permissions
2022

21-
The `manage_security` cluster privilege is required to access role management.
23+
The `manage_security` {ref}/security-privileges.html#privileges-list-cluster[cluster privilege] is required to access role management.
24+
25+
[[adding_cluster_privileges]]
26+
==== Cluster privileges
27+
28+
Cluster privileges grant access to monitoring and management features in {es}. They also enable <<management, Stack Management>> capabilities in {kib}.
29+
30+
Refer to {ref}/security-privileges.html#privileges-list-cluster[cluster privileges] for a complete description of available options.
31+
32+
[[adding_index_privileges]]
33+
==== Index privileges
34+
35+
Each role can grant access to multiple data indices, and each index can have a different set of privileges.
36+
We recommend granting the `read` and `view_index_metadata` privileges to each index that you expect your users to work with in {kib}.
37+
38+
Refer to {ref}/security-privileges.html#privileges-list-indices[index privileges] for a complete description of available options.
39+
40+
Document-level and field-level security affords you even more granularity when it comes to granting access to your data.
41+
With document-level security (DLS), you can write an {es} query to describe which documents this role grants access to.
42+
With field-level security (FLS), you can instruct {es} to grant or deny access to specific fields within each document.
43+
44+
[[index_privilege_example_1]]
45+
===== Example: Grant access to indices that match the `filebeat-*` pattern
46+
47+
. Go to **Stack Management > Roles**, and then click **Create role**.
48+
. In **Index privileges**, enter:
49+
.. `filebeat-*` in the **Index** field.
50+
.. `read` and `view_index_metadata` in the **Privileges** field.
51+
52+
[role="screenshot"]
53+
image::user/security/images/create-role-index-example.png[Create role with index privileges]
54+
55+
[[index_privilege_dls_example]]
56+
===== Example: Grant read access to specific documents in indices that match the `filebeat-*` pattern
57+
58+
. Go to **Stack Management > Roles**, and then click **Create role**.
59+
. In **Index privileges**, enter:
60+
.. `filebeat-*` in the **Indices** field.
61+
.. `read` and `view_index_metadata` in the **Privileges** field.
62+
. Select **Grant read privileges to specific documents**.
63+
. Enter an {es} query that matches the documents your users should access. This example writes a query that allows access to documents that have a `category` field equal to `click`:
64+
+
65+
[source,sh]
66+
--------------------------------------------------
67+
{
68+
"match": {
69+
"category": "click"
70+
}
71+
}
72+
--------------------------------------------------
73+
+
74+
NOTE: {kib} automatically surrounds your DLS query with a `query` block, so you don't have to provide your own.
75+
76+
[role="screenshot"]
77+
image::user/security/images/create-role-dls-example.png[Create role with DLS index privileges]
2278

2379
[[adding_kibana_privileges]]
24-
==== Adding {kib} privileges
80+
==== {kib} privileges
2581

2682
To assign {kib} privileges to the role, click **Add {kib} privilege** in the {kib} section.
2783

244 KB
Loading
206 KB
Loading

0 commit comments

Comments
 (0)