diff --git a/_security/configuration/opensearch-keystore.md b/_security/configuration/opensearch-keystore.md index 8a6f3357df..3c78c9a8e3 100644 --- a/_security/configuration/opensearch-keystore.md +++ b/_security/configuration/opensearch-keystore.md @@ -48,7 +48,7 @@ The following examples provide the basic syntax for common `opensearch-keystore` ### Creating a new keystore -**Command** +The following command creates a new keystore: ```bash ./bin/opensearch-keystore create @@ -56,8 +56,6 @@ The following examples provide the basic syntax for common `opensearch-keystore` {% include copy.html %} If a keystore already exists, the script will ask whether you would like to overwrite the existing keystore. - -**Response** The script responds with a confirmation that the keystore was created: @@ -65,17 +63,37 @@ The script responds with a confirmation that the keystore was created: Created opensearch keystore in $OPENSEARCH_HOME/config/opensearch.keystore ``` +### Setting a keystore password + +The following command sets a new keystore password: + +```bash +./bin/opensearch-keystore passwd +``` +{% include copy.html %} + +If a keystore password already exists, the script will ask for the current keystore password before you can reset the password. + +**Response** + +The script responds with a confirmation that the keystore password was set successfully: + +```bash +OpenSearch keystore password changed successfully. +``` + +When starting OpenSearch you will be prompted to enter the keystore password. Alternatively, you can set the environment variable KEYSTORE_PASSWORD to avoid being prompted for password on startup. +{: .note} + ### Listing settings in the keystore -**Command** +The following commands list all setting currently in the keystore: ```bash ./bin/opensearch-keystore list ``` {% include copy.html %} -**Response** - The script responds with a list of settings in the keystore: ```bash @@ -85,26 +103,24 @@ plugins.security.ssl.http.pemkey_password_secure ### Adding a new setting +The following command adds a new keystore setting: + ```bash ./bin/opensearch-keystore add plugins.security.ssl.http.pemkey_password_secure ``` {% include copy.html %} -**Response** - After this command, you will be prompted to enter the secret key securely. ### Removing a setting -**Command** +The following command removes a keystore setting: ```bash ./bin/opensearch-keystore remove plugins.security.ssl.http.pemkey_password_secure ``` {% include copy.html %} -**Response** - No response exists for this command. To confirm that the setting was deleted, use `opensearch-keystore list`. ## KeyStore entries as OpenSearch settings