secure-settings.asciidoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 and the `elasticsearch-keystore` tool to manage the settings in the keystore.
  6. NOTE: All commands here should be run as the user which will run Elasticsearch.
  7. NOTE: Only some settings are designed to be read from the keystore. See
  8. documentation for each setting to see if it is supported as part of the keystore.
  9. NOTE: All the modifications to the keystore take affect only after restarting
  10. Elasticsearch.
  11. NOTE: The elasticsearch keystore currently only provides obfuscation. In the future,
  12. password protection will be added.
  13. [float]
  14. [[creating-keystore]]
  15. === Creating the keystore
  16. To create the `elasticsearch.keystore`, use the `create` command:
  17. [source,sh]
  18. ----------------------------------------------------------------
  19. bin/elasticsearch-keystore create
  20. ----------------------------------------------------------------
  21. The file `elasticsearch.keystore` will be created alongside `elasticsearch.yml`.
  22. [float]
  23. [[list-settings]]
  24. === Listing settings in the keystore
  25. A list of the settings in the keystore is available with the `list` command:
  26. [source,sh]
  27. ----------------------------------------------------------------
  28. bin/elasticsearch-keystore list
  29. ----------------------------------------------------------------
  30. [float]
  31. [[add-string-to-keystore]]
  32. === Adding string settings
  33. Sensitive string settings, like authentication credentials for cloud
  34. plugins, can be added using the `add` command:
  35. [source,sh]
  36. ----------------------------------------------------------------
  37. bin/elasticsearch-keystore add the.setting.name.to.set
  38. ----------------------------------------------------------------
  39. The tool will prompt for the value of the setting. To pass the value
  40. through stdin, use the `--stdin` flag:
  41. [source,sh]
  42. ----------------------------------------------------------------
  43. cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
  44. ----------------------------------------------------------------
  45. [float]
  46. [[remove-settings]]
  47. === Removing settings
  48. To remove a setting from the keystore, use the `remove` command:
  49. [source,sh]
  50. ----------------------------------------------------------------
  51. bin/elasticsearch-keystore remove the.setting.name.to.remove
  52. ----------------------------------------------------------------