An organization wants to configure a GitHub Actions CI/CD pipeline to deploy Cloud Run services without exporting long-lived service account JSON keys. What is the correct sequential order of steps to establish Workload Identity Federation and service account impersonation for this setup?
- 1Create a Workload Identity Pool and Provider in Google Cloud configured for GitHub OIDC.
- 2Create a target GCP Service Account with the required IAM roles to manage Cloud Run deployments.
- 3Grant the `roles/iam.workloadIdentityUser` role on the GCP Service Account to the specific GitHub repository principal.
- 4Configure the GitHub Actions workflow step to authenticate using the Workload Identity Provider and request short-lived credentials.
Cevap
The correct sequence begins with creating the Workload Identity Pool and Provider, followed by creating the target GCP Service Account, granting the `roles/iam.workloadIdentityUser` role to the GitHub repository identity on that service account, and lastly updating the workflow step to request short-lived credentials.
Establishing Workload Identity Federation requires creating the federated infrastructure (Pool & Provider), defining the target GCP identity (Service Account), binding the `roles/iam.workloadIdentityUser` role to the external identity principal, and lastly referencing these resources in the pipeline execution workflow.
Adım Adım Çözüm
Anahtar Kavram
Configuring Workload Identity Federation for keyless service account impersonation from external CI/CD pipelines.