connect-clients.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ==== Connect clients to {es}
  2. // This file is reused in each of the installation pages. Ensure that any changes
  3. // you make to this file are applicable across all installation environments.
  4. When you start {es} for the first time, TLS is configured automatically for the
  5. HTTP layer. A CA certificate is generated and stored on disk at:
  6. [source,sh,subs="attributes"]
  7. ----
  8. {es-conf}{slash}certs{slash}http_ca.crt
  9. ----
  10. The hex-encoded SHA-256 fingerprint of this
  11. certificate is also output to the terminal. Any clients that connect to {es},
  12. such as the
  13. https://www.elastic.co/guide/en/elasticsearch/client/index.html[{es} Clients],
  14. {beats}, standalone {agent}s, and {ls} must validate that they trust the
  15. certificate that {es} uses for HTTPS. {fleet-server} and {fleet}-managed
  16. {agent}s are automatically configured to trust the CA certificate.
  17. Other clients can establish trust by using either the fingerprint of the CA
  18. certificate or the CA certificate itself.
  19. If the auto-configuration process already completed, you can still obtain the
  20. fingerprint of the security certificate. You can also copy the CA certificate
  21. to your machine and configure your client to use it.
  22. [discrete]
  23. ===== Use the CA fingerprint
  24. Copy the fingerprint value that's output to your terminal when {es} starts, and
  25. configure your client to use this fingerprint to establish trust when it
  26. connects to {es}.
  27. If the auto-configuration process already completed, you can still obtain the
  28. fingerprint of the security certificate by running the following command. The
  29. path is to the auto-generated CA certificate for the HTTP layer.
  30. [source,sh]
  31. ----
  32. openssl x509 -fingerprint -sha256 -in config/certs/http_ca.crt
  33. ----
  34. The command returns the security certificate, including the fingerprint.
  35. The `issuer` should be `Elasticsearch security auto-configuration HTTP CA`.
  36. [source,sh]
  37. ----
  38. issuer= /CN=Elasticsearch security auto-configuration HTTP CA
  39. SHA256 Fingerprint=<fingerprint>
  40. ----
  41. [discrete]
  42. ===== Use the CA certificate
  43. If your library doesn't support a method of validating the fingerprint, the
  44. auto-generated CA certificate is created in the following directory on each {es}
  45. node:
  46. [source,sh,subs="attributes"]
  47. ----
  48. {es-conf}{slash}certs{slash}http_ca.crt
  49. ----
  50. Copy the `http_ca.crt` file to your machine and configure your client to use this
  51. certificate to establish trust when it connects to {es}.