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

Can't get existing credentials_gce() to work #97

Closed
wlongabaugh opened this issue Jul 24, 2019 · 2 comments

Comments

@wlongabaugh
Copy link
Contributor

commented Jul 24, 2019


We are trying to use the biqrquery package on a Google VM, where we obtain the needed token from the VM metadata service, i.e. using just the function credentials_gce(). In our use case, minting service account keys is not an option. Despite trying various approaches, we were unable to get it to work, and would get the error messages:

Error: Can't get Google credentials.
Are you running bigrquery in a non-interactive session? Consider:
  * Call `bq_auth()` directly with all necessary specifics.
Execution halted

Here is an example that creates the above messages:

library(gargle)
library(bigrquery)
projectID = "my-cloud-project"
cred_funs_clear()
cred_funs_add(credentials_gce)
scopes = c("https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform")
bq_auth(scopes)

We tracked the issue down into gargle and tweaked credentials_gce() a bit to get it working. We can submit a pull request if this might be useful? Thx.

@jennybc

This comment has been minimized.

Copy link
Member

commented Jul 24, 2019

We tracked the issue down into gargle and tweaked credentials_gce() a bit to get it working. We can submit a pull request if this might be useful? Thx.

That would be great! I have struggled to get feedback and specifics from people using / needing the GCE credentials flow, so I would love to hear from you, via PR or otherwise.

@wlongabaugh

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

Thanks. I have made a pull request. I might not have used the best approaches for the three needed fixes, but I got it working. Happy to provide feedback on this use case. When working with BigQuery tables containing controlled access cancer variant data on the ISB-CGC Cancer Cloud Resource, service accounts that have been approved to access controlled data cannot have keys minted. Thus our need for this flow. Thanks for providing the framework!

@wlongabaugh wlongabaugh referenced this issue Jul 24, 2019

Merged

Gce fixes #98

@jennybc jennybc closed this in #98 Jul 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.