gar_gce_auth | R Documentation |
This takes the metadata auth token in a Google Compute Engine instance as authentication source
gar_gce_auth(
service_account = "default",
scopes = "https://www.googleapis.com/auth/cloud-platform"
)
service_account |
Specify a different service account from the |
scopes |
Scopes for the authentication |
service_account
is default
or the service account email
e.g. "service-account-key-json@projectname.iam.gserviceaccount.com"
Google Compute Engine instances come with their own authentication tokens.
It has no refresh token so you need to call for a fresh token after approx. one hour. The metadata token will refresh itself when it has about 60 seconds left.
You can only use for scopes specified when creating the instance.
If you want to use them make sure their service account email is added to accounts you want to get data from.
Use options(gargle.gce.use_ip = TRUE)
to activate this upon kubernetes for instance using federated identity
A token
gar_gce_auth_email
Other authentication functions:
gar_attach_auto_auth()
,
gar_auth()
,
gar_auth_service()
,
gar_auto_auth()
,
get_google_token()
,
should_skip_token_checks()
,
token_exists()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.