Skip to content

Should credentials_gce() consult a named email argument in ...? #249

@jennybc

Description

@jennybc

Compare the typical signature of an auth function in an end-user package, like googledrive:

drive_auth <- function(email = gargle::gargle_oauth_email(),
                       path = NULL,
                       scopes = "https://www.googleapis.com/auth/drive",
                       cache = gargle::gargle_oauth_cache(),
                       use_oob = gargle::gargle_oob_default(),
                       token = NULL) { ... }

to the signature of credentials_gce():

credentials_gce <- function(scopes = "https://www.googleapis.com/auth/cloud-platform",
                            service_account = "default", ...) { ... }

If someone is not using the default service account, they need to specify service_account, but drive_auth() doesn't allow for that. One possible change is for drive_auth()-like functions to gain ... (probably right after email) and pass that along to token_fetch().

Or a different approach is for credentials_gce() to look at ... and, if email is present, use that as service_account.

I haven't thought deeply on this, but wanted to record the thought.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions