Skip to content

Authenticate with GCP with OIDC token #487

@patrickkenyon

Description

@patrickkenyon

In order to authenticate through OIDC it would be really useful if the Orb could support:

gcloud auth login --brief --cred-file ./myCredFile

Currently only the following authentication approach is used:

gcloud auth activate-service-account --key-file ./myKeyFile

When following the CircleCI documentation to authenticate via OIDC the credential file is generated as a result of this step:

gcloud iam workload-identity-pools create-cred-config

However, this credentials file is incompatible with the service account key file you would usually use to authenticate:

// line 761 of https://circleci.com/developer/orbs/orb/ovotech/terraform?version=1.11.15
                export GOOGLE_APPLICATION_CREDENTIALS=/tmp/google_creds
                gcloud auth activate-service-account --key-file /tmp/google_creds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions