Skip to content

Commit f627b61

Browse files
Remove TLS curves from api
1 parent 74c76ea commit f627b61

34 files changed

Lines changed: 818 additions & 0 deletions

File tree

config/v1/types_apiserver.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,27 @@ type APIServerSpec struct {
6262
// The current default is the Intermediate profile.
6363
// +optional
6464
TLSSecurityProfile *TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"`
65+
// tlsAdherence controls how strictly components in the cluster adhere to the TLS security profile
66+
// configured on this APIServer resource.
67+
//
68+
// Valid values are "LegacyExternalAPIServerComponentsOnly" and "StrictAllComponents".
69+
//
70+
// When set to "LegacyExternalAPIServerComponentsOnly" (the default), components attempt to honor
71+
// the configured TLS profile but may fall back to their individual defaults if conflicts arise.
72+
// This mode is intended for clusters that need to maintain compatibility with existing
73+
// configurations during migration.
74+
//
75+
// When set to "StrictAllComponents", all components must strictly honor the configured TLS profile.
76+
// This mode is recommended for security-conscious deployments and is required for
77+
// certain compliance frameworks.
78+
//
79+
// Components that encounter an unknown value for tlsAdherence should treat it as "StrictAllComponents"
80+
// and log a warning to ensure forward compatibility while defaulting to the more secure behavior.
81+
//
82+
// When omitted, the default value is "LegacyExternalAPIServerComponentsOnly".
83+
// +openshift:enable:FeatureGate=TLSAdherence
84+
// +optional
85+
TLSAdherence TLSAdherencePolicy `json:"tlsAdherence,omitempty"`
6586
// audit specifies the settings for audit configuration to be applied to all OpenShift-provided
6687
// API servers in the cluster.
6788
// +optional
@@ -237,6 +258,23 @@ const (
237258
type APIServerStatus struct {
238259
}
239260

261+
// TLSAdherencePolicy defines how strictly components adhere to the TLS security profile.
262+
// +kubebuilder:validation:Enum=LegacyExternalAPIServerComponentsOnly;StrictAllComponents
263+
type TLSAdherencePolicy string
264+
265+
const (
266+
// TLSAdherenceLegacyExternalAPIServerComponentsOnly provides backward-compatible behavior
267+
// where components attempt to honor the configured TLS profile but may fall back to their
268+
// individual defaults if conflicts arise. This mode is intended for clusters that need to
269+
// maintain compatibility with existing configurations during migration.
270+
TLSAdherenceLegacyExternalAPIServerComponentsOnly TLSAdherencePolicy = "LegacyExternalAPIServerComponentsOnly"
271+
272+
// TLSAdherenceStrictAllComponents enforces strict adherence to the TLS configuration.
273+
// All components must honor the configured profile. This mode is recommended for
274+
// security-conscious deployments and is required for certain compliance frameworks.
275+
TLSAdherenceStrictAllComponents TLSAdherencePolicy = "StrictAllComponents"
276+
)
277+
240278
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
241279

242280
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,30 @@ spec:
292292
type: array
293293
x-kubernetes-list-type: atomic
294294
type: object
295+
tlsAdherence:
296+
description: |-
297+
tlsAdherence controls how strictly components in the cluster adhere to the TLS security profile
298+
configured on this APIServer resource.
299+
300+
Valid values are "LegacyExternalAPIServerComponentsOnly" and "StrictAllComponents".
301+
302+
When set to "LegacyExternalAPIServerComponentsOnly" (the default), components attempt to honor
303+
the configured TLS profile but may fall back to their individual defaults if conflicts arise.
304+
This mode is intended for clusters that need to maintain compatibility with existing
305+
configurations during migration.
306+
307+
When set to "StrictAllComponents", all components must strictly honor the configured TLS profile.
308+
This mode is recommended for security-conscious deployments and is required for
309+
certain compliance frameworks.
310+
311+
Components that encounter an unknown value for tlsAdherence should treat it as "StrictAllComponents"
312+
and log a warning to ensure forward compatibility while defaulting to the more secure behavior.
313+
314+
When omitted, the default value is "LegacyExternalAPIServerComponentsOnly".
315+
enum:
316+
- LegacyExternalAPIServerComponentsOnly
317+
- StrictAllComponents
318+
type: string
295319
tlsSecurityProfile:
296320
description: |-
297321
tlsSecurityProfile specifies settings for TLS connections for externally exposed servers.
@@ -325,6 +349,18 @@ spec:
325349
type: string
326350
type: array
327351
x-kubernetes-list-type: atomic
352+
curves:
353+
description: |-
354+
curves is used to specify the elliptic curves that are used during
355+
the TLS handshake. Operators may remove entries their operands do
356+
not support. For example, to use X25519 and P-256 (yaml):
357+
358+
curves:
359+
- X25519
360+
- P-256
361+
items:
362+
type: string
363+
type: array
328364
minTLSVersion:
329365
description: |-
330366
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-Default.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ spec:
256256
type: string
257257
type: array
258258
x-kubernetes-list-type: atomic
259+
curves:
260+
description: |-
261+
curves is used to specify the elliptic curves that are used during
262+
the TLS handshake. Operators may remove entries their operands do
263+
not support. For example, to use X25519 and P-256 (yaml):
264+
265+
curves:
266+
- X25519
267+
- P-256
268+
items:
269+
type: string
270+
type: array
259271
minTLSVersion:
260272
description: |-
261273
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,18 @@ spec:
325325
type: string
326326
type: array
327327
x-kubernetes-list-type: atomic
328+
curves:
329+
description: |-
330+
curves is used to specify the elliptic curves that are used during
331+
the TLS handshake. Operators may remove entries their operands do
332+
not support. For example, to use X25519 and P-256 (yaml):
333+
334+
curves:
335+
- X25519
336+
- P-256
337+
items:
338+
type: string
339+
type: array
328340
minTLSVersion:
329341
description: |-
330342
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-OKD.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ spec:
256256
type: string
257257
type: array
258258
x-kubernetes-list-type: atomic
259+
curves:
260+
description: |-
261+
curves is used to specify the elliptic curves that are used during
262+
the TLS handshake. Operators may remove entries their operands do
263+
not support. For example, to use X25519 and P-256 (yaml):
264+
265+
curves:
266+
- X25519
267+
- P-256
268+
items:
269+
type: string
270+
type: array
259271
minTLSVersion:
260272
description: |-
261273
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ spec:
257257
type: string
258258
type: array
259259
x-kubernetes-list-type: atomic
260+
curves:
261+
description: |-
262+
curves is used to specify the elliptic curves that are used during
263+
the TLS handshake. Operators may remove entries their operands do
264+
not support. For example, to use X25519 and P-256 (yaml):
265+
266+
curves:
267+
- X25519
268+
- P-256
269+
items:
270+
type: string
271+
type: array
260272
minTLSVersion:
261273
description: |-
262274
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/v1/zz_generated.featuregated-crd-manifests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apiservers.config.openshift.io:
88
FeatureGates:
99
- KMSEncryption
1010
- KMSEncryptionProvider
11+
- TLSAdherence
1112
FilenameOperatorName: config-operator
1213
FilenameOperatorOrdering: "01"
1314
FilenameRunLevel: "0000_10"

config/v1/zz_generated.featuregated-crd-manifests/apiservers.config.openshift.io/AAA_ungated.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ spec:
256256
type: string
257257
type: array
258258
x-kubernetes-list-type: atomic
259+
curves:
260+
description: |-
261+
curves is used to specify the elliptic curves that are used during
262+
the TLS handshake. Operators may remove entries their operands do
263+
not support. For example, to use X25519 and P-256 (yaml):
264+
265+
curves:
266+
- X25519
267+
- P-256
268+
items:
269+
type: string
270+
type: array
259271
minTLSVersion:
260272
description: |-
261273
minTLSVersion is used to specify the minimal version of the TLS protocol

config/v1/zz_generated.featuregated-crd-manifests/apiservers.config.openshift.io/KMSEncryption.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ spec:
257257
type: string
258258
type: array
259259
x-kubernetes-list-type: atomic
260+
curves:
261+
description: |-
262+
curves is used to specify the elliptic curves that are used during
263+
the TLS handshake. Operators may remove entries their operands do
264+
not support. For example, to use X25519 and P-256 (yaml):
265+
266+
curves:
267+
- X25519
268+
- P-256
269+
items:
270+
type: string
271+
type: array
260272
minTLSVersion:
261273
description: |-
262274
minTLSVersion is used to specify the minimal version of the TLS protocol

0 commit comments

Comments
 (0)