Lindorm Search Engine lets you create and delete users and grant or revoke permissions using API operations. The available permissions are READ, WRITE, and ADMIN, and they can be applied at either the GLOBAL or TABLE (index) scope. This topic describes how to manage users and their permissions in Lindorm Search Engine.
Precautions
The user and permission management feature of Lindorm Search Engine is in public preview. To use this feature, contact Lindorm technical support on DingTalk using the ID s0s3eg3.
User management
When you activate Lindorm Search Engine, a default user is automatically created with a default username and password. This user has global administrative (GLOBAL ADMIN) permissions. For more information about how to retrieve the default username and password, see View connection information.
Only users with global administrative permissions can create or delete users, and grant or revoke permissions.
Create a user
Syntax
PUT _plugins/_security/api/user/<username>Parameter description
Parameter type | Parameter name | Description |
Path parameter | username | The username for the new user. |
Request body parameter | password | The password for the new user. The format is |
New users are created without any permissions. A user with global administrative (GLOBAL ADMIN) permissions must assign permissions to the new user. After permissions are granted, the server-side accepts and executes requests from the user that are within their assigned permission scope. For more information about how to grant permissions, see Permission management.
Example
PUT _plugins/_security/api/user/newuser
{
"password": "test***"
}Result validation
Retrieve the user list to verify that the user was created. For more information, see Get the user list.
Change a password
Syntax
PUT _plugins/_security/api/accountParameter description
Parameter type | Parameter name | Description |
Request body parameter | user | The username of the user whose password you want to change. The format is |
password | The new password. The format is |
Example
PUT _plugins/_security/api/account
{
"user": "newuser",
"password": "newpassword"
}Get the user list
Syntax
GET _plugins/_security/api/userExample
GET _plugins/_security/api/userGet details of a specific user
Syntax
GET _plugins/_security/api/user/<username>Parameter description
Parameter type | Parameter name | Description |
Path parameter | username | The user whose details you want to get. |
Example
GET _plugins/_security/api/user/newuserDelete a user
Syntax
DELETE _plugins/_security/api/user/<username>Parameter description
Parameter type | Parameter name | Description |
Path parameter | username | The user to delete. |
Example
DELETE _plugins/_security/api/user/newuserVerifying the Results
Retrieve the user list to verify that the user was deleted. For more information, see Get the user list.
Permission management
Lindorm Search Engine supports three types of permissions: READ, WRITE, and ADMIN. You can also specify a scope for these permissions.
Permission scope | Description |
GLOBAL |
|
TABLE |
|
Manage user permissions
Syntax
POST _plugins/_security/api/user/<username>Only Lindorm Search Engine V3.8.3 and later support POST requests. For more information about how to view or upgrade your current version, see Search Engine version guide and Minor version update.
Parameter description
Path parameter
username: The user to grant or revoke permissions for.
Request body parameters
Parameter | Required | Description |
op | Yes | Specifies the operation to perform. The format is
|
scope | No | Specifies the scope for the permission operation. Currently, only |
table | No | Specifies the index for which to grant or revoke permissions. The format is |
actions | Yes | The permissions to grant or revoke. The format is
For more information, see Examples. |
The scope and table parameters both define the permission scope. Use only one of these parameters in your request.
Examples
Example 1: Grant global administrative permissions to the user
test.POST _plugins/_security/api/user/test { "op": "add", "permissions": { "scope": "GLOBAL", "actions": ["ADMIN"] } }Example 2: Grant read and write permissions on the
index1index to the usertest.POST _plugins/_security/api/user/test { "op": "add", "permissions": { "table": "index1", "actions": ["READ", "WRITE"] } }Example 3: Revoke the read permission on the
index1index from the usertest.POST _plugins/_security/api/user/test { "op": "revoke", "permissions": { "table": "index1", "actions": ["READ"] } }
Result validation
To verify that the operation was successful, view the permissions of the test user. For more information, see Get details of a specific user.