Repository navigation
feat(bigquery): support authentication with ADC - #3348
Open
swarmia-eero wants to merge 1 commit into
Open
swarmia-eero wants to merge 1 commit into
swarmia-eero wants to merge 1 commit into
Conversation
swarmia-eero
commented
Oct 6, 2026
Comment on lines
+73
to
+93
| ### Application Default Credentials (CLI and self-hosted) | ||
|
|
||
| When running the CLI or a self-hosted `evidence serve`, you can skip the key file and use [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) instead: | ||
|
|
||
| ```yaml | ||
| type: bigquery | ||
| project: my-gcp-project | ||
| adc: true | ||
| datasets: | ||
| - analytics | ||
| ``` | ||
|
|
||
| Evidence then authenticates with, in order: | ||
|
|
||
| 1. The key file at `GOOGLE_APPLICATION_CREDENTIALS`. | ||
| 2. Your own login from `gcloud auth application-default login`. | ||
| 3. The attached service account when running on GCP (Cloud Run, GCE, GKE). | ||
|
|
||
| The identity needs the same **BigQuery Job User** and **BigQuery Data Viewer** roles described above. | ||
|
|
||
|
|
Author
There was a problem hiding this comment.
Very open to feedback regarding how the docs should discuss this, especially given that ADC is not supported on the Studio side.
|
@swarmia-eero is attempting to deploy a commit to the Evidence Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Service account keys should be treated as a last resort authentication method in GCP, due to the security risks related to long-living secrets living on disk: https://docs.cloud.google.com/docs/authentication#auth-decision-tree. ADC is most often the preferred method and comes with other upsides for BigQuery work:
This adds ADC as an authentication method for self-hosting and local development. Studio is unchanged.
Smoke-tested locally with a stub project and ADC authentication.