core
core copied to clipboard
`ssl_profile` option uses less secure cryptography than Mozilla documents
The problem
I have ssl_profile
set to modern
and according to Mozilla's site https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility linked from the docs https://www.home-assistant.io/integrations/http/#ssl_profile it should only support TLS1.3 with authenticated/forward-secret ciphers:
0x13,0x01 - TLS_AES_128_GCM_SHA256 TLSv1.3 Kx=any Au=any Enc=AESGCM(128) Mac=AEAD
0x13,0x02 - TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD
0x13,0x03 - TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any Au=any Enc=CHACHA20/POLY1305(256) Mac=AEAD
but Qualsys TLS tests report that HomeAssistant is also accepting TLS1.2 connections with CBC-based ciphers (which are not as secure). See my test results here: https://www.ssllabs.com/ssltest/analyze.html?d=ha.nerdhouse.io&s=2a02%3a8010%3a64b4%3a9%3a0%3a0%3a0%3ad
I'm not running HomeAssistant through a reverse-proxy, as can be seen by the HTTP server info at the bottom of the test page. My expectation here is that TLS1.2 is not accepted by HomeAssistant at all, as per the Mozilla spec.
What version of Home Assistant Core has the issue?
core-2022.4.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
http documentation http source (message by IssueLinks)
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (http
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
https://github.com/home-assistant/core/blob/a59460a23336627d0bc12b1eefffdaa516e55e87/homeassistant/util/ssl.py#L19-L46 This code needs updating as per the Mozilla spec
Hi @frebib, If you are able to find the code, you should consider creating a PR.
I'd be happy to. Note that this change would disable TLS1.2 for anyone not changing the default ssl_profile
option, which I'm assuming is the vast majority of users. I don't know how much of a problem this would be, but it'll certainly cause some upset.
I wonder if we could add a warning to manually set https://www.home-assistant.io/integrations/http#ssl_profile if we detect TLS1.2 being used and then after some time update the SSL profiles to latest revision of Mozilla's ones.
If we were to produce a warning, the only real suggestion that could be made would be to downgrade the profile to the intermediate and significantly less secure option. Could we correct the profiles but also add an option to override the TLS versions allowed separately?
Would you also accept a PR to s/ssl/tls/ as SSL isn't really a thing any more.
Well yeah the only option would be to downgrade but that's the point when a user wants to use an unsupported encryption.
I have to admit that I don't know enough about any of this, which is the reason why we decided to follow the Mozilla profiles to begin with. I don't think that we should allow deviating from that.
The website linked below has a decent matrix of when support for TLS 1.3 was added to various browsers. Generally, support was added sometime between 2018 and 2020 for most of the major browsers. So I would assume that most users are probably using an updated version that supports 1.3 by now. But this might knock out older tablets and phones that are used to display dashboards around the house.
Do the analytics that are collected expose the browser that is used? If so, that could be used to see how much of an impact this could be.
The other thing to keep in mind is that this won't just impact users accessing Home Assistant - it will also impact any integration that uses inbound connections such as webhooks (as in the SmartThings integration) or to access camera snapshots, for instance.
Browser support matrix: https://caniuse.com/tls1-3
Also, for what it's worth, Cloudflare does not yet recommend restricting traffic to only TLS 1.3: https://developers.cloudflare.com/ssl/edge-certificates/additional-options/minimum-tls/#decide-what-version-to-use
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.