nodes-reload-secure-settings.asciidoc 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [[cluster-nodes-reload-secure-settings]]
  2. === Nodes reload secure settings API
  3. ++++
  4. <titleabbrev>Nodes reload secure settings</titleabbrev>
  5. ++++
  6. Reloads the keystore on nodes in the cluster.
  7. [[cluster-nodes-reload-secure-settings-api-request]]
  8. ==== {api-request-title}
  9. `POST _nodes/reload_secure_settings` +
  10. `POST _nodes/<node_id>/reload_secure_settings`
  11. [[cluster-nodes-reload-secure-settings-api-desc]]
  12. ==== {api-description-title}
  13. <<secure-settings,Secure settings>> are stored in an on-disk keystore. Certain
  14. of these settings are <<reloadable-secure-settings,reloadable>>. That is, you
  15. can change them on disk and reload them without restarting any nodes in the
  16. cluster. When you have updated reloadable secure settings in your keystore, you
  17. can use this API to reload those settings on each node.
  18. When the {es} keystore is password protected and not simply obfuscated, you must
  19. provide the password for the keystore when you reload the secure settings.
  20. Reloading the settings for the whole cluster assumes that all nodes' keystores
  21. are protected with the same password; this method is allowed only when
  22. <<tls-transport,inter-node communications are encrypted>>. Alternatively, you can
  23. reload the secure settings on each node by locally accessing the API and passing
  24. the node-specific {es} keystore password.
  25. [[cluster-nodes-reload-secure-settings-path-params]]
  26. ==== {api-path-parms-title}
  27. `<node_id>`::
  28. (Optional, string) The names of particular nodes in the cluster to target.
  29. For example, `nodeId1,nodeId2`. For node selection options, see
  30. <<cluster-nodes>>.
  31. NOTE: {es} requires consistent secure settings across the cluster nodes, but
  32. this consistency is not enforced. Hence, reloading specific nodes is not
  33. standard. It is justifiable only when retrying failed reload operations.
  34. [[cluster-nodes-reload-secure-settings-api-request-body]]
  35. ==== {api-request-body-title}
  36. `secure_settings_password`::
  37. (Optional, string) The password for the {es} keystore.
  38. [[cluster-nodes-reload-secure-settings-api-example]]
  39. ==== {api-examples-title}
  40. The following examples assume a common password for the {es} keystore on every
  41. node of the cluster:
  42. [source,console]
  43. --------------------------------------------------
  44. POST _nodes/reload_secure_settings
  45. {
  46. "secure_settings_password":"s3cr3t"
  47. }
  48. POST _nodes/nodeId1,nodeId2/reload_secure_settings
  49. {
  50. "secure_settings_password":"s3cr3t"
  51. }
  52. --------------------------------------------------
  53. // TEST[setup:node]
  54. // TEST[s/nodeId1,nodeId2/*/]
  55. The response contains the `nodes` object, which is a map, keyed by the
  56. node id. Each value has the node `name` and an optional `reload_exception`
  57. field. The `reload_exception` field is a serialization of the exception
  58. that was thrown during the reload process, if any.
  59. [source,console-result]
  60. --------------------------------------------------
  61. {
  62. "_nodes": {
  63. "total": 1,
  64. "successful": 1,
  65. "failed": 0
  66. },
  67. "cluster_name": "my_cluster",
  68. "nodes": {
  69. "pQHNt5rXTTWNvUgOrdynKg": {
  70. "name": "node-0"
  71. }
  72. }
  73. }
  74. --------------------------------------------------
  75. // TESTRESPONSE[s/"my_cluster"/$body.cluster_name/]
  76. // TESTRESPONSE[s/"pQHNt5rXTTWNvUgOrdynKg"/\$node_name/]