Skip to content

Commit

Permalink
Add documentation for setting the OpenSearch keystore password (#6795)
Browse files Browse the repository at this point in the history
* Add documentation for setting the OpenSearch keystore password

Signed-off-by: Craig Perkins <[email protected]>

* Verb tense

Signed-off-by: Craig Perkins <[email protected]>

* Update opensearch-keystore.md

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
  • Loading branch information
cwperks and Naarcha-AWS authored Apr 4, 2024
1 parent 88cde9d commit cc3c11f
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions _security/configuration/opensearch-keystore.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,52 @@ 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
```
{% 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:

```bash
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
Expand All @@ -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
Expand Down

0 comments on commit cc3c11f

Please sign in to comment.