connect-clients.asciidoc 2.0 KB

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