secure-settings.asciidoc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.
  8. Adding unsupported settings to the keystore causes the validation in the
  9. `_nodes/reload_secure_settings` API to fail and if not addressed, will
  10. cause {es} to fail to start. To see whether a setting is supported in the
  11. keystore, look for a "Secure" qualifier in the setting reference.
  12. All the modifications to the keystore take effect 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": "keystore-password" <1>
  31. }
  32. ----
  33. // NOTCONSOLE
  34. <1> The password that the {es} keystore is encrypted with.
  35. This API decrypts, re-reads the entire keystore and validates all settings on
  36. every cluster node, but only the *reloadable* secure settings are applied.
  37. Changes to other settings do not go into effect until the next restart. Once
  38. the call returns, the reload has been completed, meaning that all internal data
  39. structures dependent on these settings have been changed. Everything should
  40. look as if the 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. * <<repository-azure,The Azure repository plugin>>
  46. * {plugins}/discovery-ec2-usage.html#_configuring_ec2_discovery[The EC2 discovery plugin]
  47. * <<repository-gcs,The GCS repository plugin>>
  48. * <<repository-s3,The S3 repository plugin>>
  49. * <<monitoring-settings>>
  50. * <<notification-settings>>
  51. * <<ref-jwt-settings, JWT realm>>
  52. * <<ref-ad-settings, Active Directory realm>>
  53. * <<ref-ldap-settings, LDAP realm>>
  54. * <<remote-cluster-credentials-setting, Remote cluster credentials for the API key based security model>>