enroll-node.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [[security-api-node-enrollment]]
  2. === Enroll Node API
  3. ++++
  4. <titleabbrev>Enroll Node</titleabbrev>
  5. ++++
  6. Allows a new node to join an existing cluster with security features enabled.
  7. [[security-api-node-enrollment-api-request]]
  8. ==== {api-request-title}
  9. `GET /_security/enroll_node`
  10. [[security-api-node-enrollment-api-prereqs]]
  11. ==== {api-prereq-title}
  12. * You must have the `enroll` <<privileges-list-cluster,cluster privilege>> to use this API.
  13. [[security-api-node-enrollment-api-desc]]
  14. ==== {api-description-title}
  15. The purpose of the enroll node API is to allow a new node to join an existing cluster
  16. where security is enabled. The enroll node API response contains all the necessary information
  17. for the joining node to bootstrap discovery and security related settings so that it
  18. can successfully join the cluster.
  19. NOTE: The response contains key and certificate material that allows the
  20. caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.
  21. [[security-api-node-enrollment-api-examples]]
  22. ==== {api-examples-title}
  23. [source,console]
  24. --------------------------------------------------
  25. GET /security/enroll_node
  26. --------------------------------------------------
  27. // TEST[skip:Determine behavior for keystore with multiple keys]
  28. The API returns a response such as
  29. [source,console-result]
  30. --------------------------------------------------
  31. {
  32. "http_ca_key" : "MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=", <1>
  33. "http_ca_cert" : "MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=", <2>
  34. "transport_key" : "MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==", <3>
  35. "transport_cert" : "MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==", <4>
  36. "cluster_name" : "cluster-name", <5>
  37. "nodes_addresses" : [ <6>
  38. "192.168.1.2:9300"
  39. ]
  40. }
  41. --------------------------------------------------
  42. <1> The CA private key that can be used by the new node in order to sign its certificate
  43. for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the key.
  44. <2> The CA certificate that can be used by the new node in order to sign its certificate
  45. for the HTTP layer, as a Base64 encoded string of the ASN.1 DER encoding of the certificate.
  46. <3> The private key that the node can use for TLS for its transport layer, as a Base64 encoded
  47. string of the ASN.1 DER encoding of the key.
  48. <4> The certificate that the node can use for TLS for its transport layer, as a Base64 encoded
  49. string of the ASN.1 DER encoding of the certificate.
  50. <5> The name of the cluster the new node is joining
  51. <6> A list of transport addresses in the form of `host:port` for the nodes that are already
  52. members of the cluster.