ssl-settings.asciidoc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. ===== {component} TLS/SSL Key and Trusted Certificate Settings
  35. The following settings are used to specify a private key, certificate, and the
  36. trusted certificates that should be used when communicating over an SSL/TLS connection.
  37. ifdef::server[]
  38. A private key and certificate must be configured.
  39. endif::server[]
  40. ifndef::server[]
  41. A private key and certificate are optional and would be used if the server requires client authentication for PKI
  42. authentication.
  43. endif::server[]
  44. If none of the settings below are specified, the {ref}/security-settings.html#ssl-tls-settings[Default TLS/SSL Settings] are used.
  45. ===== PEM Encoded Files
  46. When using PEM encoded files, use the following settings:
  47. +{ssl-prefix}.ssl.key+::
  48. Path to a PEM encoded file containing the private key.
  49. +{ssl-prefix}.ssl.key_passphrase+::
  50. The passphrase that is used to decrypt the private key. This value is optional
  51. as the key might not be encrypted.
  52. +{ssl-prefix}.ssl.secure_key_passphrase+ (<<secure-settings,Secure>>)::
  53. The passphrase that is used to decrypt the private key. This value is optional
  54. as the key might not be encrypted.
  55. +{ssl-prefix}.ssl.certificate+::
  56. Path to a PEM encoded file containing the certificate (or certificate chain)
  57. that will be presented when requested.
  58. +{ssl-prefix}.ssl.certificate_authorities+::
  59. List of paths to the PEM encoded certificate files that should be trusted.
  60. ===== Java Keystore Files
  61. When using Java keystore files (JKS), which contain the private key, certificate
  62. and certificates that should be trusted, use the following settings:
  63. +{ssl-prefix}.ssl.keystore.path+::
  64. Path to the keystore that holds the private key and certificate.
  65. +{ssl-prefix}.ssl.keystore.password+::
  66. Password to the keystore.
  67. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  68. Password to the keystore.
  69. +{ssl-prefix}.ssl.keystore.key_password+::
  70. Password for the private key in the keystore. Defaults to the
  71. same value as +{ssl-prefix}.ssl.keystore.password+.
  72. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  73. Password for the private key in the keystore.
  74. +{ssl-prefix}.ssl.truststore.path+::
  75. Path to the truststore file.
  76. +{ssl-prefix}.ssl.truststore.password+::
  77. Password to the truststore.
  78. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  79. Password to the truststore.
  80. ===== PKCS#12 Files
  81. {es} can be configured to use PKCS#12 container files (`.p12` or `.pfx` files)
  82. that contain the private key, certificate and certificates that should be trusted.
  83. PKCS#12 files are configured in the same way as Java Keystore Files:
  84. +{ssl-prefix}.ssl.keystore.path+::
  85. Path to the PKCS#12 file that holds the private key and certificate.
  86. +{ssl-prefix}.ssl.keystore.type+::
  87. Set this to `PKCS12` to indicate that the keystore is a PKCS#12 file.
  88. +{ssl-prefix}.ssl.keystore.password+::
  89. Password to the PKCS#12 file.
  90. +{ssl-prefix}.ssl.keystore.secure_password+ (<<secure-settings,Secure>>)::
  91. Password to the PKCS#12 file.
  92. +{ssl-prefix}.ssl.keystore.key_password+::
  93. Password for the private key stored in the PKCS#12 file.
  94. Defaults to the same value as +{ssl-prefix}.ssl.keystore.password+.
  95. +{ssl-prefix}.ssl.keystore.secure_key_password+ (<<secure-settings,Secure>>)::
  96. Password for the private key stored in the PKCS#12 file.
  97. +{ssl-prefix}.ssl.truststore.path+::
  98. Path to the PKCS#12 file that holds the certificates to be trusted.
  99. +{ssl-prefix}.ssl.truststore.type+::
  100. Set this to `PKCS12` to indicate that the truststore is a PKCS#12 file.
  101. +{ssl-prefix}.ssl.truststore.password+::
  102. Password to the PKCS#12 file.
  103. +{ssl-prefix}.ssl.truststore.secure_password+ (<<secure-settings,Secure>>)::
  104. Password to the PKCS#12 file.
  105. ===== PKCS#11 Tokens
  106. {es} can be configured to use a PKCS#11 token that contains the private key,
  107. certificate and certificates that should be trusted.
  108. PKCS#11 token require additional configuration on the JVM level and can be enabled
  109. via the following settings:
  110. +{ssl-prefix}.keystore.type+::
  111. Set this to `PKCS11` to indicate that the PKCS#11 token should be used as a keystore.
  112. +{ssl-prefix}.truststore.type+::
  113. Set this to `PKCS11` to indicate that the PKCS#11 token should be used as a truststore.
  114. [NOTE]
  115. When configuring the PKCS#11 token that your JVM is configured to use as
  116. a keystore or a truststore for Elasticsearch, the PIN for the token can be
  117. configured by setting the appropriate value to `ssl.truststore.password`
  118. or `ssl.truststore.secure_password` in the context that you are configuring.
  119. Since there can only be one PKCS#11 token configured, only one keystore and
  120. truststore will be usable for configuration in {es}. This in turn means
  121. that only one certificate can be used for TLS both in the transport and the
  122. http layer.