Skip to content

Commit 98a3719

Browse files
Update elasticsearch-keystore.md with special character handling and echo command to enter the password. (#127135)
* Update elasticsearch-keystore.md Customer needs document update for handling special characters and how we can use the echo command to enter the password. * Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md Co-authored-by: Liam Thompson <[email protected]> * Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md Co-authored-by: Liam Thompson <[email protected]> * Update elasticsearch-keystore.md Moving the section out of Examples as advised. * Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md Co-authored-by: Liam Thompson <[email protected]> * Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md Co-authored-by: Liam Thompson <[email protected]> --------- Co-authored-by: Liam Thompson <[email protected]>
1 parent 2181360 commit 98a3719

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ Only some settings are designed to be read from the keystore. However, there is
8888
`-v, --verbose`
8989
: Shows verbose output.
9090

91+
## Handling special characters
92+
93+
:::{important}
94+
Improper handling of special characters can lead to authentication failures and service outages.
95+
:::
96+
97+
**Exclamation mark**: `!`
98+
: When using the shell, the combination `\!` is stored as just `!`. This can lead to authentication failures if the password is not stored as intended.
99+
100+
**Quotes**: `"`
101+
: If quotes are used around the password, they become part of the password itself. This can cause the password to be incorrect when retrieved from the keystore.
102+
103+
**Backslash**: `\`
104+
: The backslash character needs to be properly escaped. If not escaped correctly, it may be omitted or misinterpreted, leading to incorrect password storage.
91105

92106
## Examples [elasticsearch-keystore-examples]
93107

@@ -150,9 +164,13 @@ To pass the settings values through standard input (stdin), use the `--stdin` fl
150164
```sh
151165
cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
152166
```
167+
Alternatively, you can use the echo command to input the password into the keystore. For example, if the password is `your\!password` :
153168

154-
Values for multiple settings must be separated by carriage returns or newlines.
169+
```sh
170+
echo -n 'your\!password' | bin/elasticsearch-keystore add the.setting.name.to.set
171+
```
155172

173+
Values for multiple settings must be separated by carriage returns or newlines.
156174

157175
### Add files to the keystore [add-file-to-keystore]
158176

0 commit comments

Comments
 (0)