Repository navigation
fix(mcp): mcp claims mapping parser - #36171
Conversation
❌ 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🔴 High risk · MCP login now honors colon-containing configured identity claims, which could resolve a session to an unintended account if mappings or claims are wrong. Switches 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 |
|
🤖 Backport to |
|
🤖 Backport to |
(cherry picked from commit e9d0281) Co-authored-by: Vishnu Jain <[email protected]>
Describe your changes:
Part of a larger set of MCP and auth fixes.
McpCallbackServletparsedjwtPrincipalClaimsMappingwith its own split on every colon, so a mapped claim name likecustom:loginwas dropped and MCP resolved the user from the claim order instead, unlike web login.SecurityUtil.buildPrincipalClaimsMapping, the same parserJwtFilterand web login use.Type of change:
Tests:
Unit tests
McpCallbackServletTest#getClaimsMapping_keepsClaimNamesThatContainAColonchecks username and email; it fails without the fix.openmetadata-mcpunit tests pass locally (803).Backend integration tests
Not run locally (49 classes selected); the merge queue runs them.
Checklist:
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Reviewed
ec3628e: no 🔴. One 🟡 left for a follow-up: the auth settings validator inSystemRepositorystill has its own split; it does not change the result today.

Confidence Score: 5/5
The PR appears safe to merge.Summary
McpCallbackServletnow usesSecurityUtil.buildPrincipalClaimsMapping, matching web login.Acknowledgment: Vishnuujain deferred updating the separate parser in
SystemRepository, stating that it does not change the result today.Reviews (1) · Last reviewed commit: "fix(mcp): mcp claims mapping parser" · Reviewed by Greptile