CNTRLPLANE-3762: Add support for component-scoped proxy #946
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 544 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.377
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #946"
general
weight: 0.35
ehearne-redhat
Add component-scoped proxy support for authentication
Adds support for a per-component proxy configuration on the
operator.openshift.io/v1 AuthenticationCR, gated behindFeatureGateAuthenticationComponentProxy. When enabled, the authentication operator readsspec.proxy(HTTPProxy, HTTPSProxy, NoProxy, TrustedCA) from the Authentication CR instead of relying on the cluster-wide proxy environment variables.Enhancement: Proxy support for integrated auth stack
Motivation
In disconnected or restricted-network environments, the cluster-wide proxy may not be appropriate for authentication traffic. A component-scoped proxy allows administrators to route OAuth/OIDC and IdP traffic through a dedicated proxy with its own CA trust, independent of the global proxy configuration.
Changes
Cluster-wide proxy: no longer loaded from the
proxies.config.openshift.io/clusterAPI resource.ResolveProxyreads it from the process environment variables (HTTP_PROXY,HTTPS_PROXY,NO_PROXY), which are already injected by the cluster proxy controller. This removes the direct API dependency and theproxyLister/proxyInformerfrom the deployment controller.Transport layer (
pkg/transport)TransportForCARefWithProxy: builds proxy-aware HTTP transports with configurable CA references.LoadCAData: exported helper that reads CA bundle bytes from a ConfigMap, checkingDatafirst thenBinaryData.Proxy resolution (
pkg/controllers/common)ResolveProxy: reads the component proxy from the Authentication CR when the feature gate is enabled; falls back tohttpproxy.FromEnvironment()otherwise. Returns aResolvedProxywith the effective proxy configuration and optionalTrustedCAName.Config observer (
pkg/controllers/configobservation/oauth)ObserveProxyTrustedCAobserver injects the proxy CA bundle file path into the observed config when a trusted CA is configured.Deployment controller (
pkg/controllers/deployment)HTTP_PROXY/HTTPS_PROXY/NO_PROXYenv vars from the resolved proxy into the OAuth Server pod.openshift-configtoopenshift-authentication.Optional: truefor CA hot-reload without redeployment.Proxy validation controller (
pkg/controllers/proxyconfig)IdPEndpointUnreachablewarning events for transient failures (does not set Degraded).Endpoint accessible controller (
pkg/libs/endpointaccessible)Custom route controller (
pkg/controllers/customroute)LoadCAData.Test plan
Unit tests are in place, but e2e tests are still missing.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
OAuth server and route/endpoint accessibility checks now support component-scoped proxy settings (with component-scoped trusted CA support) in addition to cluster-wide proxies.
Proxy validation and identity-provider discovery now use CA-aware, proxy-aware transports and deterministic
noProxymerging.Bug Fixes
When component proxy configuration can’t be read, behavior now safely falls back to cluster-wide proxy settings.
Proxying is disabled when no effective proxy is set, and identity-provider reachability warnings are aggregated while avoiding unnecessary revalidation.
Tests
Added unit coverage for proxy resolution, request proxy selection, and IdP connectivity event behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->