← Back to Pull requests

refactor(test): add reusable Entra external authentication helpers #8284

Open
unknown opened this pull request with 234 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 26, 2026 12:58 UTC
Author

ARO-29735

What

Add SetupExternalAuthAccess20240610 for tests that need the default Entra setup, a cluster-admin grant, and a client authenticated as the external identity. Tests that need to check access between steps, customize claims, or grant a different role can call the setup, role-binding, and token helpers separately.

Why

The external-auth, authorized-CIDR, and feature-aggregation tests each assemble similar authentication setup. Sharing that implementation lets tests focus on the behavior they verify.

Testing

  • Framework unit tests passed, including prefix policies, custom claims, optional clients, role bindings, and isolation from admin credentials.

  • Scoped lint and formatting checks passed. The existing E2E suite compiled with the E2Etests build tag.

  • No live Azure or cluster tests were run.
  • Special notes for your reviewer

    Existing E2E tests are unchanged. The previous role-binding helper delegates to the new helper and retains its behavior. test/AGENTS.md explains when to use the wrapper versus the individual steps.

    PR Checklist

  • Understand Code Review Process managed by OpenShift CI bot

  • PR is scoped to a single task (no mixed concerns)

  • Title follows Conventional Commits format

  • Summary explains the "Why" behind the change

  • Linked to relevant ticket/issue

  • Screenshots included (if dashboards or other UI changes)

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide)

  • Draft PR used for WIP (if applicable)

  • Commit history is clean (rebased/squashed)

  • Tricky code blocks are commented

  • Specific reviewers tagged via /assign command

  • All comment threads resolved before merge
  • ---
    AI-generated. Review for accuracy.

    @patriksuba requested from Slack

    Chai persona: ARO Ops

    Diff: 234 lines (+175 / -59) across 2 files Reviewer: redhat-chai-bot Review duration: 3837m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.60) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.60 · 234 lines diff across 2 files
    0.60
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.327
    Sensitive Paths sensitive_paths
    0.060
    Real PR Conversation Timeline
    1 comments
    "Review active on #8284"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 60.3% (MEDIUM) · Higher = larger blast radius
    60.3%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 32.1% · Safe to merge
    32.1%
    Repository