ACM-49951: add --tls-groups flag for TLS group preferences #413
All Vouch review confidence checks passed
Residual risk 0.37 = Change Risk (0.69) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.69 · 449 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.069
Real PR Conversation Timeline
1 comments
"Review active on #413"
general
weight: 0.35
coleenquadros
Summary
Adds support for configuring TLS named groups (elliptic curves / key-exchange groups) to oauth-proxy, so it can honor the cluster-wide
TLSSecurityProfile.groupsfield in addition to the minimum TLS version and cipher suites added in #372.Jira: https://redhat.atlassian.net/browse/ACM-49951
Strategy: https://redhat.atlassian.net/browse/OCPSTRAT-3145 (adds the
groupsfield toTLSSecurityProfile)Background
TLS 1.3 decoupled key exchange from cipher suites: cipher suites now only specify AEAD + hash, while key-exchange groups are negotiated separately via the
supported_groupsextension.TLSSecurityProfilehas agroupsfield to control these cluster-wide (FIPS NIST-curve restriction, PQC hybrids likeX25519MLKEM768). oauth-proxy already honorsminTLSVersion/ciphers(#372) but had no way to apply group preferences.Changes
--tls-groups(flag andtls_groupsconfig key), resolved through thego-options framework like every other option: flag values (comma-separated) and
config-file values (arrays or CSV strings) are both honored, and the CLI flag
overrides the config file.
--tls-cipher-suitesgets the same treatment — itsconfig key previously had no effect.
crypto/tlsCurveIDs with the shared library-go helpercrypto.TLSGroupsToCurveIDs(the same mapping other OpenShift components use, and itcovers every OpenShift
TLSGroupvalue). Unrecognized groups are logged and skipped so anewer profile degrades gracefully; validation fails closed only when none of the requested
groups are usable.
tls.Config.CurvePreferencesinbuildTLSConfig().Supported groups (all OpenShift
TLSGroupvalues):X25519,secp256r1,secp384r1,secp521r1,X25519MLKEM768,SecP256r1MLKEM768,SecP384r1MLKEM1024.Example usage:
Operators can inject this the same way they inject the existing TLS flags for kube-rbac-proxy / rbac-query-proxy.
Implementation
options.go:TLSGroups/TLSCipherSuitescarryflag:andcfg:tags and arevalidated into
tlsCurveIDsviaoscrypto.TLSGroupsToCurveIDs(no local name→curvemap); values are normalized (trim/drop empty) in
Validate.http.go:buildTLSConfig()setsconfig.CurvePreferenceswhen groups are configured.main.go: flags are registered normally and populated byoptions.Resolve; no manualparsing.
Testing
go build ./...,go vet ./...,gofmtclean.go test ./ ./api/... ./cookie/... ./providers/... ./util/...passes, including newbuildTLSConfigcurve-preferences coverage,Options.Validate()valid/unrecognizedgroup cases, and the post-quantum hybrids (
X25519MLKEM768,SecP256r1MLKEM768,SecP384r1MLKEM1024) resolving through the library mapping.Notes
master(Go 1.26, k8s 1.37.1, openshift release-5.1 libs), whichprovides
crypto.TLSGroupsToCurveIDs; this PR introduces no dependency changes.--tls-groups(e.g.,) is treated like an unset flag (Go'sdefault groups), because go-options cannot distinguish an empty string from an unset
flag.
crypto/tlsstill names the fieldCurvePreferences/ typeCurveID(legacy naming);these are the same TLS 1.3 "supported groups" concept.