GCP Professional Cloud Security Engineer Practice Question
A travel-tech company discovered that several Google Maps API keys were accidentally committed to a public Git repository. You are asked to redesign key management so that
API keys are never stored in source code,
the keys are rotated every 90 days with minimal manual effort, and
unused keys are quickly identified and removed. All workloads run on Google Kubernetes Engine and Cloud Functions. Which approach best meets all three requirements?
Move the keys into Kubernetes ConfigMaps managed by Config Sync and instruct developers to update the ConfigMap files and redeploy every quarter.
Store each API key in Secret Manager; use Cloud Scheduler to invoke a Cloud Function that calls the API Keys API to create a new key, update the Secret Manager version consumed by GKE and Cloud Functions, monitor usage, and delete the old key after cut-over.
Disable API key usage entirely and replace it with OAuth 2.0 access tokens while leaving the current keys active as a fallback in case of migration issues.
Encrypt the existing keys with Cloud KMS, commit the ciphertext to the repository, and require each service to decrypt the key at runtime; rotate by generating and committing new ciphertext versions manually.
Storing the API keys in Secret Manager removes them from source code and lets you control access through IAM. Automating rotation with Cloud Scheduler and a Cloud Function that uses the API Keys API can create a new key, update the Secret Manager version, monitor traffic to verify adoption, and then delete the previous key. This satisfies non-embedding, regular automated rotation, and timely removal of unused keys. The other options either continue to embed keys, require manual rotation, or leave old keys active, so they do not meet all stated requirements.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is Secret Manager preferred for storing API keys?
Open an interactive chat with Bash
How does Cloud Scheduler automate the rotation of API keys?
Open an interactive chat with Bash
What is the role of the API Keys API in this solution?
Open an interactive chat with Bash
What is Google Secret Manager, and why is it used for managing API keys?
Open an interactive chat with Bash
How does the Cloud Scheduler work with Cloud Functions for automation?
Open an interactive chat with Bash
What is the API Keys API, and how does it monitor and update API keys?
Open an interactive chat with Bash
GCP Professional Cloud Security Engineer
Securing communications and establishing boundary protection
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .