← Back to Pull requests

fix: explain delayed permission grants without delaying cluster failure #7548

Closed
unknown closed this pull request without merging on Nov 02, 2026 10:48 UTC
View on GitHub
unknown unknown commented on Oct 15, 2026 05:12 UTC
Author

ARO-30179

Why


A recent Azure role grant can be visible before CheckAccess evaluates it as effective. Customers then see “missing permissions” for actions they believe they have granted. The validation should distinguish a plausible propagation delay from a missing grant, without holding genuinely misconfigured operations until their overall completion deadline. ARO-30179's corrected investigation did not establish a 46-minute propagation tail on this validation path; do not treat that figure as the basis for the failure timeout.

Behavior


  • Only after CheckAccess returns missing (NotAllowed) decisions do the control-plane and data-plane permission validations look for matching role assignments. Denied decisions do not qualify.

  • A candidate must be for the correct principal on a verified covering scope, created within the 60-minute evidence-selection window, without conditions or delegation. Its role definition must include each missing action (or data action), accounting for wildcard grants and exclusions. A recent unrelated Reader grant cannot justify propagation guidance. The window changes the error message, not the operation timeout.

  • The SDK's principalId eq filter is encoded before transmission. One paginated subscription-scope list is reused per principal per validation run; assignment and scope matching is local. Control-plane principal IDs come from ServiceProviderCluster.status.managedIdentityDetails' ARM source (never the lower-environment MI mock); if this source is missing or reports an error, guidance is omitted without extra identity GETs. Data-plane validation reuses its already-resolved principal IDs.

  • A matching grant produces Failed, reason RoleAssignmentPropagationPending, with missing-action details, the newest relevant assignment time, and conditional wait/retry advice. Rechecks run after 30 seconds so a grant that becomes effective inside the failure window can recover. Other missing grants remain ordinary Failed. All assignment/role lookup errors are logged and counted and retain the ordinary Failed result; diagnostic lookup errors cannot reset the failure timer.

  • Cluster operations still fail on non-passing validations when both the operation and condition have aged 10 minutes. There is no propagation exemption. Once #7547 lands and this PR is rebased, its separate probe-freshness gate will additionally protect stale Failed results. The overall completion deadline is unchanged.
  • Verification and operational signals


    Unit tests cover scope/age/deny/action matching, unrelated grants, pagination, lookup errors, operation age, and the actual SDK HTTP filter; affected backend packages pass go test -race and lint locally. backend_cluster_validation_rbac_propagation_detections_total, _lookup_errors_total, _lookup_forbidden_total, and _window_expired_total distinguish guidance from inaccessible or expired evidence. The generated controller-data-flow reference is left to its separate bot update. Local make verify is blocked by unrelated config-materialization drift; CI on the new head is required.

    Dependencies and limitations


    Merge #7547 first and rebase this PR to resolve the shared operation-controller test thresholds. The real first-party identity’s effective ability to list customer-subscription role assignments and read customer-scoped role definitions is not established by repository grants, mock-identity e2e tests, or an operator’s Azure login. A 403 leaves ordinary missing-permissions failure intact and increments the forbidden metric; this guidance requires confirmation with the real FPA against a customer-owned scope before production enablement. Role membership through groups and conditional grants are not assumed to be propagation evidence. Neither this PR nor #7547 changes the overall cluster-operation deadline.

    Diff: 501 lines (+375 / -126) across 6 files Reviewer: miguelsorianod Review duration: 26255m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.71) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 501 lines diff across 6 files
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.372
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #7548"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 70.7% (HIGH) · Higher = larger blast radius
    70.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.6% · Safe to merge
    30.6%
    Repository