Support Spanner Omni in the spanner source
Prerequisites
- Search the current open issues
What are you trying to do that currently feels hard or impossible?
Use the spanner source (and the --prebuilt spanner tools) against a Spanner Omni deployment.
The spanner source only accepts project, instance, database, dialect, and useClientOAuth, and always connects to the Cloud Spanner endpoint with Application Default Credentials. There is no way to set an Omni endpoint, TLS/mTLS certificates, or Omni username/password.
The only workaround today is setting SPANNER_EMULATOR_HOST to the Omni endpoint, which forces plaintext with no authentication. That works for a local development Omni, but not for TLS, mTLS, or password-authenticated deployments. It is also a process-wide override.
Suggested Solution(s)
The Go client already supports Omni through spanner.ClientConfig{Type: spanner.OMNI, ...}:
UsePlainText,CaCertificateFile,ClientCertificateFile, andClientKeyFilesince v1.93.0.UsernameandPassword(Omni login) in v1.95.1.
Proposal:
- Bump
cloud.google.com/go/spannerfrom v1.92.0 to v1.95.1. - Add optional source fields:
instanceType(cloud|omni),omniEndpoint,omniUsePlainText,omniCaCertificateFile,omniClientCertificateFile,omniClientKeyFile,omniUsername,omniPassword. Theomniprefix marks the Omni-only fields. Pass them through to the client wheninstanceType: omni, and validate invalid combinations at load time. - Make
projectandinstanceoptional for Omni (it ignores them), defaulting todefault. They stay required for Cloud Spanner. - Return a clear error from
spanner-search-catalogfor Omni sources, since Omni databases aren't in Knowledge Catalog. - Update the Spanner source and
spanner-search-catalogdocs.
A follow-up could expose these fields in the spanner prebuilt config through environment variables.
Alternatives Considered
SPANNER_EMULATOR_HOST: plaintext and unauthenticated only (see above).
Additional Details
Implemented in #4198. The integration test runs Spanner Omni 2026.r4-lts in a testcontainer and was also run against plaintext, mTLS, and password-authenticated deployments.
Source: googleapis/mcp-toolbox