CSS limits access to security-mode clusters to authorized users only. When creating a security-mode cluster, an administrator account must be created. This administrator account can later use Kibana to add new users for the cluster and grant them the required permissions. This topic uses Kibana 7.10.2 as an example to describe how to use Kibana to grant users access to a security-mode cluster.
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. Figure 1 shows the relationship between the three.
Figure 1 User, action, and role

Concept | Description |
|---|---|
User | A user can send operation requests to an Elasticsearch cluster. 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 or action groups, including operation permissions on clusters, indexes, documents, or fields. |
Permission | A single permission, for example, creating an index (for example, indices:admin/create). |
Role mapping | A user will be assigned one or multiple roles 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 Bob (user) means that Bob obtains all permissions of kibana_user after authentication. 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 each role to multiple users or backend roles. |
Action group | An action group is a group of permissions. For example, the predefined SEARCH action group grants roles permissions to use _search and _msearch APIs. |
In addition to the RBAC model, Elasticsearch also uses a concept called tenant. The RBAC model addresses the problem of user-level authorization, while the tenant model addresses the problem of data and resource sharing between different tenants. Within a tenant space, tenants can share information such as dashboards and index patterns.
By default, users can only see the index patterns and dashboards in their own private tenant space. When a new user test is added, the system automatically generates an index named .kibana_xxx_test. The data in this user's private space will be stored in this index. Similarly, the data of the administrator's private tenant space is stored in the .kibana_xxx_admin index. To share an index pattern or dashboard with other tenants, you can create them in the global tenant space. Other users can access the shared resource only by switching to the global tenant space.
On the Kibana console, you can configure user permissions on an Elasticsearch cluster under Security to implement fine-grained access control at four levels: cluster, index, document, and field.
Users can be added or deleted for a cluster, and mapped to roles. This way, you assign roles to users.
With role mapping, you can configure the members of each role and assign roles to users based on usernames, backend roles, and host names. For each role, you can configure cluster, index, and document permissions, as well as the permission to use Kibana.
For more about security configuration for a security-mode cluster and the detailed guide, see the official Elasticsearch document here.
Figure 2 Create internal user

The following two parameters are optional. You can click Learn more on the page to learn more about them.
Figure 3 Setting the role name

In Elasticsearch, the cluster_monitor permission allows users to monitor and observe cluster status, but not to perform any operations that may alter the cluster status. Specifically, the cluster_monitor permission enables users to perform the following operations:
Figure 4 Cluster Permissions

Use different names for the index and the user.

We can see that user test only has the permission check cluster status but cannot create indexes. The configuration is successful.
If necessary, you can add the index creation permission for the role later. The returned error message provides tips on adding role permissions.