secure-settings.asciidoc 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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, {es} provides a
  5. keystore and the <<elasticsearch-keystore,`elasticsearch-keystore` tool>> to
  6. manage the settings in the keystore.
  7. IMPORTANT: Only some settings are designed to be read from the keystore. However,
  8. the keystore has no validation to block unsupported settings. Adding unsupported
  9. settings to the keystore causes {es} to fail to start. To see whether a setting
  10. is supported in the keystore, look for a "Secure" qualifier the setting
  11. reference.
  12. All the modifications to the keystore take affect only after restarting {es}.
  13. These settings, just like the regular ones in the `elasticsearch.yml` config file,
  14. need to be specified on each node in the cluster. Currently, all secure settings
  15. are node-specific settings that must have the same value on every node.
  16. [discrete]
  17. [[reloadable-secure-settings]]
  18. === Reloadable secure settings
  19. Just like the settings values in `elasticsearch.yml`, changes to the keystore
  20. contents are not automatically applied to the running {es} node. Re-reading
  21. settings requires a node restart. However, certain secure settings are marked as
  22. *reloadable*. Such settings can be <<cluster-nodes-reload-secure-settings, re-read and applied on a running node>>.
  23. The values of all secure settings, *reloadable* or not, must be identical
  24. across all cluster nodes. After making the desired secure settings changes,
  25. using the `bin/elasticsearch-keystore add` command, call:
  26. [source,console]
  27. ----
  28. POST _nodes/reload_secure_settings
  29. {
  30. "secure_settings_password": "s3cr3t" <1>
  31. }
  32. ----
  33. // NOTCONSOLE
  34. <1> The password that the {es} keystore is encrypted with.
  35. This API decrypts and re-reads the entire keystore, on every cluster node,
  36. but only the *reloadable* secure settings are applied. Changes to other
  37. settings do not go into effect until the next restart. Once the call returns,
  38. the reload has been completed, meaning that all internal data structures
  39. dependent on these settings have been changed. Everything should look as if the
  40. settings had the new value from the start.
  41. When changing multiple *reloadable* secure settings, modify all of them on each
  42. cluster node, then issue a <<cluster-nodes-reload-secure-settings, `reload_secure_settings`>>
  43. call instead of reloading after each modification.
  44. There are reloadable secure settings for:
  45. * {plugins}/repository-azure-client-settings.html[The Azure repository plugin]
  46. * {plugins}/discovery-ec2-usage.html#_configuring_ec2_discovery[The EC2 discovery plugin]
  47. * {plugins}/repository-gcs-client.html[The GCS repository plugin]
  48. * {plugins}/repository-s3-client.html[The S3 repository plugin]
  49. * <<monitoring-settings>>