GCP Professional Cloud Security Engineer Practice Question

Your organization's build pipeline runs in GitHub Actions. The workflow must deploy updates to a Google Cloud project, but security policy forbids storing any long-lived Google Cloud credentials in the repository. You need to design an authentication mechanism that allows the GitHub runner to obtain the minimal, short-lived access it needs at build time. Which solution best meets these requirements?

  • Create a Workload Identity Pool, configure an OIDC provider that trusts GitHub's identity tokens, grant the external principal permission to impersonate a Google Cloud service account, and let the runner exchange its GitHub OIDC token with the Security Token Service for a short-lived access token.

  • Generate a JSON key for the required service account, encrypt the key with Cloud KMS, store it as a GitHub secret, and decrypt it during each workflow run.

  • Enable Cloud Identity federation with GitHub and map the runner to a Cloud Identity user that is granted the Project Owner role.

  • Attach the Compute Engine default service account to a Cloud Run job, trigger the job from GitHub over HTTPS, and forward the runner's OAuth token to authenticate.

GCP Professional Cloud Security Engineer
Configuring Access
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