fix(platform): delete legacy tokens via controller API (AAP-74711) #3550
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.62) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 251 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.331
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #3550"
general
weight: 0.35
keithjgrant
Summary
Fixes legacy OAuth2 token deletion in the platform UI.
useDeleteAAPUserTokenswas sending all DELETE requests throughgatewayAPI(/api/gateway/v1/tokens/<id>/), which does not own legacyOAuth2AccessTokenresources, causing "No OAuth2AccessToken matches the given query."Deletion is now routed by
token.type:o_auth2_access_token) →awxAPI(uses the configured controller prefix, e.g./api/controller/v2/tokens/<id>/)Access Token) →gatewayAPI(unchanged)Adds regression tests for legacy deletion, gateway deletion, mixed bulk deletion, and type-based routing precedence.
Cherry-picked from ansible-automation-platform/aap-ui (
lgalis/AAP-74711/fix-legacy-token-deletion).Type of Change
Risk Analysis - REQUIRED
Dependencies
None.
Testing
Ephemeral E2E Tests
Once PR is ready and preliminary checks pass, trigger tests by posting a comment
/run-playwrighton this PR.Manual Testing
o_auth2_access_token) and confirm it succeeds without the "No OAuth2AccessToken matches the given query" errorAccess Tokenand confirm it still deletes via the gateway API