nodes-reload-secure-settings.asciidoc 3.5 KB

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