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

1 hour, 59 minutes remaining!

GCP Professional Cloud Architect Practice Question

Your data science team runs nightly Python batch jobs on unmanaged Compute Engine VMs to process BigQuery datasets and write results to Cloud Storage. Currently the scripts use hard-coded API keys through the google-api-python-client. Security wants to eliminate embedded secrets and enforce least-privilege, while also reducing code maintenance. Which approach should you recommend?

  • Add a startup script that runs gcloud auth application-default login so the code can read user credentials from the gcloud configuration directory.

  • Attach a least-privilege service account to each VM and migrate the code to Google Cloud Client Libraries, which use Application Default Credentials obtained from the metadata server.

  • Implement an OAuth 2.0 installed-application flow that prompts an operator to grant access each time the batch job starts and caches the refresh token on disk.

  • Store the existing API keys in Secret Manager and load them as environment variables at runtime while continuing to use google-api-python-client.

GCP Professional Cloud Architect
Managing implementation
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