nodes-reload-secure-settings.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. [[cluster-nodes-reload-secure-settings]]
  2. === Nodes reload secure settings API
  3. ++++
  4. <titleabbrev>Nodes reload secure settings</titleabbrev>
  5. ++++
  6. The cluster nodes reload secure settings API is used to re-load the keystore on each node.
  7. [source,console]
  8. --------------------------------------------------
  9. POST _nodes/reload_secure_settings
  10. POST _nodes/nodeId1,nodeId2/reload_secure_settings
  11. --------------------------------------------------
  12. // TEST[setup:node]
  13. // TEST[s/nodeId1,nodeId2/*/]
  14. The first command reloads the keystore on each node. The seconds allows
  15. to selectively target `nodeId1` and `nodeId2`. The node selection options are
  16. detailed <<cluster-nodes,here>>.
  17. NOTE: {es} requires consistent secure settings across the cluster nodes, but this consistency is not enforced.
  18. Hence, reloading specific nodes is not standard. It is only justifiable when retrying failed reload operations.
  19. ==== Reload Password Protected Secure Settings
  20. When the {es} keystore is password protected and not simply obfuscated, the password for the keystore needs
  21. to be provided in the request to reload the secure settings.
  22. Reloading the settings for the whole cluster assumes that all nodes' keystores are protected with the same password
  23. and is only allowed when {ref}/configuring-tls.html#tls-transport[node to node communications are encrypted]
  24. [source,js]
  25. --------------------------------------------------
  26. POST _nodes/reload_secure_settings
  27. {
  28. "reload_secure_settings": "s3cr3t" <1>
  29. }
  30. --------------------------------------------------
  31. // NOTCONSOLE
  32. <1> The common password that the {es} keystore is encrypted with in every node of the cluster.
  33. Alternatively the secure settings can be reloaded on a per node basis, locally accessing the API and passing the
  34. node-specific {es} keystore password.
  35. [source,js]
  36. --------------------------------------------------
  37. POST _nodes/_local/reload_secure_settings
  38. {
  39. "reload_secure_settings": "s3cr3t" <1>
  40. }
  41. --------------------------------------------------
  42. // NOTCONSOLE
  43. <1> The password that the {es} keystore is encrypted with on the local node.
  44. [float]
  45. [[rest-reload-secure-settings]]
  46. ==== REST Reload Secure Settings Response
  47. The response contains the `nodes` object, which is a map, keyed by the
  48. node id. Each value has the node `name` and an optional `reload_exception`
  49. field. The `reload_exception` field is a serialization of the exception
  50. that was thrown during the reload process, if any.
  51. [source,console-result]
  52. --------------------------------------------------
  53. {
  54. "_nodes": {
  55. "total": 1,
  56. "successful": 1,
  57. "failed": 0
  58. },
  59. "cluster_name": "my_cluster",
  60. "nodes": {
  61. "pQHNt5rXTTWNvUgOrdynKg": {
  62. "name": "node-0"
  63. }
  64. }
  65. }
  66. --------------------------------------------------
  67. // TESTRESPONSE[s/"my_cluster"/$body.cluster_name/]
  68. // TESTRESPONSE[s/"pQHNt5rXTTWNvUgOrdynKg"/\$node_name/]