An organization is establishing an automated CI/CD deployment workflow on an external third-party platform that needs to deploy resources into a Google Cloud project. Security policies strictly prohibit exporting or storing long-lived service account JSON key files on external infrastructure. The engineering team decides to set up Workload Identity Federation so the external pipeline can temporarily impersonate a dedicated Google Cloud service account. Which TWO configuration steps must be performed in Google Cloud to complete this setup? (Select TWO.)
- Configure a Workload Identity Pool and Provider to establish trust with the external identity provider and map token claims to Google Cloud attributes.Answer
- Grant the external workload identity principal the Workload Identity User role (roles/iam.workloadIdentityUser) on the target Google Cloud service account.Answer
- CGenerate and download a private service account JSON key for the deployment service account and store it as an encrypted variable in the external pipeline.
- DAssign the primitive Owner role (roles/owner) at the Google Cloud project level to the external identity principal so that impersonation permissions inherit down.
Answer
The two required configuration steps are setting up a Workload Identity Pool and Provider to map external token claims, and granting the Workload Identity User role (roles/iam.workloadIdentityUser) on the target Google Cloud service account to the external principal.
To set up keyless authentication for external workloads, Google Cloud requires establishing a trust relationship via a Workload Identity Pool and Provider (to validate and map external ID tokens) and granting the Workload Identity User role on the target service account to the mapped external principal.
Step-by-Step Solution
Key Concept
Workload Identity Federation setup requires creating a Workload Identity Pool and Provider to federate external tokens, along with assigning the roles/iam.workloadIdentityUser role on the target service account to permit keyless impersonation.