Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
An enterprise organization is designing an automated workflow and developer access model for querying sensitive data across projects. The enterprise security policy strictly forbids generating, downloading, and storing long-lived, static service account private JSON keys due to exfiltration risks.
You need to configure access so that authorized engineers and automated services can dynamically obtain short-lived OAuth2 access tokens to execute tasks with the permissions of a designated workload service account.
Which IAM role configuration should you implement?
roles/iam.serviceAccountTokenCreator) on the target service account.The Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) grants principals the permissions necessary to impersonate a service account directly and generate short-lived credentials, including OAuth 2.0 access tokens, OpenID Connect (OIDC) ID tokens, and signed JSON Web Tokens (JWTs).

generateAccessToken) by the original principal and the subsequent actions taken by the impersonated service account.gcloud --impersonate-service-account), client libraries, Terraform, and cloud-native services.Service account impersonation via the Service Account Token Creator role is Google Cloud's recommended architectural best practice for temporary privilege escalation and automated access without static credential overhead.
roles/iam.serviceAccountKeyAdmin) at the project level.The Service Account Key Admin role (roles/iam.serviceAccountKeyAdmin) grants full administrative control over user-managed service account keys, allowing principals to create, list, upload, and delete cryptographic key pairs.
The goal was to implement an administrative process for managing, auditing, or deleting legacy static service account key pairs across a project.
roles/iam.serviceAccountUser) on the target service account and retrieve static keys via Secret Manager.The Service Account User role (roles/iam.serviceAccountUser) provides the iam.serviceAccounts.actAs permission, which allows a principal to attach a service account to a compute resource (such as a Compute Engine VM instance, Cloud Run service, or Cloud Functions pipeline).
roles/iam.serviceAccountUser role alone does not grant the iam.serviceAccounts.getAccessToken permission required to generate short-lived OAuth 2.0 tokens or perform programmatic service account impersonation.The scenario required a developer to deploy a Cloud Run service or Compute Engine instance configured to execute with that service account attached.
roles/serviceusage.serviceUsageAdmin) on the project hosting the service account.The Service Usage Admin role (roles/serviceusage.serviceUsageAdmin) allows administrators to enable, disable, and inspect Google Cloud APIs and services for a given project.
serviceusage.services.* permission set to turn APIs on or off.The requirement was to allow administrators to enable the IAM Credentials API (iamcredentials.googleapis.com) or BigQuery API in a project where services were currently disabled.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated