Repository navigation
fix(mcp): pick the sso user the same way as the web login - #36860
Conversation
Code Review ✅ Approved🔴 High risk · Changing MCP SSO account resolution to use the email-owning user could give a session another account’s privileges if identity matching is wrong. Fixes the MCP SSO callback so it resolves the user with the same logic as the web login, taking the account that owns the email when email-first login is enabled. No issues found. 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 |
|
Local Java test run: FAILED — details
Failed: Selected but produced no report: Tests run locally
Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts. integration · mysql-elasticsearch · parallel: 95 classes
Why these tests
Impacted, not run locally (2)
Commandsmvn -B package -pl openmetadata-mcp,openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=AuthCallbackServletTest,AuthenticationCodeFlowHandlerTest,ConcurrentFirstOidcLoginTest,JwtFilterTest,McpCallbackServletTest,SsoRedirectBoundaryTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel '-Dit.test=<98 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=global-state -Dit.test=ContextMemoryDerivationIT,ContextMemoryExtractionIT,ConversationSchemaMigrationIT,CredentialDatabaseOutageIT,CredentialRevocationTwoProcessIT,OpsRegenerateBotTokensIT,RevokeWaitForPropagationIT,SessionMultiNodeIT,SsoOidcCallbackHardeningIT,SsoOidcConfidentialLoginIT,SsoOidcProviderProfilesIT,SsoOidcPublicBearerIT,SsoTokenRenewalIT,UserMetricsResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=rdf -Dit.test=AgentSparqlResourceIT,RdfFusekiAuthorizationIT,RdfMcpKnowledgeGraphIT,RdfPolicyRevocationIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pcache-tests -DintegrationTests.lane=global-state -Dit.test=CredentialRedisDownIT,CredentialRedisNoRoundTripIT,SessionRedisMultiNodeIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false |
|
✅ SSO Login Nightly — PASSED View workflow run · Commit
Totals: 94 passed · 0 failed · 0 flaky · 0 skipped · duration 17m 34s |
❌ 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 |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
…36995) (cherry picked from commit 67bad95) Co-authored-by: Vishnu Jain <[email protected]>
|
🤖 Not backported to
|
Describe your changes:
emailClaimset, the MCP SSO callback worked out the user a second time with the legacy claim rules (the part of the email before the@), so the MCP login and the web login could resolve the same person to different users./mcp/callbacknow resolves the identity with the web login's ownresolveOidcIdentity, and in the email-first flow takes the account that owns the email (UserUtil.resolveUserNameForEmail), as the SAML MCP bridge already does.Type of change:
Tests:
Unit tests
McpCallbackServletTest: an email-first login hands the account that owns the email to the MCP flow; fails before this change (it passes the email's local part). The legacy-flow test now runs through the real resolver.Backend integration tests
Local Java test run: FAILED
d1e09fda34a1(baseorigin/main)Failed:
RoleResourceIT#test_listRolesWithPoliciesField(TestNamespace)Selected but produced no report:
CredentialAuthBenchIT (mysql-elasticsearch · parallel),CredentialMemoryIT (mysql-elasticsearch · parallel),CredentialPatBurstIT (mysql-elasticsearch · parallel),CredentialSweepCostIT (mysql-elasticsearch · parallel)