Fix incorrectly serialized HostedCluster CR authentication.oidcProviders[*].claimMappings.username.prefix #7501
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 309 lines diff across 3 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.343
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #7501"
general
weight: 0.35
hlipsig
What
ClusterResourcesController reads the HostedCluster from Cluster Service. Before writing its ApplyDesire, it walks
spec.configuration.authentication.oidcProviders[*].claimMappings.usernameand removesprefixonly when its value isnull. Explicit prefix values stay intact.The E2E creates a cluster and node pool, configures external auth with an explicit prefix, then changes the policy to
Nonewith no prefix. It checks that the update succeeds and that OIDC authentication works with the resulting username. The E2E compiles but has not been run against a live cluster.Why
Because a nil
Prefixpointer can be serialized as"prefix": null, while the HostedCluster schema requiresprefixto be absent when the policy isNone. Removing that null field before applying the HostedCluster avoids the invalid manifest. An explicit prefix is left untouched.The E2E changes from an explicit prefix to
Noneto exercise that exact update path and check that authentication still works afterward.Testing
Testing is required for feature completion and tests should be part of the pull
request along with the feature changes.
Describe the testing provided. If you did not add tests, provide a clear
justification.
Special notes for your reviewer
<!-- optional -->
PR Checklist
If E2E tests are included:
demonstrate that the test is able to detect a defect/error and fail with
proper error message and logs which communicates nature of the problem.