QuickDevGuide

Home › GCP

Keyless CI/CD with Workload Identity Federation — GCP

Workload Identity Federation lets external identities (GitHub Actions, GitLab, AWS, Azure, any OIDC/SAML provider) obtain short-lived Google credentials — no JSON keys to leak or rotate. Setup steps Create a workload identity pool and an OIDC provider for your CI issuer. Add an attribute condition restricting which repositories/branches may authenticate. Grant roles/iam.workloadIdentityUser on a deploy service account to the matching principal set. In CI, exchange the job's OIDC token for Google credentials. Combine with Artifact Registry (images), Cloud Deploy (promotion pipelines with approvals) and Terraform state in a versioned Cloud Storage bucket.

Key Takeaways