GCP Professional Cloud Architect Practice Question

A retail analytics company is containerizing a Python service and deploying it to Cloud Run in multiple regions. The service must query a specific BigQuery dataset at runtime. Security has issued two hard requirements:

  1. No long-lived secrets such as user credentials, refresh tokens, or downloadable key files may be stored in the container image or passed through environment variables.
  2. Each running instance must have only the permissions required to read from the target dataset. Developers want to keep code changes minimal and rely on standard Google libraries for authentication. Which implementation best meets all of these requirements?
  • Generate an API key restricted to BigQuery, limit it to the Cloud Run egress IP ranges, and pass the key in the Authorization header of every request to BigQuery.

  • Create an IAM user account, generate an OAuth 2.0 refresh token, store the token in Secret Manager, and have the container exchange it for access tokens when calling BigQuery via the REST API.

  • Assign the Cloud Run service a dedicated service account with the BigQuery Data Viewer role on the required dataset, deploy the service to run under that account, and use the Python Cloud Client Library so the code relies on Application Default Credentials provided automatically at runtime.

  • Store a service-account JSON key file in a private Cloud Storage bucket, mount the file into the container at startup, and set the GOOGLE_APPLICATION_CREDENTIALS environment variable so the code can authenticate to BigQuery.

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