Reset the password for the default elastic account of your Alibaba Cloud Elasticsearch cluster. This affects access to both the cluster and its Kibana console.
Prerequisites
An Alibaba Cloud Elasticsearch cluster is available. Create an Alibaba Cloud Elasticsearch cluster.
Usage notes
Password reset applies only to the elastic account and does not affect other accounts. Avoid using the elastic account for programmatic access. Instead, create custom users with the required permissions. Manage user permissions with Elasticsearch X-Pack roles.
Password reset does not restart the cluster.
Procedure
Log on to the Alibaba Cloud Elasticsearch console.
In the left navigation menu, choose Elasticsearch Clusters.
Navigate to the target cluster.
In the top navigation bar, select the resource group to which the cluster belongs and the region where the cluster resides.
On the Elasticsearch Clusters page, find the cluster and click its ID.
In the left navigation pane, click Security.
In the Network Settings section, to the right of Elasticsearch Cluster Password, click Reset Password.
In the Reset Password panel, enter and confirm the new password for the elastic account.
Click OK.
The new password takes effect in about 5 minutes.
Reset the password of a custom user
The password of the elastic account is reset from the console (see the preceding Procedure section). To reset the password of a custom user, use Kibana or the API.
Reset the password in Kibana
Log on to the Kibana console with the elastic account and the cluster access password.
In the left-side navigation pane, choose Management > Stack Management.
In the Security section, click Users.
Find the target user and click Edit.
Click Change password, enter a new password, and save it. If the password is reset, the message "Your password has been changed." appears.
Reset the password by using the API
Run the following command in Dev Tools of the Kibana console:
POST _xpack/security/user/{username}/_password
{
"password": "<new password>"
}Replace {username} with the username of the target account. If the request is successful, the API returns HTTP status code 200.
Password rules
The password must be 8 to 30 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
Cluster status limits
You cannot reset a password while the cluster is in the Updating state, for example, while the elastic account password is being reset. Wait until the cluster change is complete before you try again.