Skip to content

[2.1] fix(mcp): show access denied for accounts not allowed - #38558

Merged
Vishnuujain merged 1 commit into
2.1from
backport/2.1-38259-mcp-access-denied
Nov 24, 2026
Merged

Vishnuujain merged 1 commit into
2.1from
backport/2.1-38259-mcp-access-denied

Conversation

@Vishnuujain

@Vishnuujain Vishnuujain commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-pick of #38259 to 2.1. Clean cherry-pick -x of 0b8b4e8, same patch as main.

Not built or tested locally on 2.1; relying on CI.


Summary by Gitar

  • Access denied page:
    • Refused MCP sign-ins now show a 403 Access Denied page instead of a 500 error in McpCallbackServlet
    • Added writeAccessDenied helper in UserSSOOAuthProvider that renders the page with a given reason
  • Sign-in failure reason:
    • AuthenticationCodeFlowHandler stores the SignInFailure as request attribute signInFailure for the MCP callback
  • Tests:
    • Added tests for the access denied response and failure attribute
  • Docs:
    • Added v2 amendment to the SSO sign-in failure ADR

This will update automatically on new commits.

* 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)
@Vishnuujain
Vishnuujain requested a review from a team as a code owner November 24, 2026 08:08
@Vishnuujain
Vishnuujain requested review from mohityadav766 and removed request for a team November 24, 2026 08:08
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

The 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 writeAccessDenied helper in UserSSOOAuthProvider and a signInFailure request attribute set by AuthenticationCodeFlowHandler. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Vishnuujain
Vishnuujain merged commit 10d4c36 into 2.1 Nov 24, 2026
46 of 48 checks passed
@Vishnuujain
Vishnuujain deleted the backport/2.1-38259-mcp-access-denied branch November 24, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant