Skip to content

Make CE HTTPS use current Mozilla recommendations#4568

Merged
cnkk merged 6 commits intomasterfrom
allow-configurable-cipher-suites
Sep 12, 2024
Merged

Make CE HTTPS use current Mozilla recommendations#4568
cnkk merged 6 commits intomasterfrom
allow-configurable-cipher-suites

Conversation

@ruslandoga
Copy link
Copy Markdown
Contributor

@ruslandoga ruslandoga commented Sep 11, 2024

Changes

This PR continues #4491 and makes CE HTTPS follow Mozilla recommendations for "Intermediate" compatibility.


ChatGPT says this configuration suite would cover approximately 95-98% of global web clients.

This configuration would cover the vast majority of browsers, mobile devices, and modern clients, with only some very old clients (e.g., Windows XP or older Android versions) potentially being excluded.

It also excludes iPhones with iOS 8 and below.


Compared to Plug's compatible suite (used in #4491), this configuration:

  • supports TLS 1.3
  • drops TLS 1, TLS 1.1
  • enforces eccs order
  • supports x25519 ecc
  • uses currently recommended ciphers

Current SSL Labs results: https://www.ssllabs.com/ssltest/analyze.html?d=who.edify.space


Compared to Plausible Cloud, this configuration:

  • drops ciphers that SSL Labs marks as WEAK and that Mozilla doesn't recommend
  • uses ecdsa instead of rsa for keys (mostly because it is the new certbot default)

Comment thread config/runtime.exs
https_opts = [
port: https_port,
ip: listen_ip,
cipher_suite: :compatible,
Copy link
Copy Markdown
Contributor Author

@ruslandoga ruslandoga Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plug's compatible cipher suite is a bit outdated: elixir-plug/plug#1143

@ruslandoga ruslandoga changed the title Allow configurable cipher suites in CE Make CE cipher suites similar to Cloud Sep 11, 2024
@ruslandoga ruslandoga changed the title Make CE cipher suites similar to Cloud Make CE HTTPS cipher suites similar to Cloud Sep 11, 2024
Comment thread config/runtime.exs Outdated
transport_options: [socket_opts: [log_level: :warning]]
]
# the following configuration is based on https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29
# except we make the server choose the cipher preference
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that's what https://plausible.io (or rather Bunny CDN) is doing.

@ruslandoga ruslandoga changed the title Make CE HTTPS cipher suites similar to Cloud Make CE HTTPS cipher suites similar use current Mozilla recommendations Sep 11, 2024
@ruslandoga ruslandoga changed the title Make CE HTTPS cipher suites similar use current Mozilla recommendations Make CE HTTPS use current Mozilla recommendations Sep 11, 2024
@ruslandoga ruslandoga requested a review from a team September 11, 2024 12:03
@ruslandoga ruslandoga marked this pull request as ready for review September 11, 2024 12:03
@ruslandoga ruslandoga requested a review from a team September 11, 2024 12:04
Comment thread config/runtime.exs Outdated
~c"TLS_CHACHA20_POLY1305_SHA256",
# Mozilla recommended cipher suites (TLS 1.2)
~c"ECDHE-ECDSA-AES128-GCM-SHA256",
~c"ECDHE-RSA-AES128-GCM-SHA256",
Copy link
Copy Markdown
Contributor Author

@ruslandoga ruslandoga Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSA ones can be removed since certbot generates ECDSA keys by default, and we (and site_encrypt) don't provide any options to configure it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zoldar zoldar requested a review from cnkk September 12, 2024 07:59
@cnkk cnkk added this pull request to the merge queue Sep 12, 2024
Merged via the queue into master with commit 0a962e2 Sep 12, 2024
@cnkk cnkk deleted the allow-configurable-cipher-suites branch September 12, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants