fix(tls): fail closed on denied reads and validate serving profiles #222
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.75) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #222"
general
weight: 0.35
RobuRishabh
Purpose of this PR
Proposed changes:
FetchTLSProfilefails closed: Forbidden/Unauthorized reads, unexpected API errors, and malformed profiles return errors, and both the controller and webhook startup paths exit before constructing the manager. The profile watcher triggers the restart path on fetch errors instead of retrying. Transient errors keep the documented Intermediate fallback with the watcher self-healing once the read recovers.tlsAdherencemode, preserving released behavior: current operators already honor it on the common paths, andLegacyAdheringComponentsOnlyexists to keep that honoring in production. On supported OCP 4.x clustersspec.tlsAdherenceis behind the platform's TLSAdherence feature gate and unset, so the profile remains the effective knob.ParseTLSProfileresolves built-in profiles from the OpenShift profile definitions: Old applies its actual TLS 1.0 minimum and explicit suites (AES-GCM, CBC, 3DES) instead of the previous TLS 1.2 substitution with unrestricted Go defaults. Malformed Custom settings (missing block, unknown or empty minimum version, no ciphers below TLS 1.3) and unknown types return errors instead of silent Intermediate substitution.examples/openshift/Dockerfile.odh, and the module builder digest-pinned), clearing GO-2026-6607; the nestedtest/e2emodules align on go 1.26.0 with toolchain go1.26.10.config.openshift.io/apiserversread rules matching the bundled manifests; the new fail-closed reads would otherwise make chart installs fatal.JIRA: https://redhat.atlassian.net/browse/RHOAIENG-96993
Change Category
Rationale
Denied APIServer reads previously fell back to Intermediate and served a guessed posture indefinitely; the Old profile was silently replaced with TLS 1.2 and unrestricted cipher defaults; and unsupported Custom cipher lists degraded to Go defaults. All three violate the OpenShift centralized TLS configuration contract (invalid strict profiles fail closed; Old is honored exactly). Honoring semantics are unchanged from released operators: the profile applies under every adherence mode.
Checklist
Additional Notes
Verification: full
pkg/tlssuite including the envtest integration test (KUBEBUILDER_ASSETS),go build ./...,go vet,gofmt,go mod tidy -diff,git diff --check; Helm chart rendered and YAML-validated with the new RBAC rules; reviewed with CodeRabbit locally over three rounds (the Helm rule indentation and the missing chart RBAC were found and fixed in rounds 1-2; round 3 returned zero findings). One follow-up observation, not addressed here: the chart/kustomize drift test explicitly skips OpenShift-specific RBAC, which is how the chart RBAC gap went unnoticed; lifting that skip could be a separate change.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
TLS settings now follow the cluster’s configured profile, including its minimum TLS version, cipher suites, and curve preferences.
HTTP/2 is advertised only when supported by the TLS configuration; otherwise, connections use HTTP/1.1.
OpenShift Intermediate, Modern, Old, and Custom TLS profiles are supported, with validation of versions, cipher suites, and named groups.
Bug Fixes
TLS profile lookup and invalid-profile errors are handled explicitly. Missing profiles and transient read failures retain fallback behavior.
The operator stops startup when required TLS settings cannot be resolved.
TLS profile lookup failures trigger the change callback without retrying reconciliation.
Chores
Updated permissions to allow operator components to read cluster API server configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->