Professional Cloud Security Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
An enterprise runs long-running batch analytics jobs on Amazon Web Services (AWS) EC2 instances that process and load data directly into Google Cloud BigQuery and Cloud Storage. The security team identified that developers are currently using downloaded, long-lived service account JSON keys on AWS, violating corporate security policies.
The security engineer must replace these static keys with Workload Identity Federation using AWS instance profiles. The batch pipeline runs for 4 consecutive hours, requiring a single short-lived impersonated service account token with a 4-hour (14,400-second) lifetime.
Which set of actions should the security engineer take to implement this architecture?
Workload Identity Federation allows external workloads (such as AWS EC2 instances, Azure VMs, or on-premises servers) to authenticate to Google Cloud APIs by exchanging external ambient credentials for temporary, short-lived Google Cloud access tokens. This eliminates the need to create, download, and rotate static, long-lived service account JSON keys.
gcloud iam workload-identity-pools create-cred-config, passing --service-account-token-lifetime-seconds 14400 configures the impersonated service account token duration to 4 hours.constraints/iam.allowServiceAccountCredentialLifetimeExtension.roles/iam.workloadIdentityUser binds the federated AWS identity pool principal directly to the target Google service account.This approach directly satisfies the 4-hour token duration requirement using native Google Cloud IAM governance without requiring custom token-refresh daemon scripts or insecure long-lived key files.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.