WIP: Feat: Use best practice ciphers in 2020/21#1475
WIP: Feat: Use best practice ciphers in 2020/21#1475polarathene wants to merge 7 commits intodocker-mailserver:masterfrom
Conversation
Reduced excludes in
|
Changes to ConsiderChange
|
TL;DR
|
|
Thank you for the detailed justification. For this kind of changes we should be relying on an auditing tool such as https://github.com/drwetter/testssl.sh. |
Yes, that'd be a good idea. I came across that yesterday while working on this PR. It flags some features as negative, when they shouldn't be, but isn't always practical for it to know better. The linked issue is about allowing client preference for the cipher, which should be allowed when strong ciphers are only available to choose from. |
I don't think this can be applied to mail clients. Server preferred cipher order is a good practice. Mail clients are not always choosing the best cipher (android applications 👀 ). While some false positive could happened when using this kind of tool, this image should stick to "security first, optimization as fine tuning". PS: I'll try to integrate testssl to the tests :) If you know other auditing tools, I could be great to have different analyses. |
Define "best" cipher. If the OWASP ciphers are ignored, Mozilla states that all ciphers in their cipherlist are strong ciphers such that it doesn't matter which one is chosen by the client. In that case the client can choose the cipher that is best suited for it. If they're all strong, it doesn't matter if it chooses one that it can be processed more quickly. Especially when it comes to hardware encryption support (AES-NI), chacha is said to be better here in that case, the server would not know if the client has AES-NI though would it?
It does? Security isn't being compromised by this PR to the best of my knowledge (albeit I'm not a security professional).
Is this referring to Mozilla's advice to push the AES128-GCM ciphers in front of the AES256-GCM ones? They do that with server preference in mind, stating it's still safe, but when the client doesn't have preference, it's best to offer up a more performant cipher(out of a list where all are considered to be fine). I cannot say the same for the OWASP B can drop the four non-GCM variants it adds, and we'd be using OWASP A instead. Really depends on the decision to allow Do note under the statistics section in this PR notes(3rd post):
Granted, all modern browsers are only starting to enforce that later this year. Other statistics show TLS 1.2 is negotiated for 90% of secured inbound traffic, where about 90%+ of inbound traffic is encrypted. Some is from valid big tech names, but as it's arriving on port 25, it will be delivered without encryption(this is on Googles SMTP servers). Mozilla omits some of the ciphers in TLS 1.2, even though they may be still fine (postfix docs encourages not altering the cipherlist defaults it provides):
For MUAs (users submitting / retrieving email from the mail server), we can expect stronger support, and do so via the current cipherlist override and enforcing mandatory TLS. Client software won't necessarily improve unless it's required to, users that need broader compatibility need to choose a better client or understand the risks of poor support, and downgrade to Our |
I Agree. Considering the cipher list is only containing sufficiently secured ciphers, allowing the client to choose the cipher permits him to choose the most efficient cipher for his architecture, it also prevents the client to be forced to use an unadapted cipher (e.g., the server has a weaker cipher in the top its the list). source Review in progress
|
Needs confirmation on when that should be acceptable. Presently, we only use our Especially on the
But then goes on to say:
Neither of those ciphers should be used these days IIRC, that particular client is 17 years old, but I think the ciphers still are present in However, since we're talking about only inbound port 25 (other ports are fine, they use our restricted cipherlist), flawed / insecure ciphers don't matter much, the client could always choose plain text anyway.. So just allow the client to choose ciphers? When considering users submitting / retrieving email, this is over mandatory TLS and unclear how |
|
Good discussion and nice work. From my point of view there are two points to consider. One is backwards compatibility for the low security installations. Change those and there are immediately issues about ancient clients that no longer work. The other is good security and best practices for the high security (default) option. I would generally let the server select the cipher. At least when it comes to browsers it is dangerous to let the client select as it can be used for attacks. We do not control the client; the attacker does. I haven't heard of that kind of attack for mail servers, but that doesn't mean it doesn't exist. I would also prefer to have high scores in the TLS tests. Some organizations depend on getting good marks in those tests, so a top score with the default configuration is a win. Experts can change the settings, but when you don't know it is nice to get an official stamp. |
Yes, that is taken into consideration. I've only modified the support for Those using Other than that, the Cipher excludes were reduced, but parity checked. I may not have checked this correctly, as I've only tested locally on my machine(Manjaro, rolling release distro), if it's possible my local setup/openssl as a client would prevent I've not looked into yet if excludes like
This is mostly placing trust in the linked resources while I gain a better understanding myself to establish more confidence. I'm still doing some research on this and will share findings here for anyone to review. Perhaps this PR should be changed to a draft with
As discussed with @youtous and earlier in this PRs details(it's lengthy, so I don't blame anyone for not reading through all that), mandatory TLS cipherlist (at least with Mozilla's list, unsure about additions from OWASP B) is considered that all ciphers are strong, thus it doesn't matter how they're ordered/selected (order has still been respected based on OWASP/Mozilla lists), there is no risk allowing the client to choose from the mandatory list, if anything it's considered more compatible/secure (see justification response to @youtous for details). Mozilla is generic though, so it's also applied to port 25 inbound, using the same cipherlist as mandatory TLS. We don't do that here, as we opt for broader cipher support with third-party mail servers for receiving/delivering email. I believe it's still safe for clients to choose, at least on There is no enforced TLS for receiving, nor authentication on port 25, so regardless of client cipher selection, the risk may not be there? The ports the user will interact with (465, 587, 110, 143, 993, 995), is more important for strong cipher selection.
Feel free to list what tests you want to see run. I don't see this PR lowering the score, other than if client selection is enabled. Some of these tests have false positives, so good scores don't necessarily indicate confidence in better security, but in passing compliance. Still they are useful as a guide. |
|
Right. I'll be happy to merge this; however, you mentioned WIP. Is there something you want to complete first? If not I'll merge. |
|
@erik-wramner I haven't finished any mentioned TODO parts, I've only tested from my docker host(so no remote connection), and I'm still doing some more research before I'm more confident about this change. It should mostly be fine but I don't think there is an immediate need to merge it, I'll ping you when I've moved on to other things and happy with this PR :) I am aware this doesn't include updating the ciphers for the dovecot test config, I should probably do that before merging. |
|
Good. I've changed the title to WIP, change it back when you're done please. That way I can see that it is pending. |
|
Maybe adding
|
|
According to the Postfix docs, those two parameters are obsoleted by |
There was a problem hiding this comment.
Brief review over my PR, it's been a while so memory of all this is hazy, thankfully I documented this PR heavily ;)
I've been going over some TLS and server config stuff elsewhere recently, and should have some time in the near future to allocate to wrapping up this PR while that related TLS is knowledge is still fresh.
As recently requested by @Kiina I'll be checking into ECDSA support, I've learned that you're most likely to encounter clients not supporting ECDSA as mostly software from 2008 or earlier. These can be catered to with RSA as a fallback using hybrid certificates, which Postfix supports (unclear if Dovecot does, but that would be less of an issue as those clients are more likely to be modern, EDIT: It does have support for this).
These old legacy clients may not like RSA certificates either if the key size is >2048-bit, or possibly many other compatibility issues (I think SNI extension support is another, but not sure if it applies here). Any legitimate client today AFAIK should really be ok with ECDSA certs. Technically, they should still deliver to your MTA, just over an unencrypted line if the TLS handshake could not be established successfully?
|
|
||
| # SSL ciphers to use | ||
| ssl_cipher_list = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 | ||
| ssl_cipher_list = EECDHE-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-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256 |
There was a problem hiding this comment.
Note to self, typo at the start of the cipher list, EECDHE should be ECDHE.
Review PR notes on list precedence order, the last two ECDHE-RSA should have priority over DHE-RSA.
Everything seems to provide PFS, ECDSA priority over RSA is good.
| smtpd_tls_mandatory_ciphers = high | ||
| smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1,!TLSv1.1 | ||
| smtpd_tls_exclude_ciphers = aNULL, LOW, EXP, MEDIUM, ADH, AECDH, MD5, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES, eNULL | ||
| smtpd_tls_exclude_ciphers = aNULL, SEED, CAMELLIA, RSA+AES |
There was a problem hiding this comment.
Consider adding inline comment note about this, or just rely on git blame to look up the PR? Probably has related commit message, but once merged may be more of a hassle to look up. Check PR notes or commit message.
This should only affect TLS <=1.2, removed exclusions would have been explained in PR notes with some command and output to confirm the removed ones were no longer needed or shouldn't have been excluding (eg ECDSA makes little sense why that was being excluded before?)
| sed -i -r 's/^tls_high_cipherlist =.*$/tls_high_cipherlist = 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-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256/' /etc/postfix/main.cf | ||
|
|
||
| # Dovecot configuration (secure by default though) | ||
| sed -i -r 's/^ssl_min_protocol =.*$/ssl_min_protocol = TLSv1.2/' /etc/dovecot/conf.d/10-ssl.conf | ||
| sed -i -r 's/^ssl_cipher_list =.*$/ssl_cipher_list = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256/' /etc/dovecot/conf.d/10-ssl.conf | ||
| sed -i -r 's/^ssl_cipher_list =.*$/ssl_cipher_list = 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-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256/' /etc/dovecot/conf.d/10-ssl.conf |
There was a problem hiding this comment.
These two lists are identical, move them into a single variable instead of duplicate content.
| sed -i -r 's/^tls_high_cipherlist =.*$/tls_high_cipherlist = ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA/' /etc/postfix/main.cf | ||
|
|
||
| # Dovecot configuration | ||
| sed -i -r 's/^ssl_min_protocol = .*$/ssl_min_protocol = TLSv1/' /etc/dovecot/conf.d/10-ssl.conf | ||
| sed -i -r 's/^ssl_cipher_list = .*$/ssl_cipher_list = ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS/' /etc/dovecot/conf.d/10-ssl.conf | ||
| sed -i -r 's/^ssl_cipher_list = .*$/ssl_cipher_list = ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA/' /etc/dovecot/conf.d/10-ssl.conf |
There was a problem hiding this comment.
These two lists are identical, move them into a single variable instead of duplicate content.
Hybrid/Dual cert support
2015 article about hybrid/dual cert support in postfix, mentions a slight compatibility issue with an earlier openssl version, but that shouldn't matter AFAIK. Provides this config snippet (with the requirement to put ECDSA cipher suites upfront ahead of RSA): As mentioned earlier in this thread though, newer postfix (>=3.4) uses
Presumably RSA would be provided there. A related mail server project has had a similar discussion on dual-cert support. They have a related PR that points out concerns for TLSA records when DNSSEC/DANE is in use. I think this feature should be implemented separately to this PR which should just focus on the cipher suite update. |
|
This is great work @polarathene - hearing you were thinking about wrapping this PR up. What's the current status? |
|
@aendeavor if I don't have anything else come up over the next week, I should have time to allocate to wrapping this up finally :) It's mostly good, just need to follow through with my review changes and do some testing. Sorry for the delay, I didn't expect to be so busy elsewhere. |
|
Awesome. I will try getting the refactoring of EDIT: The PR introducing the refactoring is #1605 @erik-wramner I noticed the build on master, especially the |
|
Yes, your changes should make it into latest automatically. As for elk, I think we dropped that one in 7.0 when we upgraded Debian version. The elk build should be from the 6.x release, so it is quite old. Ideally we should stop building it. |
Related is the `smtpd_tls_exclude_ciphers` parameter. Mozilla doesn't include it, and while it's possible to find relatively recent blogs / guides making use of it, they often don't explain any useful reasoning for the choices. I think it has just become a bit of parroting of information and a "better safe than sorry if I don't understand this" approach. Looking at the [postfix docs](http://www.postfix.org/postconf.5.html#smtpd_tls_exclude_ciphers) we have: > List of ciphers or cipher types to exclude from the SMTP server cipher list at all TLS security levels. > Excluding valid ciphers *can create interoperability problems*. **DO NOT** exclude ciphers unless it is essential to do so. > Cipher types listed in `smtpd_tls_mandatory_exclude_ciphers` or `smtpd_tls_exclude_ciphers` are excluded from the base definition of the selected cipher grade. > The underlying cipherlists for grades other than "null" include anonymous ciphers, but these are automatically filtered out if the server is configured to ask for remote SMTP client certificates. You are very unlikely to need to take any steps to exclude anonymous ciphers, **they are excluded automatically as required**. Additionally [`aNULL` also excludes `ADH`](https://community.letsencrypt.org/t/using-lets-encrypt-certs-with-postfix/18957/8). I have verified parity of the current excluded ciphers with this reduced set. They should be clear which ciphers they're responsible for, except for `MEDIUM` which handled the two `SEED` ciphers. Since `MEDIUM` is ambiguous to what it's covering(the others are still required for parity), I have switched `MEDIUM` to `SEED`. In my testing these excluded ciphers are still graded an `A`, only anon certs that `aNULL` excludes provide a lower `F` grade, but the docs state it's a non-issue with remote connections. We could also change the `high` cipherlist to `medium` like mozilla does or keep the expanded coverage for inbound mail. Should be possible to have submission ports be considered more trustworthy and better cipher support, allowing the client to choose the cipher from the high list would be a good improvement.
`modern` TLS_LEVEL has had it's cipherlist updated to match the postfix `main.cf`change in the related prior commit. See that commit message for more details about the change. `intermediate` TLS_LEVEL has had it's cipherlist truncated. None of these appear to remain available after applying the excludes on them. If the excludes are removed, each TLS level presents ciphers(when the cipherlist is only set to this removed list) with the warning: > Forward Secrecy not supported by any cipher This is misleading when associating them with a `high` grade list intended for mandatory TLS support. Despite the warning, the nmap tool grades them all with with A for encryption strength(if that's at all trustworthy of a metric). The `intermediate` cipherlist still produces the same cipher support with the reduced list and exclusions from the previous commit.
Same changes to cipherlist as communicated in the related postfix `main.cf` commit.
There was an extra `E` accidentally in the first `ECDHE`.
This was the same content for the most part. Shared content was moved into a function call and dynamic content passed in as variables from each TLS_LEVEL case.
8d38108 to
7a264b6
Compare
|
Already had a look at the tests. The infamous |
|
Now failing with:
I'll make a commit in future then. I was hoping to get the TLS tests sorted today but had a minor setback get in the way. Once those are run if all goes well I think we only need to drop the CBC ciphers. Port 587 should be mandatory STARTTLS? |
Sounds very good to me. |
|
I'm pretty sure that 587 is mandatory STARTTLS in the released version as that question has come up before several times? Could be a false alarm. Anyway, good work on this. |
Yep, false alarm 👍 The It doesn't matter for us much as the rating is only about what protocols you're allowing, DH param size and cipher strength (only deemed it's size in bits), our supported protocols don't change, nor does DH params, and I don't see anything wrong with 128-bit ciphers like
@Kiina I have tested ECDSA certs and confirmed that Postfix is presently configured to exclude all ECDSA ciphers. Unless the mail servers sending mail to your instance are using TLS 1.3, they'd all be opting for plain text as they likely couldn't establish any TLS negotiation otherwise, as your Postfix is configured to exclude ECDSA ciphers and you're not serving an RSA cert... hence the error I believe? (I get that plenty with Good news is I've implemented dual cert support so you can provide the RSA fallback, Dovecot will use it too(Dovecot isn't excluding ECDSA ciphers so any MUA should already be fine securely retrieving mail). You'll still need this PR as well for ECDSA to be supported with Postfix (or remove the |
|
I am still actively working on this, apologies for the delay. I've been collecting and documenting a rather large amount of information regarding TLS version history, usage and cipher suite compatibility. I'll be sharing it here once it's ready as a rather comprehensive resource on the topic. It should be useful to anyone else that needs to make such a decision with confidence. If there's a need to get this PR wrapped up sooner, do let me know, otherwise I'm estimating 1-2 weeks at the latest (depending on free time I can allocate). We may want to discuss deprecating OpenSSL 3.0 (expected to be released early 2021H1) is said to be removing TLS 1.0 & 1.1 cipher suites by default, we would need to explicitly lower the security level with Perhaps something to consider for 8.0. My full report will provide more details to support the decision, the only client that seems to be a valid concern is macOS/iOS releases prior to Sep 2016 which use Apple Mail instead of an alternative like Mozilla ThunderBird. Servers (for which it matters less with port 25 deliveries) should be good from 2014 onwards (as-in the majority of deployments should have no issues for TLS 1.2 support by then). |
|
I've marked it for
If you ask me, I'm all for it. I know there is a never-ending debate on supporting old clients and versions, but I'm a supporter of having servers and clients up-to-date. I'd go for it.
That's one of the reasons I'd like to be up-to-date withut support for outdated versions. |
Yes, this is usually due to mail clients (MUA and MTA) lagging behind browsers TLS support. Often I only ever saw the concern expressed for legacy clients without much knowledge as to what fell under that umbrella and when, so I've looked into that with references for the majority of cases where that'd have been a concern, be that support for TLS version, cipher suites or ECC (ECDSA / ECDHE). I'm rather confident we can issue a deprecation notice to drop legacy support from 8.0 release and require anyone wanting to support legacy to use 7.x or a user-patches script (we could document an example in the wiki). Should I add a deprecation notice in this PR when |
|
I'd strongly recommend doing so, yes. |
|
Sorry for barging in late, but I feel we should keep support for old clients using an option, but use best practice ciphers by default. I tried to change this and there were users having problems. You can control the server, but it is not always possible to control the clients. Relegating installations to old versions that won't be patched and supported because they need to support mail clients they cannot upgrade seems less than ideal. It would be another thing if this stopped us from adopting something, but as far as I can see it doesn't. We can use whatever we like with the default modern setting and still support old clients with the legacy setting, right? |
I'm aware. When I've completed the report it'll detail everything needed to make such a decision. The only likely clients that come to mind are macOS 10.11 and iOS 9 users (prior to sep 2016 release), neither receives security updates since mid 2018.
That's understandable. I'm not going to push for it other than provide the information and references towards making that decision. TLS 1.1 for most updates came with TLS 1.2 support. So you're supporting TLS 1.0 from 1999 with a few CBC cipher suites. A new RFC advising against supporting such an old TLS version is expected to be published out of draft status sometime next year. OpenSSL 3.0 will also drop support by default, so when upgrading Debian base image at some point when it adopts the new version expect TLS 1.0 support to require additional effort to support.
Yes, I don't see any issues supporting a legacy profile (might be better to call it "legacy" rather than "intermediate"). OpenSSL 3.0 just requires us to lower the security level via cipher list string, we might have to explicitly define the cipher suites for port 25 though (presently we use postfix defaults for that port and exclude some ciphers). Unless a future update of Postfix/Dovecot drops support. macOS users that for whatever reason are unable to upgrade (systems older than year 2010) are only affected by mail apps that use Secure Transport (Apple TLS), such as Apple Mail. They could use web mail clients or alternatives that use a different TLS implementation like Thunderbird and be ok. iOS users unable to upgrade to iOS 10 seems to be devices from 2012 and earlier? Support for iOS 9 ended in 2019. It really depends how long you want to officially support that vs direct admins towards a wiki entry for legacy deployments to handle themselves (user patch). Since both macOS and iOS versions affected no longer receive updates, they've reached EOL status? I already know of one mail host that's only offering TLS 1.2 as a minimum since this year, I've not checked support on popular services yet. @erik-wramner So are we leaving "intermediate" as-is and not logging a deprecation notice about TLS 1.0/1.1 being dropped in a future release? |
|
@polarathene as long as it works I don't mind the warning. As you say it will be removed by upstream eventually and I certainly don't plan on supporting it at that point. However, as long as it is supported by upstream I would ideally not want to rock the boat for those admins who have to manage old clients. When you mention it I think iOS devices were the main source of problems last time. |
|
@polarathene I will close this PR in this repository as we just migrated to docker-mailserver/docker-mailserver. Please re-open your PR over there. This PR is very much awaited :D |
|
Yes sorry, been a busy month, I still intend to complete this. Heads up that very soon default renewals of LetsEncrypt will be on a new root certificate that older devices without will fail to trust it. May possibly affect some older macOS / iOS clients from connecting to a mailserver. Just in case you get reports all of a sudden of breakage, it's possibly due to that switch over. They can use Thunderbird or install a new root certificate directly into their affected devices. |
|
Just FYI: Please do not re-open this PR, but open a new one. That's because of (ugly) merge conflicts that would appear as some files have moved. |
This PR updates the cipherlists based on the guidance from Mozilla and OWASP best practices.
I've referenced this Feb 2018 discussion and PR for guidance on what needed to be updated.
Modern TLS_LEVEL
OWASP cipherlists(github repo) last updated April 2019 according to git blame, commit. OWASP B (Broad Compatibility) has been chosen.
OWASP B - Cipherlist TLS 1.2
Multi-line for better scanning over:
Mozilla cipherlists last updated Jan 2020 (guidelines 5.4). Intermediate configuration has been chosen:
Mozilla Intermediate - Cipherlist TLS 1.2
Multi-line for better scanning over:
See the links for more details about the advised cipherlists and compatibility / rationale.
Breakdown of changes to the `modern` cipherlist
Moved to the front of the list:AES128-GCM-SHA256may be weaker but is still considered quite secure, thus has been positioned to the front of the list for performance reasons according to mozilla. If clients were permitted to select the cipher preference, they could ask for something stronger(or chacha if no AES-NI support?).Neither OWASP or Mozilla include the following two ciphers, so they've been removed. I think they may have been in a previous cipherlist from Mozilla when this list was last updated?
Mozilla ends its list with these two:
OWASP B adds non-GCM DHE variants, and retains the last two ciphers in the current list. These are the only difference between OWASP A and B grades, so could be dropped if choosing to opt for grade A instead:
OWASP B also lists 3 TLS 1.3 ciphers, but these rarely need to be specified for most software, as such they're not included:
If any reviewer is not confident about understanding the cipher suite names, this is a good article on the topic, Wikipedia also has a table on ciphers, which are apparently all covered through TLS 1.0-1.2?