tls-ad.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [role="xpack"]
  2. [[tls-active-directory]]
  3. ==== Encrypting communications between {es} and Active Directory
  4. To protect the user credentials that are sent for authentication, it's highly
  5. recommended to encrypt communications between {es} and your Active Directory
  6. server. Connecting via SSL/TLS ensures that the identity of the Active Directory
  7. server is authenticated before {es} transmits the user credentials and the
  8. usernames and passwords are encrypted in transit.
  9. Clients and nodes that connect via SSL/TLS to the Active Directory server need
  10. to have the Active Directory server's certificate or the server's root CA
  11. certificate installed in their keystore or truststore.
  12. . Create the realm configuration for the `xpack.security.authc.realms` namespace
  13. in the `elasticsearch.yml` file. See <<configuring-ad-realm>>.
  14. . Set the `url` attribute in the realm configuration to specify the LDAPS protocol
  15. and the secure port number. For example, `url: ldaps://ad.example.com:636`.
  16. . Configure each node to trust certificates signed by the certificate authority
  17. (CA) that signed your Active Directory server certificates.
  18. +
  19. --
  20. The following example demonstrates how to trust a CA certificate (`cacert.pem`),
  21. which is located within the configuration directory:
  22. [source,shell]
  23. --------------------------------------------------
  24. xpack:
  25. security:
  26. authc:
  27. realms:
  28. active_directory:
  29. ad_realm:
  30. order: 0
  31. domain_name: ad.example.com
  32. url: ldaps://ad.example.com:636
  33. ssl:
  34. certificate_authorities: [ "ES_PATH_CONF/cacert.pem" ]
  35. --------------------------------------------------
  36. The CA cert must be a PEM encoded certificate.
  37. For more information about these settings, see <<ref-ad-settings>>.
  38. --
  39. . Restart {es}.
  40. NOTE: By default, when you configure {es} to connect to Active Directory
  41. using SSL/TLS, it attempts to verify the hostname or IP address
  42. specified with the `url` attribute in the realm configuration with the
  43. values in the certificate. If the values in the certificate and realm
  44. configuration do not match, {es} does not allow a connection to the
  45. Active Directory server. This is done to protect against man-in-the-middle
  46. attacks. If necessary, you can disable this behavior by setting the
  47. `ssl.verification_mode` property to `certificate`.