ssl-settings.asciidoc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ==== {component} TLS/SSL settings
  2. You can configure the following TLS/SSL settings.
  3. ifdef::server[]
  4. +{ssl-prefix}.ssl.enabled+::
  5. Used to enable or disable TLS/SSL. The default is `false`.
  6. endif::server[]
  7. +{ssl-prefix}.ssl.supported_protocols+::
  8. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-supported-protocols]
  9. ifdef::server[]
  10. +{ssl-prefix}.ssl.client_authentication+::
  11. Controls the server's behavior in regard to requesting a certificate
  12. from client connections. Valid values are `required`, `optional`, and `none`.
  13. `required` forces a client to present a certificate, while `optional`
  14. requests a client certificate but the client is not required to present one.
  15. ifndef::client-auth-default[]
  16. Defaults to `none`.
  17. endif::client-auth-default[]
  18. ifdef::client-auth-default[]
  19. Defaults to +{client-auth-default}+.
  20. endif::client-auth-default[]
  21. endif::server[]
  22. ifdef::verifies[]
  23. +{ssl-prefix}.ssl.verification_mode+::
  24. Controls the verification of certificates.
  25. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-verification-mode-values]
  26. endif::verifies[]
  27. +{ssl-prefix}.ssl.cipher_suites+::
  28. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-cipher-suites-values]
  29. [#{ssl-context}-tls-ssl-key-trusted-certificate-settings]
  30. ===== {component} TLS/SSL key and trusted certificate settings
  31. The following settings are used to specify a private key, certificate, and the
  32. trusted certificates that should be used when communicating over an SSL/TLS connection.
  33. ifdef::server[]
  34. A private key and certificate must be configured.
  35. endif::server[]
  36. ifndef::server[]
  37. A private key and certificate are optional and would be used if the server requires client authentication for PKI
  38. authentication.
  39. endif::server[]
  40. ===== PEM encoded files
  41. When using PEM encoded files, use the following settings:
  42. +{ssl-prefix}.ssl.key+::
  43. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-key-pem]
  44. +{ssl-prefix}.ssl.key_passphrase+::
  45. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-key-passphrase]
  46. +{ssl-prefix}.ssl.secure_key_passphrase+ (<<secure-settings,Secure>>)::
  47. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-secure-key-passphrase]
  48. +{ssl-prefix}.ssl.certificate+::
  49. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-certificate]
  50. +{ssl-prefix}.ssl.certificate_authorities+::
  51. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-certificate-authorities]
  52. ===== Java keystore files
  53. When using Java keystore files (JKS), which contain the private key, certificate
  54. and certificates that should be trusted, use the following settings:
  55. +{ssl-prefix}.ssl.keystore.path+::
  56. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-path]
  57. +{ssl-prefix}.ssl.keystore.password+::
  58. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-password]
  59. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  60. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-password]
  61. +{ssl-prefix}.ssl.keystore.key_password+::
  62. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-key-password]
  63. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  64. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-key-password]
  65. +{ssl-prefix}.ssl.truststore.path+::
  66. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-path]
  67. +{ssl-prefix}.ssl.truststore.password+::
  68. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-password]
  69. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  70. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-secure-password]
  71. [#{ssl-context}-pkcs12-files]
  72. ===== PKCS#12 files
  73. {es} can be configured to use PKCS#12 container files (`.p12` or `.pfx` files)
  74. that contain the private key, certificate and certificates that should be trusted.
  75. PKCS#12 files are configured in the same way as Java keystore files:
  76. +{ssl-prefix}.ssl.keystore.path+::
  77. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-path]
  78. +{ssl-prefix}.ssl.keystore.type+::
  79. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-type-pkcs12]
  80. +{ssl-prefix}.ssl.keystore.password+::
  81. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-password]
  82. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  83. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-password]
  84. +{ssl-prefix}.ssl.keystore.key_password+::
  85. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-key-password]
  86. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  87. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-key-password]
  88. +{ssl-prefix}.ssl.truststore.path+::
  89. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-path]
  90. +{ssl-prefix}.ssl.truststore.type+::
  91. Set this to `PKCS12` to indicate that the truststore is a PKCS#12 file.
  92. //TBD:Should this use the ssl-truststore-type-pkcs11 or ssl-truststore-type definition and default values?
  93. +{ssl-prefix}.ssl.truststore.password+::
  94. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-password]
  95. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  96. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-secure-password]
  97. [#{ssl-context}-pkcs11-tokens]
  98. ===== PKCS#11 tokens
  99. {es} can be configured to use a PKCS#11 token that contains the private key,
  100. certificate and certificates that should be trusted.
  101. PKCS#11 token require additional configuration on the JVM level and can be enabled
  102. via the following settings:
  103. +{ssl-prefix}.keystore.type+::
  104. Set this to `PKCS11` to indicate that the PKCS#11 token should be used as a keystore.
  105. //TBD: Is the default value `jks`?
  106. +{ssl-prefix}.truststore.type+::
  107. include::{es-repo-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-type-pkcs11]
  108. [NOTE]
  109. When configuring the PKCS#11 token that your JVM is configured to use as
  110. a keystore or a truststore for Elasticsearch, the PIN for the token can be
  111. configured by setting the appropriate value to `ssl.truststore.password`
  112. or `ssl.truststore.secure_password` in the context that you are configuring.
  113. Since there can only be one PKCS#11 token configured, only one keystore and
  114. truststore will be usable for configuration in {es}. This in turn means
  115. that only one certificate can be used for TLS both in the transport and the
  116. http layer.