GCP Professional Cloud Architect Practice Question

Your organization uses a central CI/CD project on GCP to build and deploy applications to several production projects. A new security policy forbids storing any long-lived service account keys in Cloud Build. Instead, the security team mandates that build jobs obtain short-lived OAuth 2.0 access tokens for a dedicated deploy-service-account in each production project. Only the Cloud Build runtime service account in the CI/CD project should be able to obtain these tokens; developers must not get direct access to the deploy-service-account even if they can trigger builds.

Which design satisfies these requirements with the least operational overhead while following Google-recommended practices?

  • Grant roles/iam.serviceAccountTokenCreator on each production deploy-service-account to the Cloud Build runtime service account, then configure build steps to run gcloud commands with the --impersonate-service-account flag when deploying.

  • Store a JSON key for each deploy-service-account in Secret Manager and have Cloud Build retrieve and activate the key during the deploy stage.

  • Grant the Cloud Build runtime service account the roles/run.admin role directly in every production project so it can deploy without impersonation.

  • Create a Workload Identity Federation pool that maps Cloud Build to the deploy-service-account, and configure each build step to obtain federated credentials from the pool.

GCP Professional Cloud Architect
Designing for security and compliance
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot