Skip to content

Add enhancement spec for centralized TLS configuration and enforcement#1910

Merged
openshift-merge-bot[bot] merged 42 commits intoopenshift:masterfrom
richardsonnick:centralized-tls-config
Mar 4, 2026
Merged

Add enhancement spec for centralized TLS configuration and enforcement#1910
openshift-merge-bot[bot] merged 42 commits intoopenshift:masterfrom
richardsonnick:centralized-tls-config

Conversation

@richardsonnick
Copy link
Copy Markdown
Contributor

@richardsonnick richardsonnick commented Dec 16, 2025

Centralized and Enforced TLS Configuration Enhancement

This enhancement proposes a mechanism to ensure all OpenShift components honor the centralized TLS security profile configuration, addressing a gap in TLS policy enforcement across the platform.

Summary

Currently, many OpenShift components hardcode TLS settings or rely on library defaults rather than respecting cluster-wide TLS configuration. This creates security vulnerabilities and blocks Post-Quantum Cryptography (PQC) readiness.

This proposal introduces a tlsAdherence field that allows gradual adoption of strict TLS enforcement, providing a safe upgrade path for customers.

Key Features

  • Safe upgrade path: New tlsAdherence field with Legacy (default) and Strict modes
  • Backwards compatible: Defaults to existing behavior, requires explicit opt-in
  • Comprehensive: Applies to core platform components and layered products
  • Feature gated: Controlled by TLSAdherenceStrict feature gate during transition

Why This Matters

  • Enables consistent cryptographic policy enforcement across all components
  • Unblocks PQC readiness initiatives
  • Allows customers to enforce custom TLS profiles for compliance requirements
  • Prevents components from ignoring configured cipher/TLS version restrictions

Related Work

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 16, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 16, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@richardsonnick richardsonnick changed the title Initialize proposal Add enhancement spec for centralized TLS configuration and enforcement Dec 16, 2025
@richardsonnick richardsonnick marked this pull request as ready for review December 16, 2025 16:34
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 16, 2025
@openshift-ci openshift-ci Bot requested review from jotak and spadgett December 16, 2025 16:35
Comment thread enhancements/security/centralized-tls-config.md Outdated
Comment thread enhancements/security/centralized-tls-config.md
Comment thread enhancements/security/centralized-tls-config.md Outdated

1. **Fetch TLS configuration** from the appropriate central source:
- **API Server configuration** (`apiserver.config.openshift.io/cluster`) - For most components that should match the API server TLS profile
- **Kubelet configuration** - For components running on nodes that need to match node-level TLS settings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we get more details on how one should pick this flavor + some concrete examples?
Case in point: monitoring deploys the node-exporter to all (Linux) nodes via a DaemonSet to collect node metrics. Right now we rely on the API server configuration settings to configure TLS, should we rather switch to Kubelet settings?

Corollary question: what's the use case for different API and kubelet TLS settings?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@simonpasquier did you ever manage to figure this out? In your case, I think it makes sense to follow apiservers since monitoring isn't directly aligned with the kubelet component itself.

Comment thread enhancements/security/centralized-tls-config.md Outdated
Comment thread enhancements/security/centralized-tls-config.md Outdated

**Rejected because**: This adds significant complexity and goes against the goal of centralized configuration. The three existing configuration points (API Server, Kubelet, Ingress) already provide sufficient granularity.

## Open Questions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From what I can tell, the proposal focuses on TLS server configuration. I assume that TLS client configuration is out of scope. Asking the question because Prometheus scrapes metrics from operators/operands via HTTPS. Is it ok to consider that the scraped endpoints apply the centralized TLS configuration and we don't need to enforce anything at the client (Prometheus) level?

We also a few components which users can configure to talk to external systems:

  • Prometheus can send metrics via remote-write to HTTPS servers.
  • Alertmanager can send notifications to HTTPS based API services (as well as emails via STARTTLS).
    Again is it safe to assume that the users are responsible to properly configure these interfaces?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right now, the focus is on servers, yes. If we find clients that we ship are using old or constrained TLS implementations that don't offer to negotiate using TLS 1.3 + ML-KEM, then we will likely ask for those clients to be updated because the end result of that client/server combo will not be TLS 1.3 + ML-KEM.

@richardsonnick
Copy link
Copy Markdown
Contributor Author

Updated this with a revised draft with up to date information from internal discussions.

- type: Applied
status: "True"
reason: AllComponentsUpdated
message: "All components have applied the TLS configuration"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

who's going to update this condition?

@richardsonnick
Copy link
Copy Markdown
Contributor Author

Reworked this EP. Removed the proposal of a new CRD for centralizing TLS configuration. The new plan is to use the existing apiserver config for all components. This reduces the complexity of adding a new CRD.

@richardsonnick
Copy link
Copy Markdown
Contributor Author

Open question for discussion: What should components do if they are unable to comply with the tls settings? Is there a pattern for bubbling up configuration errors? Should the use the degraded flag?


The new `tlsAdherence` field controls how strictly the TLS configuration is enforced by components:

**`legacy` (default):** Provides backward-compatible behavior. Components will attempt to honor the configured TLS profile but may fall back to their individual defaults if conflicts arise. This mode is intended for clusters that need to maintain compatibility with existing configurations during migration.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

From the user's perspective, if I set this, where do I go next to find out which components are falling back to legacy behavior?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To make sure I'm recalling correctly, this mode being configured means "do what you've always done" and is meant to mitigate breaking changes from automatically migrating clusters from "some components respect this API for TLS configuration" to "all components respect this API for TLS configuration".

Should the guidance here instead be something along the lines of:

  • IF tlsAdherence: Legacy
    • IF ${component} already respects TLS profile configuration, continue to do so.
    • ELSE do what ${component} has always done, which is presumably that they have not respected the TLS profile and therefore should not

**Components With Override Capability:**
- **Ingress Controller:** Retains its existing capability to define a specific `tlsSecurityProfile`. This allows Ingress to support legacy external clients (e.g., using Intermediate or Old profiles) even if the cluster internal communication is set to Modern.
- **Routes:** Individual routes may specify TLS settings that differ from the cluster-wide default for specific application requirements.
- **Layered Products:** Layered products are expected to inherit the cluster default. Products unable to support the default (e.g., due to version incompatibility) must document their deviation and provide a justification.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How should a component let the user know it's not going to use the cluster default set in the API server configuration?

tlsAdherence: strict
```

#### TLS 1.3 with Custom Ciphers (Not Recommended)
Copy link
Copy Markdown

@rhmdnd rhmdnd Jan 22, 2026

Choose a reason for hiding this comment

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

Just to make sure my understanding is correct - the best a cluster administrator could do if we land this enhancement without #1894 (assuming we implement consistent enforcement) would be to configure the cluster to use the Modern profile and hope clients prefer the hybrid curves (assuming the cluster admin is prioritizing defense against harvest now, decrypt later attacks).

If we land this enhancement along with #1894 - then they at least have the option force clients to use PQC-safe curves with:

apiVersion: config.openshift.io/v1
kind: APIServer
metadata:
  name: cluster
spec:
  tlsSecurityProfile:
    type: Custom
    custom:
      # ciphers:
      #   - TLS_AES_128_GCM_SHA256  # This will be IGNORED - TLS 1.3 ciphers are hardcoded
      minTLSVersion: VersionTLS13
      curves:
      - X25519MLKEM512
  tlsAdherence: strict

But that requires 1894 to turn off the classical curves.

@simonpasquier
Copy link
Copy Markdown
Contributor

reposting my comment from #1910 (comment)

I'm assuming that the proposal applies to the server part of managed components and we don't need to enforce any client TLS settings.

@richardsonnick
Copy link
Copy Markdown
Contributor Author

reposting my comment from #1910 (comment)
I'm assuming that the proposal applies to the server part of managed components and we don't need to enforce any client TLS settings.
@simonpasquier Yes that is correct

@simonpasquier
Copy link
Copy Markdown
Contributor

simonpasquier commented Jan 27, 2026

@richardsonnick can this be written down in the proposal? Maybe in the non-goals section?

Comment thread enhancements/security/centralized-tls-config.md Outdated
Comment thread enhancements/security/centralized-tls-config.md Outdated
Comment thread enhancements/security/centralized-tls-config.md Outdated
Comment thread enhancements/security/centralized-tls-config.md Outdated
@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joelanford

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 openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2026
Copy link
Copy Markdown

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

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

/lgtm

I have a question about the Microshift part, and overall agree with Joe's comments.


**Single-node OpenShift (SNO):** The enhancement applies fully. Resource consumption impact is minimal as the APIServer configuration is an existing lightweight resource watched by existing operators.

**MicroShift:** **TBD**
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did we close the loop on this out-of-band from the review?

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2026
# TLS 1.3 cipher suites are hardcoded by the Go runtime.
```

**Note on Existing Validation:** The APIServer already validates that cipher suites cannot be configured with TLS 1.3 via an [admission plugin in openshift-kube-apiserver](https://github.com/openshift/kubernetes/blob/9d521311f5fb67dc43f49eeb728ee2c80976835a/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validate_apiserver.go#L214-L219). This enhancement will add CEL validation expressions to match this existing behavior. The CEL validation will use ratcheting to ensure that existing resources with this configuration are not immediately invalidated upon upgrade.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a note that this validation would currently only take place on the apiservers resource and would not enforce this on something like the ingress override type.

Adding a CEL based validation will propagate to all existing resources that rely on the existing type. For components that should not be subject to this new validation, they should use a bifurcated type for overrides.

Copy link
Copy Markdown
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Aside from the associated openshift/api PR needing an update to match updates here, this LGTM.

Approved from an API review perspective.

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2026
@richardsonnick
Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2026
@everettraven
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 4, 2026

@richardsonnick: 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 7fc139d into openshift:master Mar 4, 2026
2 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.