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

1 hour, 26 minutes remaining!

GCP Professional Cloud Architect Practice Question

Your team maintains a single-page web app that currently calls the Google Maps Places API directly from the browser using an unrestricted API key stored in JavaScript. Security asks you to keep the key confidential and limit its potential blast radius while minimizing refactoring effort on the frontend. Which design best meets these requirements?

  • Replace the API key with an OAuth 2 refresh token stored in browser local storage and exchange it for short-lived access tokens on each request.

  • Continue calling the Places API directly from the browser but restrict the API key to the site's HTTP referrer headers.

  • Embed the API key in the JavaScript bundle encrypted with AES-256 and decrypt it in client-side code at runtime before each Places request.

  • Proxy all Places API requests through a lightweight Cloud Run service, retrieve the API key from Secret Manager at startup, pass it to the container via an environment variable, and restrict the key to the service's static egress IP address.

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