nodes-reload-secure-settings.asciidoc 3.4 KB

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