Repository navigation
[2.1] fix(mcp): show access denied for accounts not allowed - #38558
Conversation
* fix(mcp): show access denied for accounts not allowed * neutral denied wording and failure reason tests * record mcp access denied rule in adr (cherry picked from commit 0b8b4e8)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskThe MCP callback now returns 403 for refused SSO accounts instead of 500, which could change client handling of sign-in failures. Refused MCP sign-ins now return a 403 Access Denied page with the failure reason instead of a 500 error, via a new VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Cherry-pick of #38259 to
2.1. Cleancherry-pick -xof 0b8b4e8, same patch as main.Not built or tested locally on 2.1; relying on CI.
Summary by Gitar
McpCallbackServletwriteAccessDeniedhelper inUserSSOOAuthProviderthat renders the page with a given reasonAuthenticationCodeFlowHandlerstores theSignInFailureas request attributesignInFailurefor the MCP callbackThis will update automatically on new commits.