ssl-settings.asciidoc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ==== {component} TLS/SSL Settings
  2. You can configure the following TLS/SSL settings. If the settings are not configured,
  3. the {ref}/security-settings.html#ssl-tls-settings[Default TLS/SSL Settings]
  4. are used.
  5. ifdef::server[]
  6. +{ssl-prefix}.ssl.enabled+::
  7. Used to enable or disable TLS/SSL. The default is `false`.
  8. endif::server[]
  9. +{ssl-prefix}.ssl.supported_protocols+::
  10. Supported protocols with versions. Valid protocols: `SSLv2Hello`,
  11. `SSLv3`, `TLSv1`, `TLSv1.1`, `TLSv1.2`, `TLSv1.3`. Defaults to `TLSv1.3,TLSv1.2,TLSv1.1` if
  12. the JVM supports TLSv1.3, otherwise `TLSv1.2,TLSv1.1`.
  13. ifdef::server[]
  14. +{ssl-prefix}.ssl.client_authentication+::
  15. Controls the server's behavior in regard to requesting a certificate
  16. from client connections. Valid values are `required`, `optional`, and `none`.
  17. `required` forces a client to present a certificate, while `optional`
  18. requests a client certificate but the client is not required to present one.
  19. ifndef::client-auth-default[]
  20. Defaults to `none``.
  21. endif::client-auth-default[]
  22. ifdef::client-auth-default[]
  23. Defaults to +{client-auth-default}+.
  24. endif::client-auth-default[]
  25. endif::server[]
  26. ifdef::verifies[]
  27. +{ssl-prefix}.ssl.verification_mode+::
  28. Controls the verification of certificates. Valid values are `none`,
  29. `certificate`, and `full`. Defaults to `full`.
  30. endif::verifies[]
  31. +{ssl-prefix}.ssl.cipher_suites+::
  32. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  33. Java Cryptography Architecture documentation]. Defaults to ``.
  34. [#{ssl-context}-tls-ssl-key-trusted-certificate-settings]
  35. ===== {component} TLS/SSL Key and Trusted Certificate Settings
  36. The following settings are used to specify a private key, certificate, and the
  37. trusted certificates that should be used when communicating over an SSL/TLS connection.
  38. ifdef::server[]
  39. A private key and certificate must be configured.
  40. endif::server[]
  41. ifndef::server[]
  42. A private key and certificate are optional and would be used if the server requires client authentication for PKI
  43. authentication.
  44. endif::server[]
  45. If none of the settings below are specified, the {ref}/security-settings.html#ssl-tls-settings[Default TLS/SSL Settings] are used.
  46. ===== PEM Encoded Files
  47. When using PEM encoded files, use the following settings:
  48. +{ssl-prefix}.ssl.key+::
  49. Path to a PEM encoded file containing the private key.
  50. +{ssl-prefix}.ssl.key_passphrase+::
  51. The passphrase that is used to decrypt the private key. This value is optional
  52. as the key might not be encrypted.
  53. +{ssl-prefix}.ssl.secure_key_passphrase+ (<<secure-settings,Secure>>)::
  54. The passphrase that is used to decrypt the private key. This value is optional
  55. as the key might not be encrypted.
  56. +{ssl-prefix}.ssl.certificate+::
  57. Path to a PEM encoded file containing the certificate (or certificate chain)
  58. that will be presented when requested.
  59. +{ssl-prefix}.ssl.certificate_authorities+::
  60. List of paths to the PEM encoded certificate files that should be trusted.
  61. ===== Java Keystore Files
  62. When using Java keystore files (JKS), which contain the private key, certificate
  63. and certificates that should be trusted, use the following settings:
  64. +{ssl-prefix}.ssl.keystore.path+::
  65. Path to the keystore that holds the private key and certificate.
  66. +{ssl-prefix}.ssl.keystore.password+::
  67. Password to the keystore.
  68. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  69. Password to the keystore.
  70. +{ssl-prefix}.ssl.keystore.key_password+::
  71. Password for the private key in the keystore. Defaults to the
  72. same value as +{ssl-prefix}.ssl.keystore.password+.
  73. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  74. Password for the private key in the keystore.
  75. +{ssl-prefix}.ssl.truststore.path+::
  76. Path to the truststore file.
  77. +{ssl-prefix}.ssl.truststore.password+::
  78. Password to the truststore.
  79. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  80. Password to the truststore.
  81. [#{ssl-context}-pkcs12-files]
  82. ===== PKCS#12 Files
  83. {es} can be configured to use PKCS#12 container files (`.p12` or `.pfx` files)
  84. that contain the private key, certificate and certificates that should be trusted.
  85. PKCS#12 files are configured in the same way as Java Keystore Files:
  86. +{ssl-prefix}.ssl.keystore.path+::
  87. Path to the PKCS#12 file that holds the private key and certificate.
  88. +{ssl-prefix}.ssl.keystore.type+::
  89. Set this to `PKCS12` to indicate that the keystore is a PKCS#12 file.
  90. +{ssl-prefix}.ssl.keystore.password+::
  91. Password to the PKCS#12 file.
  92. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  93. Password to the PKCS#12 file.
  94. +{ssl-prefix}.ssl.keystore.key_password+::
  95. Password for the private key stored in the PKCS#12 file.
  96. Defaults to the same value as +{ssl-prefix}.ssl.keystore.password+.
  97. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  98. Password for the private key stored in the PKCS#12 file.
  99. +{ssl-prefix}.ssl.truststore.path+::
  100. Path to the PKCS#12 file that holds the certificates to be trusted.
  101. +{ssl-prefix}.ssl.truststore.type+::
  102. Set this to `PKCS12` to indicate that the truststore is a PKCS#12 file.
  103. +{ssl-prefix}.ssl.truststore.password+::
  104. Password to the PKCS#12 file.
  105. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  106. Password to the PKCS#12 file.
  107. [#{ssl-context}-pkcs11-tokens]
  108. ===== PKCS#11 Tokens
  109. {es} can be configured to use a PKCS#11 token that contains the private key,
  110. certificate and certificates that should be trusted.
  111. PKCS#11 token require additional configuration on the JVM level and can be enabled
  112. via the following settings:
  113. +{ssl-prefix}.keystore.type+::
  114. Set this to `PKCS11` to indicate that the PKCS#11 token should be used as a keystore.
  115. +{ssl-prefix}.truststore.type+::
  116. Set this to `PKCS11` to indicate that the PKCS#11 token should be used as a truststore.
  117. [NOTE]
  118. When configuring the PKCS#11 token that your JVM is configured to use as
  119. a keystore or a truststore for Elasticsearch, the PIN for the token can be
  120. configured by setting the appropriate value to `ssl.truststore.password`
  121. or `ssl.truststore.secure_password` in the context that you are configuring.
  122. Since there can only be one PKCS#11 token configured, only one keystore and
  123. truststore will be usable for configuration in {es}. This in turn means
  124. that only one certificate can be used for TLS both in the transport and the
  125. http layer.