Creating a User and Granting Permissions by Using Kibana
Prerequisites
The security mode has been enabled for the cluster.
Parameter Description
Parameter |
Description |
---|---|
Permission |
Single action, for example, creating an index (for example, indices:admin/create) |
Action group |
A group of permissions. For example, the predefined SEARCH action group grants roles permissions to use _search and _msearchAPI. |
Role |
A role is a combination of permissions and action groups, including operation permissions on clusters, indexes, documents, or fields. |
Backend role |
(Optional) Other external roles from the backend such as LDAP/Active Directory |
User |
A user can send operation requests to the Elasticsearch cluster. The user has credentials such as username and password, zero or more backend roles, and zero or more custom attributes. |
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 each role to multiple users or backend roles. |
Procedure
- The Kibana UI varies depending on the Kibana version, but their operations are similar. This section takes Kibana 7.6.2 as an example to describe the procedure.
- You can customize the username, role name, and tenant name in Kibana.
- Log in to the CSS management console.
- Choose Clusters in the navigation pane. On the Clusters page, locate the target cluster and click Access Kibana in the Operation column.
Enter the administrator username and password to log in to Kibana.
- Username: admin (default administrator account name)
- Password: Enter the administrator password you set when creating the cluster in security mode.
Figure 1 Login page
- Click the Security icon on the Kibana operation page.
Figure 2 Going to the Security page
- Create a user.
- Choose Authentication Backends > Internal Users Database.
Figure 3 Adding a user (1)
- On the Internal Users Database page, choose . The page for adding user information is displayed.
Figure 4 Adding a user (2)
- On the user creation page, configure Username and Password, and click Submit.
The user will be displayed in the user list.
- Choose Authentication Backends > Internal Users Database.
- Configure roles and permissions for the user.
- Click Roles.
Figure 5 Adding a role
- On the Open Distro Security Roles page, click .
- Enter a role name on the Overview page.
Figure 6 Entering a role name
- Configure CSS cluster permissions on the Cluster Permissions page. Set cluster permissions based on service requirements. If this parameter is not specified for a role, the role has no cluster-level permissions.
You can set cluster permissions in Permissions: Action Groups. For example, if you select the read permission for a cluster, you can only view information such as the cluster status and cluster nodes.
After selecting Show Advanced, you can also configure Permissions: Single Permissions. For example, if the single permission is set to indices:data/read, the indexes can only be read.
Figure 7 Cluster Permissions tab
- Configure index permissions on the Index Permissions page.
Index patterns: Set this parameter to the name of the index whose permission needs to be configured. For example, my_store.
Use different names for the index and the user.
Configure Permissions: Action Groups as required, for example, select the read-only permission Search.
- On the Tenant Permissions page, set role permissions based on service requirements.
In Global permissions, you can select kibana_all_read or kibana_all_write to set the Kibana read and write permissions for the role.
You can add tenant patterns in the Tenant Permissions tab and set the kibana_all_read or kibana_all_write permission for the new tenant patterns.Figure 8 Tenant Permissions tab
After the configuration is complete, the role will be displayed.
- Enter a role name on the Overview page.
- Click Roles.
- Assign a role to the user.
- Click Role Mappings.
Figure 9 Role mapping
- Click to add the mapping between users and roles.
Figure 10 Users and roles
- Click Submit.
- Click Role Mappings.
- Verify that the configuration takes effect in Kibana.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot