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

gcloud_account can switch the account? #66

Closed
shbrief opened this issue Sep 27, 2022 · 0 comments
Closed

gcloud_account can switch the account? #66

shbrief opened this issue Sep 27, 2022 · 0 comments

Comments

@shbrief
Copy link
Contributor

shbrief commented Sep 27, 2022

I'm a little confused with the behavior of the gcloud_account function - whether it can change the Google account login for the session. I want to change/setup Google cloud account within one session and it seems like gcloud_account does it partially(?).

> gcloud_account("shbrief@gmail.com")
[1] "shbrief@gmail.com"
> gsutil_ls("gs://sh_misc/")
[1] "gs://sh_misc/startup_message.sh" "gs://sh_misc/work/"             
> x <- avworkspaces()
> x[x$accessLevel == "PROJECT_OWNER", 1:3]
# A tibble: 3 × 5
  name                      lastModified createdBy                namespace                accessLevel  
  <chr>                     <date>       <chr>                    <chr>                    <chr>        
1 AnVIL_GTEx_V8_hg38 copy   2022-04-07   shbrief@gmail.com        waldronlab-terra-rstudio PROJECT_OWNER
2 AnVIL_GTEx_V9_hg38 copy   2022-04-07   shbrief@gmail.com        waldronlab-terra-rstudio PROJECT_OWNER
3 AVP-test                  2021-07-09   shbrief@gmail.com        waldronlab-terra         PROJECT_OWNER

When I provide a different account to gcloud_account, it changes my access to the cloud bucket. But it still thinks I'm the project owner of the other account.

> gcloud_account("bioc.terra@gmail.com")
[1] "bioc.terra@gmail.com"
> gsutil_ls("gs://sh_misc/")
[1] "gs://sh_misc/startup_message.sh" "gs://sh_misc/work/"             
Warning message:
'gsutil_requesterpays()' returned an error:
  'gsutil -u bioinfo requesterpays get gs://sh_misc' failed:
  AccessDeniedException: 403 bioc.terra@gmail.com does not have serviceusage.services.use access to the Google Cloud project.
  exit status: 1 
> y <- avworkspaces()
> y[y$accessLevel == "PROJECT_OWNER", 1:3]
# A tibble: 3 × 5
  name                      lastModified createdBy                namespace                accessLevel  
  <chr>                     <date>       <chr>                    <chr>                    <chr>        
1 AnVIL_GTEx_V8_hg38 copy   2022-04-07   shbrief@gmail.com        waldronlab-terra-rstudio PROJECT_OWNER
2 AnVIL_GTEx_V9_hg38 copy   2022-04-07   shbrief@gmail.com        waldronlab-terra-rstudio PROJECT_OWNER
3 AVP-test                  2021-07-09   shbrief@gmail.com        waldronlab-terra         PROJECT_OWNER
mtmorgan added a commit that referenced this issue Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant