Skip to content

Conversation

@sanchezl
Copy link
Contributor

@sanchezl sanchezl commented Nov 13, 2025

Update DefaultCiphers() to align with Mozilla SSL Configuration Guidelines (latest) Intermediate profile. Remove deprecated CBC-mode ciphers and RSA key exchange ciphers that lack perfect forward secrecy.

This PR replaces #1964 with broader scope to match the complete Mozilla intermediate profile recommendations.

Reference: https://ssl-config.mozilla.org/guidelines/latest.json

@sanchezl sanchezl changed the title crypto: drop weak TLS ciphers OCPBUGS-17349: crypto: drop weak TLS ciphers Nov 13, 2025
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 13, 2025
@openshift-ci-robot
Copy link

@sanchezl: This pull request references Jira Issue OCPBUGS-17349, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "4.20.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Update DefaultCiphers() to align with Mozilla SSL Configuration Guidelines (latest) Intermediate profile. Remove deprecated CBC-mode ciphers and RSA key exchange ciphers that lack perfect forward secrecy.

This PR replaces #1964 with broader scope to match the complete Mozilla intermediate profile recommendations.

Reference: https://ssl-config.mozilla.org/guidelines/latest.json

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sanchezl sanchezl changed the title OCPBUGS-17349: crypto: drop weak TLS ciphers OCPBUGS-17349: crypto: remove deprecated TLS ciphers Nov 13, 2025
@sanchezl
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 13, 2025
@openshift-ci-robot
Copy link

@sanchezl: This pull request references Jira Issue OCPBUGS-17349, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @xingxingxia

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

//
// These API resources allow cluster administrators to choose between Old, Intermediate,
// Modern, or Custom TLS profiles. Components should observe these settings.
func DefaultCiphers() []uint16 {
Copy link
Contributor

Choose a reason for hiding this comment

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

How are we going to test if the updated list doesn't break the platform ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think all we can do is test as we update each repo and monitor for issues post-merge. A few points to consider:

Go's cipher suite preference ordering:
Since Go 1.17 (ref), Go enforces a cipher suite ordering preference for all Go clients. This means all Go-based clients (which is most of OpenShift) should have been preferring the stronger ciphers anyway, even when the weaker ones were available.

Testing strategy:

  • I've created a proof PR (#2836 in cluster-network-operator) to demonstrate the changes work in at least one repo. Tools in this repo do not seem to directly read the cluster level TLS config. This repo was also explicitly called out in the original issue.
  • Standard e2e tests will exercise TLS connections across the platform
  • The CI suite should catch any immediate TLS negotiation failures

Real risk:
The danger lies in clients (especially non-Go ones) that only support one of the removed ciphers, preventing negotiation from selecting one of the supported ciphers. I'll keep an eye out for these, but I would be surprised if we find one as the supported ciphers have been around for a long time now and are widely supported.

Post-merge monitoring:
We should monitor for TLS handshake failures after this merges, particularly from:

  • Older automation tools
  • Non-Go clients (curl, openssl-based tools, etc.)
  • Third-party integrations

// TestDefaultCiphersAgainstMozillaGuidelines fetches the latest Mozilla SSL configuration
// guidelines and compares them with our DefaultCiphers() to detect drift from recommendations.
//
// This test reports but does not fail when discrepancies are found, as we may intentionally
Copy link
Contributor

Choose a reason for hiding this comment

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

If this test never fails, we won’t be able to detect any drift.
not sure if we need that test then.

Copy link
Member

Choose a reason for hiding this comment

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

Just a suggestion in case we want to keep the test.

It'd be nice to download a versioned of the file (it seems like 5.7 is the latest one) and commit it as a fixture. Then we can add a script + make target to update the fixture.

In order to make the test useful, we could make the test fail (not only log) and hardcode the current drift. That way, the test becomes a contract and any future changes (in the guidelines or in our code) will need to be manually checked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bertinatto I took a stab at your suggestion.

@p0lyn0mial p0lyn0mial added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2025
@sanchezl sanchezl force-pushed the update-default-ciphersuites branch from b830b8a to 7ed68dd Compare November 14, 2025 13:19
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // required by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens if a client wants to use deprecated ciphers? Will it fail to establish a TLS connection with the server?

Copy link
Contributor

Choose a reason for hiding this comment

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

and if that client is our customer, what would be our response to such an incident?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What happens if a client wants to use deprecated ciphers? Will it fail to establish a TLS connection?

Yes, if a client only supports the removed ciphers and doesn't support any of the remaining ones, the TLS handshake will fail.

and if that client is our customer, what would be our response to such an incident?

Our response would be that these ciphers were removed due to security vulnerabilities.

Note that a customer client would most likely interact with either a route or the API Server. Both of these components have configurable TLS profiles and are, in effect, not directly affected by this update.

Also, note that this update brings the defaults more in line with the OpenShift's pre-defined TLS profiles, which do not contain the deprecated ciphers being removed. There is a slight discrepancy with regards to the DHE profiles which were removed (superseded by ECDHE) for performance issues, and never in our list of default ciphers, but are still in our intermediate TLS profile.

As for components that are not configurable, there is an effort to find and fix this: https://issues.redhat.com/browse/OCPSTRAT-769

tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // required by HTTP/2
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
Copy link
Contributor

Choose a reason for hiding this comment

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

since this bug was raised by the product security team, would it make sense to ask them for a review to double check we removed all weak ciphers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reached out to the product security team.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@p0lyn0mial I have heard back from Product Security. It will be a while before they can have a technical review, so I suggest we proceed with merging. Given that this PR is removing weak ciphers (not adding new capabilities), if their future review identifies any issues, we can address them in a follow-up.

Update DefaultCiphers() to align with Mozilla SSL Configuration
Guidelines 5.7 Intermediate profile. Remove deprecated CBC-mode ciphers
and RSA key exchange ciphers that lack perfect forward secrecy.
@sanchezl sanchezl force-pushed the update-default-ciphersuites branch from 7ed68dd to 2ba049b Compare November 14, 2025 18:07

// TestDefaultCiphersAgainstMozillaGuidelines compares our DefaultCiphers() with the Mozilla TLS
// configuration guidelines stored in testfiles/mozilla-guidelines.json.
func TestDefaultCiphersAgainstMozillaGuidelines(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If I’m not mistaken, this test is static and requires manual intervention to update the guidelines. This means it may fail when we change our defaults.

I’m not sure whether we should follow these guidelines strictly.
Is there a requirement to follow the guidelines ?

The test also doesn’t specify what to do when we need to drift. What would that require?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means it may fail when we change our defaults.

Yes

The test also doesn’t specify what to do when we need to drift. What would that require?

The test error message instructs you to run make update-mozilla-guidelines on failure. If we no longer follow the recommendations, then we can drop the test at that time and

Is there a requirement to follow the guidelines ?

No. We followed them, and I continue to follow them, because the Mozilla SSL/TLS Configuration Guidelines are continuously updated by their security experts and so far, have always been in sync with industry consensus on these matters.

// TLS 1.2 cipher suites with ECDHE + AEAD
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m wondering how we decided which ciphers to remove.

If I’m not mistaken, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 appears in the old section of the guideline.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. Found it I think that the ask is to remove deprecated CBC-mode ciphers and RSA key exchange ciphers that lack perfect forward secrecy.

tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // required by HTTP/2
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, // forbidden by http/2, not flagged by http2isBadCipher() in go1.8
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
tls.TLS_RSA_WITH_AES_128_GCM_SHA256, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of RSA key exchange, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This suite does not provide Forward Secrecy.

tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
tls.TLS_RSA_WITH_AES_128_GCM_SHA256, // forbidden by http/2
tls.TLS_RSA_WITH_AES_256_GCM_SHA384, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of RSA key exchange, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This suite does not provide Forward Secrecy.

// tls.TLS_RSA_WITH_AES_128_CBC_SHA256,
// tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, // forbidden by http/2, disabled to mitigate SWEET32 attack
// tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, // forbidden by http/2, disabled to mitigate SWEET32 attack
tls.TLS_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of RSA key exchange and CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This suite does not provide Forward Secrecy.
CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

// tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, // forbidden by http/2, disabled to mitigate SWEET32 attack
// tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, // forbidden by http/2, disabled to mitigate SWEET32 attack
tls.TLS_RSA_WITH_AES_128_CBC_SHA, // forbidden by http/2
tls.TLS_RSA_WITH_AES_256_CBC_SHA, // forbidden by http/2
Copy link
Contributor

Choose a reason for hiding this comment

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

removed because of RSA key exchange and CBC encryption, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This suite does not provide Forward Secrecy.
CBC ciphers in TLS are vulnerable to padding oracle and timing attacks.

@sanchezl sanchezl force-pushed the update-default-ciphersuites branch from 2ba049b to 4a03f7c Compare November 19, 2025 16:40
@p0lyn0mial
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: p0lyn0mial, sanchezl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b90c784 and 2 for PR HEAD 4a03f7c in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

@sanchezl: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 88c26bf into openshift:master Nov 19, 2025
4 checks passed
@openshift-ci-robot
Copy link

@sanchezl: Jira Issue OCPBUGS-17349: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-17349 has been moved to the MODIFIED state.

Details

In response to this:

Update DefaultCiphers() to align with Mozilla SSL Configuration Guidelines (latest) Intermediate profile. Remove deprecated CBC-mode ciphers and RSA key exchange ciphers that lack perfect forward secrecy.

This PR replaces #1964 with broader scope to match the complete Mozilla intermediate profile recommendations.

Reference: https://ssl-config.mozilla.org/guidelines/latest.json

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

simonpasquier added a commit to simonpasquier/cluster-monitoring-operator that referenced this pull request Nov 20, 2025
This commit pulls openshift/library-go#2051.

Signed-off-by: Simon Pasquier <[email protected]>
simonpasquier added a commit to simonpasquier/cluster-monitoring-operator that referenced this pull request Nov 20, 2025
This commit pulls openshift/library-go#2051.

Signed-off-by: Simon Pasquier <[email protected]>
wking added a commit to wking/cluster-version-operator that referenced this pull request Dec 2, 2025
Pulling in openshift/library-go@4a03f7ce49 (crypto: drop weak TLS
ciphers, 2025-11-14, openshift/library-go#2051).  Generated with:

  $ go get github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.24.0 linux/amd64
wking added a commit to wking/cluster-version-operator that referenced this pull request Dec 3, 2025
Pulling in openshift/library-go@4a03f7ce49 (crypto: drop weak TLS
ciphers, 2025-11-14, openshift/library-go#2051).  Generated with:

  $ go get github.com/openshift/library-go@master
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.24.0 linux/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants