Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BigQuery oauth credentials #233

Open
3 tasks
lewish opened this issue May 29, 2019 · 5 comments
Open
3 tasks

Support BigQuery oauth credentials #233

lewish opened this issue May 29, 2019 · 5 comments

Comments

@lewish
Copy link
Collaborator

lewish commented May 29, 2019

Currently BigQuery can only be authorized through a service account, which adds significant overhead to setting up a BQ project.

It should be possible to provide oauth credentials when executing against BigQuery.

  • During init-creds add an option to use OAuth for BigQuery projects

  • Send the user to the oauth connection page with a callback to localhost:someport

  • Spin up a small server to handle the oauth callback

  • Write the oauth credentials to the .df-credentials.json file

  • Create a Dataform OAuth client ID

  • Support OAuth credentials in the BigQuery adapter and extend the credentials proto to store this

  • Implement the new init-creds flow above

@lewish lewish added the P1 label May 29, 2019
@lewish lewish added P2 and removed P1 labels Jun 21, 2019
@dorzey
Copy link

dorzey commented Oct 18, 2019

👍 we would definitely like to have this

@BenBirt BenBirt added P4 and removed P3 labels Jul 6, 2020
@thinhha
Copy link

thinhha commented Feb 4, 2021

Downloading service account keys is not very good security practice. The better approach is to use OAUTH as described in this article: https://medium.com/@jryancanty/stop-downloading-google-cloud-service-account-keys-1811d44a97d9

One way to do this is to use GOOGLE_APPLICATION_CREDENTIALS as described in:
#1164

Another way is for Dataform to expect a short-lived OAuth 2.0 access token, either as input to the CLI or from an environment variable like as done by terraform:
https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#access_token

@jamiekt
Copy link

jamiekt commented Feb 22, 2021

I wholeheartedly agree with @thinhha , access tokens would be an ideal mechanism here.

@jamiekt
Copy link

jamiekt commented Feb 25, 2021

@thinhha
Copy link

thinhha commented Mar 7, 2021

more details on how DBT did this here: dbt-labs/dbt-core#2672

@Ekrekr Ekrekr removed the P4 label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants