CSS uses the opendistro_security plug-in to provide security cluster capabilities. The opendistro_security plug-in is built based on the RBAC model. RBAC involves three core concepts: user, action, and role. RBAC simplifies the relationship between users and actions, simplifies permission management, and facilitates permission expansion and maintenance. The following figure shows the relationship between the three.
Parameter |
Description |
---|---|
User |
A user can send operation requests to Elasticsearch clusters. The user has credentials such as username and password, and zero or multiple backend roles and custom attributes. |
Role |
A role is a combination of permissions and action groups, including operation permissions on clusters, indexes, documents, or fields. |
Permission |
Single permission, for example, creating an index (for example, indices:admin/create) |
Role mapping |
A user will be assigned a role after successful authentication. Role mapping is to map a role to a user (or a backend role). For example, the mapping from kibana_user (role) to jdoe (user) means that John Doe obtains all permissions of kibana_user after being authenticated by kibana_user. Similarly, the mapping from all_access (role) to admin (backend role) means that any user with the backend role admin (from the LDAP/Active Directory server) has all the permissions of role all_access after being authenticated. You can map a role to multiple users or backend roles. |
Action group |
A group of permissions. For example, the predefined SEARCH action group grants roles to use _search and _msearchAPI. |
In addition to the RBAC model, Elasticsearch has an important concept called tenant. RBAC is used to manage user authorization, and tenants are used for information sharing across tenants. In a tenant space, IAM users can share information such as dashboard data and index patterns.
This section describes how to use Kibana to create a user and grant permissions to the user. Kibana can be used to create users and grant permissions only when the security mode is enabled for the cluster.
Log in to Kibana and create a user on the Security page.
The user will be displayed in the user list.
Create a role and grant permissions to the role.
Use different names for the index and the user.
After creating a role and granting permissions to the role, you need to map the role to a user so that the user can obtain the permissions of the mapped role.