From 5c30a180a2bc1aacb379a371ff75ec5bc7120d47 Mon Sep 17 00:00:00 2001 From: ohemorange Date: Wed, 27 Aug 2025 16:38:08 -0700 Subject: [PATCH] Apache config update (#10443) Part of https://github.com/certbot/certbot/issues/10183 There are two changes made here: 1. Add `DHE-RSA-CHACHA20-POLY1305` to `SSLCipherSuite` list. Nice to have for compliance reasons. See https://github.com/mozilla/server-side-tls/issues/285 DHE ciphers in general are the topic of [some](https://github.com/mozilla/server-side-tls/issues/268) [debate](https://github.com/mozilla/server-side-tls/issues/299) over on the generator repo; my opinion is that certbot should match whatever they currently recommend, and if they do decide to change it, we can also update to match them again later. 2. Configure curves with `SSLOpenSSLConfCmd`. Needed for OpenSSL 3.0 support, so FFDH won't be used. This option requires apache `>=2.4.8` but we already require `>=2.4.11` to use this conf file in the first place, so that's fine. When the file in their repo was converted from `.hbs` to `.js` the version requirement was changed to `>=2.4.11` but I suspect that's a bug, and either way it's still fine. See https://github.com/mozilla/ssl-config-generator/issues/270 and https://github.com/mozilla/ssl-config-generator/pull/297 You can see a generated Apache config file here: https://ssl-config.mozilla.org/#server=apache&version=2.4.60&config=intermediate&openssl=3.4.0&guideline=5.7 Originally, I had planned to switch `SSLProtocol` list to allowlist format. It's a little nicer, though it did the same thing, technically, and would let us match mozilla, who does this because it makes their code cleaner. See https://github.com/mozilla/ssl-config-generator/pull/286/. But TLSv1.3 is only [supported](https://github.com/mozilla/ssl-config-generator/blob/master/src/js/configs.js#L12C5-L12C21) in `apache >= 2.4.36`, so we on the other hand would have to include it conditionally. Whereas despite `SSLv2` [not being available](https://github.com/mozilla/ssl-config-generator/pull/286/files#diff-3d067ee1b10453909ca9c86397a6b235fcb961ed3ca1cfbdda4daa2cb4b30b97L41) in `apache >= 2.3.16`, it still recognizes it just fine in a config. We're always `>= 2.3.16` now so we could remove it proactively, I suppose, in case apache stops recognizing it. I left it as-is here but could change it. --- certbot-apache/src/certbot_apache/_internal/constants.py | 1 + .../_internal/tls_configs/current-options-ssl-apache.conf | 3 ++- newsfragments/10443.changed | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 newsfragments/10443.changed diff --git a/certbot-apache/src/certbot_apache/_internal/constants.py b/certbot-apache/src/certbot_apache/_internal/constants.py index 14af59fa8..9c9c2f56b 100644 --- a/certbot-apache/src/certbot_apache/_internal/constants.py +++ b/certbot-apache/src/certbot_apache/_internal/constants.py @@ -33,6 +33,7 @@ ALL_SSL_OPTIONS_HASHES: list[str] = [ '61466bc2f98a623c02be8a5ee916ead1655b0ce883bdc936692076ea499ff5ce', '3fd812e3e87fe5c645d3682a511b2a06c8286f19594f28e280f17cd6af1301b5', '27155797e160fe43b6951354a0a0ca4d829e9e605b3b41fc223c20bf2f6cb3c6', + '3a6881d0a7e5740b039ec550c916105259f53b577a3d38d0ed11bd675bfeab88', ] """SHA256 hashes of the contents of previous versions of all versions of MOD_SSL_CONF_SRC""" diff --git a/certbot-apache/src/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf b/certbot-apache/src/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf index cb7583151..e8265fda5 100644 --- a/certbot-apache/src/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf +++ b/certbot-apache/src/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf @@ -8,7 +8,8 @@ SSLEngine on # Intermediate configuration, tweak to your needs SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 -SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 +SSLOpenSSLConfCmd Curves X25519:prime256v1:secp384r1 +SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305 SSLHonorCipherOrder off SSLSessionTickets off diff --git a/newsfragments/10443.changed b/newsfragments/10443.changed new file mode 100644 index 000000000..ccf7aaa8b --- /dev/null +++ b/newsfragments/10443.changed @@ -0,0 +1,3 @@ +Updated apache TLS configuration options based on changes to Mozilla's intermediate configuration recommendations. +* Added `DHE-RSA-CHACHA20-POLY1305` to `SSLCipherSuite` list for better compliance +* Configured curves using `SSLOpenSSLConfCmd` so FFDH won't be used with OpenSSL 3.0