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.
A security engineer needs to configure access for an engineer (developer@example.com) who must generate short-lived OAuth 2.0 access tokens to impersonate a specific deployment service account (deploy-prod@example-proj.iam.gserviceaccount.com) from their local environment. The project contains multiple sensitive service accounts used by critical infrastructure.
To uphold the principle of least privilege and prevent unintentional privilege escalation, how should the security engineer grant the necessary access?
The Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) grants principals the permissions necessary to generate short-lived credentials for a service account, including OAuth 2.0 access tokens, OIDC ID tokens, and signed JSON Web Tokens (JWTs). This enables direct credential generation and service account impersonation without relying on long-lived service account private keys.
roles/iam.serviceAccountTokenCreator, the engineer can programmatically request short-lived access tokens to authenticate API calls and run deployment workflows as the service account.deploy-prod@example-proj.iam.gserviceaccount.com) restricts impersonation capabilities strictly to that single identity. It prevents the principal from impersonating other sensitive or higher-privileged service accounts within the same project.Applying the role at the resource level (on the specific service account allow policy) rather than at the project level ensures strict isolation. It enables the engineer to execute their deployment duties without risking unauthorized privilege escalation across other service accounts residing in the project.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.