secure-settings.asciidoc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. [float]
  9. [[creating-keystore]]
  10. === Creating the keystore
  11. To create the `elasticsearch.keystore`, use the `create` command:
  12. [source,sh]
  13. ----------------------------------------------------------------
  14. bin/elasticsearch-keystore create
  15. ----------------------------------------------------------------
  16. The file `elasticsearch.keystore` will be created alongside `elasticsearch.yml`.
  17. [float]
  18. [[list-settings]]
  19. === Listing settings in the keystore
  20. A list of the settings in the keystore is available with the `list` command:
  21. [source,sh]
  22. ----------------------------------------------------------------
  23. bin/elasticsearch-keystore list
  24. ----------------------------------------------------------------
  25. [float]
  26. [[add-string-to-keystore]]
  27. === Adding string settings
  28. Sensitive string settings, like authentication credentials for cloud
  29. plugins, can be added using the `add` command:
  30. [source,sh]
  31. ----------------------------------------------------------------
  32. bin/elasticsearch-keystore add the.setting.name.to.set
  33. ----------------------------------------------------------------
  34. The tool will prompt for the value of the setting. To pass the value
  35. through stdin, use the `--stdin` flag:
  36. [source,sh]
  37. ----------------------------------------------------------------
  38. cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
  39. ----------------------------------------------------------------
  40. [float]
  41. [[remove-settings]]
  42. === Removing settings
  43. To remove a setting from the keystore, use the `remove` command:
  44. [source,sh]
  45. ----------------------------------------------------------------
  46. bin/elasticsearch-keystore remove the.setting.name.to.remove
  47. ----------------------------------------------------------------