feat(backend): add controllers that perform cluster's data plane identity OIDC federation with identities replacement support #6982
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 284 lines diff across 3 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.338
Real PR Conversation Timeline
1 comments
"Review active on #6982"
general
weight: 0.35
miguelsorianod
This PR builds on top of https://github.com/Azure/ARO-HCP/pull/6944.
It introduces controllers that perform cluster's data plane identity OIDC federation with identities replacement support.
The controllers attempts to support identity replacement, which can be triggered in two different ways:
Triggered by the end-user by interacting with the RP API by changing the operator->identity association
Triggered by the actual identity behind the resourceid associated to it changing. For example, because it's been deleted and recreated with the same resourceid. There is no end-user's RP API interaction in that case
The implementation also takes into account a single identity being used in N operators at the same time. Even across cp, dp operators and service managed identity. This is because soon we will implement identity reuse support too.
The implementation also takes into account that there can be chained replacement transitions where some of the transitions might not be fully completed before the next one is specified. For example, an identity being replaced for an operator from A -> B -> C and identity C being specified for the operator before the A->B replacement transition completed. This includes performing deconfiguration/cleanup process of those previous replacement transitions, including the partial ones.
There is currently a limitation we have which is that Hypershift does not currently report whether an identity is actually being used by an operator, neither the replacement process status. Immediately deconfiguring an old replaced identity would cause disruption to the service as the identity replacement process takes a while to occur and propagate since its specified in the Hypershift HostedCluster until it ends up being used in the actual operators, and the operators stop using the old one. Because of this, as a best-effort until we have that state reporting, we do not initiate the actual deconfiguration process until 24h after we detected it shouldn't be in-use anymore because of a identity replacement occurring
The implementation also provides a way for external controllers to determine "has oidc federation configuration been completed for this identity used by this operator"? so they can gate on it.