tls-http.asciidoc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [role="xpack"]
  2. [[tls-http]]
  3. ==== Encrypting HTTP Client communications
  4. When {security-features} are enabled, you can optionally use TLS to ensure that
  5. communication between HTTP clients and the cluster is encrypted.
  6. NOTE: Enabling TLS on the HTTP layer is strongly recommended but is not required.
  7. If you enable TLS on the HTTP layer in {es}, then you might need to make
  8. configuration changes in other parts of the Elastic Stack and in any {es}
  9. clients that you use.
  10. . If you have not done so already, <<node-certificates,generate node certificates>>.
  11. . Enable TLS and specify the information required to access the node’s
  12. certificate.
  13. ** If the certificate is in PKCS#12 format, add the following information to the
  14. `elasticsearch.yml` file on each node:
  15. +
  16. --
  17. [source, yaml]
  18. --------------------------------------------------
  19. xpack.security.http.ssl.enabled: true
  20. xpack.security.http.ssl.keystore.path: certs/elastic-certificates.p12 <1>
  21. xpack.security.http.ssl.truststore.path: certs/elastic-certificates.p12 <2>
  22. --------------------------------------------------
  23. <1> If you created a separate certificate for each node, then you might need to
  24. customize this path on each node. If the filename matches the node name, you can
  25. use the `certs/${node.name}.p12` format, for example.
  26. <2> The `elasticsearch-certutil` output includes the CA certificate inside the
  27. PKCS#12 keystore, therefore the keystore can also be used as the truststore.
  28. This name should match the `keystore.path` value.
  29. --
  30. ** If the certificate is in PEM format, add the following information to the
  31. `elasticsearch.yml` file on each node:
  32. +
  33. --
  34. [source, yaml]
  35. --------------------------------------------------
  36. xpack.security.http.ssl.enabled: true
  37. xpack.security.http.ssl.key: /home/es/config/node01.key <1>
  38. xpack.security.http.ssl.certificate: /home/es/config/node01.crt <2>
  39. xpack.security.http.ssl.certificate_authorities: [ "/home/es/config/ca.crt" ] <3>
  40. --------------------------------------------------
  41. <1> The full path to the node key file. This must be a location within the
  42. {es} configuration directory.
  43. <2> The full path to the node certificate. This must be a location within the
  44. {es} configuration directory.
  45. <3> An array of paths to the CA certificates that should be trusted. These paths
  46. must be a location within the {es} configuration directory.
  47. --
  48. . If you secured the node's certificate with a password, add the password to
  49. your {es} keystore:
  50. ** If the signed certificate is in PKCS#12 format, use the following commands:
  51. +
  52. --
  53. [source,shell]
  54. -----------------------------------------------------------
  55. bin/elasticsearch-keystore add xpack.security.http.ssl.keystore.secure_password
  56. bin/elasticsearch-keystore add xpack.security.http.ssl.truststore.secure_password
  57. -----------------------------------------------------------
  58. --
  59. ** If the certificate is in PEM format, use the following commands:
  60. +
  61. --
  62. [source,shell]
  63. -----------------------------------------------------------
  64. bin/elasticsearch-keystore add xpack.security.http.ssl.secure_key_passphrase
  65. -----------------------------------------------------------
  66. --
  67. . Restart {es}.
  68. [NOTE]
  69. ===============================
  70. * All TLS-related node settings are considered to be highly sensitive and
  71. therefore are not exposed via the
  72. {ref}/cluster-nodes-info.html#cluster-nodes-info[nodes info API] For more
  73. information about any of these settings, see <<security-settings>>.
  74. * {es} monitors all files such as certificates, keys, keystores, or truststores
  75. that are configured as values of TLS-related node settings. If you update any of
  76. these files (for example, when your hostnames change or your certificates are
  77. due to expire), {es} reloads them. The files are polled for changes at
  78. a frequency determined by the global {es} `resource.reload.interval.high`
  79. setting, which defaults to 5 seconds.
  80. ===============================