🔥 40% Off Crucial Exams Memberships — Deal ends today!

11 minutes, 6 seconds remaining!

GCP Professional Cloud Security Engineer Practice Question

Your company's security policy forbids keeping long-lived Google Cloud credentials outside Google Cloud. A GitHub Actions workflow builds container images and runs gcloud commands to deploy to a Google Kubernetes Engine (GKE) cluster. Today the workflow authenticates by reading a base-64-encoded JSON key for a user-managed service account that is stored in the repository's secrets. You must eliminate this compliance finding while continuing to deploy from GitHub. Which approach best meets the requirement?

  • Configure Workload Identity Federation to trust GitHub's OIDC tokens, grant the trusted identity roles/iam.workloadIdentityUser on a dedicated deployer service account, and have the workflow obtain short-lived access tokens at run time.

  • Move the JSON key to Secret Manager and retrieve it over HTTPS from the workflow so the key is never stored directly in the repository.

  • Grant the Compute Engine default service account the Editor role, download its private key, and store the key as a GitHub Actions secret for the deployment job.

  • Encrypt the existing JSON key with a customer-managed key in Cloud KMS, store the encrypted blob in the repository, and decrypt it in the workflow before running gcloud.

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