-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document and git-ignore the new keystore provided by beats #618
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
.DS_Store | ||
*.pyc | ||
/apm-server.iml | ||
|
||
/apm-server.keystore | ||
/approvals | ||
/apm-server | ||
/apm-server.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
////////////////////////////////////////////////////////////////////////// | ||
//// This content is shared by all Elastic Beats. Make sure you keep the | ||
//// descriptions here generic enough to work for all Beats that include | ||
//// this file. When using cross references, make sure that the cross | ||
//// references resolve correctly for any files that include this one. | ||
//// Use the appropriate variables defined in the index.asciidoc file to | ||
//// resolve Beat names: beatname_uc and beatname_lc | ||
//// Use the following include to pull this content into a doc file: | ||
//// include::../../libbeat/docs/keystore.asciidoc[] | ||
////////////////////////////////////////////////////////////////////////// | ||
|
||
[[keystore]] | ||
=== Secrets keystore | ||
|
||
When you configure {beatname_uc}, you might need to specify sensitive settings, | ||
such as passwords. Rather than relying on file system permissions to protect | ||
these values, you can use the {beatname_uc} keystore to securely store secret | ||
values for use in configuration settings. | ||
|
||
After adding a key and its secret value to the keystore, you can use the key in | ||
place of the secret value when you configure sensitive settings. | ||
|
||
The syntax for referencing keys is identical to the syntax for environment | ||
variables: | ||
|
||
`${KEY}` | ||
|
||
Where KEY is the name of the key. | ||
|
||
For example, imagine that the keystore contains a key called `ES_PWD` with the | ||
value `yourelasticsearchpassword`: | ||
|
||
* In the configuration file, use `output.elasticsearch.password: "${ES_PWD}"` | ||
* On the command line, use: `-E "output.elasticsearch.password=${ES_PWD}"` | ||
|
||
When {beatname_uc} unpacks the configuration, it resolves keys before resolving | ||
environment variables and other variables. | ||
|
||
Notice that the {beatname_uc} keystore differs from the Elasticsearch keystore. | ||
Whereas the Elasticsearch keystore lets you store `elasticsearch.yml` values by | ||
name, the {beatname_uc} keystore lets you specify arbitrary names that you can | ||
reference in the {beatname_uc} configuration. | ||
|
||
To create and manage keys, use the `keystore` command. See the | ||
<<keystore-command,command reference>> for the full command syntax, including | ||
optional flags. | ||
|
||
NOTE: The `keystore` command must be run by the same user who will run | ||
{beatname_uc}. | ||
|
||
[float] | ||
[[creating-keystore]] | ||
=== Create a keystore | ||
|
||
To create a secrets keystore, use: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
{beatname_lc} keystore create | ||
---------------------------------------------------------------- | ||
|
||
|
||
{beatname_uc} creates the keystore in the directory defined by the `path.config` | ||
configuration setting. | ||
|
||
[float] | ||
[[add-keys-to-keystore]] | ||
=== Add keys | ||
|
||
To store sensitive values, such as authentication credentials for Elasticsearch, | ||
use the `keystore add` command: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
{beatname_lc} keystore add ES_PWD | ||
---------------------------------------------------------------- | ||
|
||
|
||
When prompted, enter a value for the key. | ||
|
||
To overwrite an existing key's value, use the `--force` flag: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
{beatname_lc} keystore add ES_PWD --force | ||
---------------------------------------------------------------- | ||
|
||
To pass the value through stdin, use the `--stdin` flag. You can also use | ||
`--force`: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
cat /file/containing/setting/value | {beatname_lc} keystore add ES_PWD --stdin --force | ||
---------------------------------------------------------------- | ||
|
||
|
||
[float] | ||
[[list-settings]] | ||
=== List keys | ||
|
||
To list the keys defined in the keystore, use: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
{beatname_lc} keystore list | ||
---------------------------------------------------------------- | ||
|
||
|
||
[float] | ||
[[remove-settings]] | ||
=== Remove keys | ||
|
||
To remove a key from the keystore, use: | ||
|
||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------- | ||
{beatname_lc} remove ES_PWD | ||
---------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above