Skip to content

fix(mcp): accept google issuer without scheme - #38258

Merged
Vishnuujain merged 3 commits into
mainfrom
mcp-google-issuer
Nov 20, 2026
Merged

Vishnuujain merged 3 commits into
mainfrom
mcp-google-issuer

Conversation

@Vishnuujain

@Vishnuujain Vishnuujain commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38254

  • MCP sign-in refused a Google ID token whose issuer is accounts.google.com. Google documents that form next to https://accounts.google.com, and the UI login already accepts both.
  • The MCP ID token check now uses the same rule as the UI login (ProviderTokenValidator.isGoogleSchemelessIssuer), so there is one rule and not a copy. It applies only when the expected issuer is Google's; every other mismatch is still refused.
  • Found by a new MCP sign-in test for open-metadata/openmetadata-collate#4896, which follows in its own PR.

Type of change:

  • Bug fix

High-level design:

N/A, small change.

Tests:

Use cases covered

  • A person signs in to an MCP client through Google when the ID token issuer has no https://.
  • A token issued by accounts.google.com is still refused when the configured provider is not Google.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: IdTokenValidatorTest (googleIssuerWithoutASchemeIsAccepted, googleIssuerWithoutASchemeIsRefusedForAnotherProvider).
  • Coverage was not measured.

Backend integration tests

  • Not applicable (no backend API changes).
  • Not run: GoogleSsoSignInUIIT and GoogleSsoBootstrapUIIT, which run only in the nightly.

Local Java test run: PASSED

  • Commit: 6e5d3c30ac55 (base origin/main)
  • Finished: 2026-11-20 03:57 UTC · 1.1 min
  • Scope: focused; merge readiness is not established. Broader steps deferred: 5 (run --scope full).
Step Scope Classes Tests Failed Skipped Min Result
unit openmetadata-mcp (1 class), openmetadata-service (1 class) 2 23 0 0 1.1 passed
  • Impacted, not run locally: 2 classes (listed in the details)

Manual testing performed

  • None. An end to end sign-in through a Google-shaped mock provider passes on a local branch that has this fix and the new tests together.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md and fixed every 🔴 finding, or answered it on the line below.
  • Decision check: no durable decision; the rule already exists for the UI login.
  • I have added a test that covers the exact scenario we are fixing.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the exception stays limited to Google's exact issuer alias.

Summary

MCP sign-in now accepts Google's issuer without https://, using the same helper as UI login.

  • MCP sign-in accepts Google’s issuer without a scheme.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into mcp-google-issu..." · Reviewed by Greptile

@Vishnuujain
Vishnuujain requested a review from a team as a code owner November 20, 2026 04:26
@Vishnuujain
Vishnuujain requested a review from manerow November 20, 2026 04:26
@Vishnuujain

Copy link
Copy Markdown
Contributor Author

Local Java test run: PASSED — details

  • Commit: 6e5d3c30ac55 (base origin/main)
  • The summary is in the PR description.

Tests run locally

  • unit · openmetadata-mcp (1 class), openmetadata-service (1 class): IdTokenValidatorTest (13 passed), ProviderTokenValidatorTest (10 passed)

Broader coverage not executed by this focused run

  • mvn -B package -pl openmetadata-mcp,openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=IdTokenValidatorTest,JwtFilterTest,McpCallbackServletTest,ProviderTokenValidatorTest -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel '-Dit.test=<121 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,ContextMemoryExtractionRequestIT,ConversationSchemaMigrationIT,CredentialDatabaseOutageIT,CredentialRevocationTwoProcessIT,OpsRegenerateBotTokensIT,RevokeWaitForPropagationIT,SessionMultiNodeIT,SsoOidcCallbackHardeningIT,SsoOidcConfidentialLoginIT,SsoOidcProviderProfilesIT,SsoOidcPublicBearerIT,SsoSamlLoginIT,SsoSecurityConfigApplyIT,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
Impacted, not run locally (2)
  • GoogleSsoSignInUIIT → nightly: openmetadata-nightly k8s-java-it (ui-it + embedded JavaUIIT)
  • GoogleSsoBootstrapUIIT → nightly: openmetadata-nightly k8s-java-it (ui-it + embedded JavaUIIT)
Commands
mvn -B package -pl openmetadata-mcp,openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=IdTokenValidatorTest,ProviderTokenValidatorTest -Dsurefire.failIfNoSpecifiedTests=false

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

@gitar-bot

gitar-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

MCP issuer validation now accepts Google’s schemeless issuer, altering the authentication trust boundary; a validation mistake could admit tokens from outside the configured provider.

Accepts Google ID tokens whose issuer is accounts.google.com without the https:// scheme in MCP sign-in, reusing the same ProviderTokenValidator.isGoogleSchemelessIssuer rule as UI login. The check applies only when the expected provider is Google, so other issuer mismatches are still refused. 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 db716a2 into main Nov 20, 2026
53 of 55 checks passed
@Vishnuujain
Vishnuujain deleted the mcp-google-issuer branch November 20, 2026 09:05
Vishnuujain added a commit that referenced this pull request Nov 24, 2026
* fix(mcp): accept google issuer without scheme

* test google issuer stays refused for other providers

(cherry picked from commit db716a2)
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.

MCP sign-in fails for Google when the ID token issuer has no https://

3 participants