fix: Relax openssl security level for intermediate TLS_LEVEL#2193
Conversation
Although these two config lines have not changed since `debian:buster-slim` image, Dovecot seems to now be affected by it which results in rejecting cipher suites below TLS v1.2. To continue supporting the `intermediate` TLS_LEVEL, we now need to relax the global config. Dovecot could alternatively be given a modified openssl config to only affect it's interaction with openssl. Postfix is unaffected and continues to support TLS <1.2 cipher suites when configured to.
|
This comment is asking about improving error output from when test failure happens, as it would help better debug failures in future. @NorseGaud do you have any It outputs an empty value as that's what is returned due to failed handshake preventing logged value in the testssl JSON output file (that I would really like the failure to indicate what part of the sub-test failed, eg each top-level test calls docker-mailserver/test/security_tls_cipherlists.bats Lines 90 to 99 in 54ee1e7 I don't think bats allows for nested tests like this. I could perhaps split the file apart, or somehow provide a better error message? Right now it only shows failure scoped too far up the chain: |
Hey hey! In the next version of bats, we can actually start getting really verbose output that shows the exact commands being run and their STDOUT/ERR. You have to wrap stuff in Checkout the master branch of Output ExampleThis doesn't show the exact nested test/sub commands inside of the function though. For those, you could wrap them in Output Example |
Description
This fixes the TLS test errors for upgrading the base image to Debian Bullseye 🎉
Change for
TLS_LEVEL=intermediateTLS_LEVEL=intermediatenow modifiesopenssl.cnf(affects all software using OpenSSL defaults) to lower the minimum TLS protocol version to 1.0 (from 1.2) and theDEFAULT@SECLEVELfrom 2 (upstream debian default) to 1 (upstream openssl default).It doesn't appear to be required by Dovecot in Debian Buster, but seems to fix Debian Bullseye. Postfix AFAIK is explicitly ignoring that config when we customize our TLS support. Not sure what changed between Dovecot versions for behaviour to require it in Bullseye.
It's probably not a concern for most users, especially since it affects only
TLS_LEVEL=intermediatewhere security is less of a priority vs broader compatibility. The plan is to eventually remove it again, although that implies TLS >= 1.2, probably makingTLS_LEVEL=intermediateredundant.Original message
The DH params issue turned out to be unrelated.
The Dovecot upgrade additionally seems to now follow the
openssl.cnfconfig for minimum TLS version and security level, both which can reduce supported cipher suites. This config file itself has not changed from what thedebian:buster-slimimage provides.To continue supporting the
intermediateTLS_LEVEL, we now need to relax the global config. Dovecot could alternatively be given a modified openssl config to only affect it's interaction with openssl.Postfix is unaffected and continues to support TLS <1.2 cipher suites when configured to.
I got lucky troubleshooting by discovering this Dovecot mail list thread, where someone described the actual solution for why Dovecot was disobeying it's own config.
We should deprecate TLS <v1.2 as discussed earlier in Nov 2020. Although back in Aug 2020 some users are still using almost decade old IMAP clients.. OpenSSL 3.0 also recently was released, though I suppose we don't have to worry about that until upgrading the image after Bullseye :)
Type of change
Checklist: