secure-settings.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [[secure-settings]]
  2. === Secure Settings
  3. Some settings are sensitive, and relying on filesystem permissions to protect
  4. their values is not sufficient. For this use case, Elasticsearch provides a
  5. keystore, which may be password protected, and the `elasticsearch-keystore`
  6. tool to manage the settings in the keystore.
  7. NOTE: All commands here should be run as the user which will run Elasticsearch.
  8. NOTE: Only some settings are designed to be read from the keystore. See
  9. documentation for each setting to see if it is supported as part of the keystore.
  10. [float]
  11. [[creating-keystore]]
  12. === Creating the keystore
  13. To create the `elasticsearch.keystore`, use the `create` command:
  14. [source,sh]
  15. ----------------------------------------------------------------
  16. bin/elasticsearch-keystore create
  17. ----------------------------------------------------------------
  18. The file `elasticsearch.keystore` will be created alongside `elasticsearch.yml`.
  19. [float]
  20. [[list-settings]]
  21. === Listing settings in the keystore
  22. A list of the settings in the keystore is available with the `list` command:
  23. [source,sh]
  24. ----------------------------------------------------------------
  25. bin/elasticsearch-keystore list
  26. ----------------------------------------------------------------
  27. [float]
  28. [[add-string-to-keystore]]
  29. === Adding string settings
  30. Sensitive string settings, like authentication credentials for cloud
  31. plugins, can be added using the `add` command:
  32. [source,sh]
  33. ----------------------------------------------------------------
  34. bin/elasticsearch-keystore add the.setting.name.to.set
  35. ----------------------------------------------------------------
  36. The tool will prompt for the value of the setting. To pass the value
  37. through stdin, use the `--stdin` flag:
  38. [source,sh]
  39. ----------------------------------------------------------------
  40. cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
  41. ----------------------------------------------------------------
  42. [float]
  43. [[remove-settings]]
  44. === Removing settings
  45. To remove a setting from the keystore, use the `remove` command:
  46. [source,sh]
  47. ----------------------------------------------------------------
  48. bin/elasticsearch-keystore remove the.setting.name.to.remove
  49. ----------------------------------------------------------------