Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Reuse the connection's resolved credentials for the Storage Write client instead of falling back to ADC. - Leave the BigQuery endpoint unset when the URI has no host, so the client library derives it from the universe domain or GOOGLE_CLOUD_UNIVERSE_DOMAIN. - Keep impersonation on iamcredentials.googleapis.com, which is not universe-specific (S3NS still serves it from googleapis.com). - Only accept known universe domains (googleapis.com, googleapis.de, s3nsapis.fr) unless bigquery.allow_unknown_universe_domain is true.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Effective environment domains, case normalization, and DNS validation have unresolved correctness and security issues.
1 open finding
What changed in this PR
Adds configurable Google Cloud universe domains across Go BigQuery clients, authentication, URI parsing, documentation, and tests.
Changes:
- Adds universe-domain options, validation, and endpoint derivation.
- Propagates authentication settings to Storage Write and impersonation clients.
- Documents and tests known, custom, and environment-provided universes.
| File | Description |
|---|---|
go/bigquery_database.go |
Parses and validates universe options. |
go/bulk_ingest_storage_write.go |
Propagates client authentication options. |
go/connection.go |
Configures clients and impersonation. |
go/docs/bigquery.md |
Documents universe-domain behavior. |
go/driver.go |
Defines and remaps new options. |
go/driver_test.go |
Tests URI and option handling. |
go/statement.go |
Passes auth options to ingestion. |
go/universe_domain_test.go |
Tests impersonation endpoint behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
lidavidm
reviewed
Nov 10, 2026
| "QuotaProject": OptionAuthQuotaProject, | ||
|
|
||
| "UniverseDomain": OptionUniverseDomain, | ||
| "AllowUnknownUniverseDomain": OptionAllowUnknownUniverseDomain, |
Contributor
There was a problem hiding this comment.
If the idea is that this shouldn't be passed through, then I think embedding it in the URI is a bad idea since then applications will have to parse/sanitize the URI themselves
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Contributor
|
This still has merge conflicts. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What's Changed
Note
The IAM Credentials endpoint used for impersonation is exposed under the default universe domain (
iamcredentials.googleapis.com) in any case.Adds an optional universe domain parameter to the Go driver, so they can connect to Google Cloud universes other than the public one (e.g. S3NS with
s3nsapis.fr). When unset, behavior is unchanged (googleapis.com).bigquery.universe_domain(URI parameterUniverseDomain). It applies to the BigQuery, Storage Read and Storage Write clients and to the default URI host. Impersonation now usescloud.google.com/go/auth/credentials/impersonateso the IAM Credentials endpoint can follow the universe.Closes #328.