Skip to content

Add "cipher-suites" option to the "tls" block

Artem Boldariev requested to merge 3504-tls-cipher-suites into main

This merge request adds the ability to set allowed cipher suites as well as set their priority for the TLSv1.3 protocol. It does that by extending the tls block with the cipher-suits option backed by theSSL_CTX_set_ciphersuites() function. It complements the similar ciphers options, which is TLSv1.2 only. We have encountered multiple times that users tried to change the available TLS ciphers in their TLSv1.3-only installations but failed to do so as we do not provide the related configuration option.

I think we have a good and minimalistic set of TLS-related configuration options; this is the only one I find lacking, as I always alter this setting in other software configurations.

The option is modelled after similar ones found in other software (like tls-ciphersuites in OpenVPN, SSLCipherSuite TLSv1.3 ... in Apache available since version 2.4.36 or ciphersuites in HAProxy, etc).

That should make BIND more compatible with other products with TLS support, making configuration migrations easier and making it better prepared for wider TLSv1.3 adoption, which we are likely to face during the next stable version lifespan (9.20).

Additionally to that, having this option allows or makes it much easier:

  1. deploying only the select cipher suites in the deployments where it is mandatory for policy reasons. Previously, it would have been easier to go with TLSv1.2 only in this case;
  2. disabling non-hardware-assisted cipher suites to prevent a remote attacker from imposing higher than necessary CPU load by selecting the cipher suites implemented only in software (pretty much all non-AES cipher suites on most hardware).

Last but not least, the MR adds a set of tests that verify that selecting different TLS versions works, as before most of our TLS-related tests used TLSv1.2 as we needed to support older OpenSSL versions, and it was not clear how to verify that in a portable way. This MR fixes that omission.

Parts of the documentation updates are going to be backported to 9.18.

Closes #3504 (closed)

Edited by Artem Boldariev

Merge request reports