GCP Professional Cloud Architect Practice Question
Your organization runs hundreds of microservices on GKE that need to read and write to Cloud Storage and BigQuery. Today each service includes an API key compiled into the container image, which security teams flagged as non-compliant. You must redesign authentication to meet Google Cloud best practices for server-to-server access while minimizing operational overhead and avoiding long-lived secrets in containers. What should you do?
Enable Workload Identity and bind each Kubernetes service account to a Google Cloud service account so pods obtain short-lived OAuth 2.0 tokens automatically at runtime.
Create a single shared service account, generate a JSON key file, and bake the key into all container images for authentication.
Store the existing API keys in Kubernetes ConfigMaps and inject them into pods as environment variables during deployment.
Implement the installed-application OAuth 2.0 flow and persist the resulting refresh token on each pod's filesystem for reuse.
Google-recommended practice for server-to-server access is to use service accounts that issue short-lived OAuth 2.0 access tokens at runtime instead of embedding long-lived credentials such as API keys. On GKE, Workload Identity lets you map a Kubernetes service account to a Google Cloud service account, so the workload automatically receives short-lived, auto-rotated tokens without storing secrets in the container image. Storing API keys in ConfigMaps, baking JSON key files into images, or persisting user-based refresh tokens all keep long-lived secrets in the workload and violate recommended security guidance.
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.
What is Workload Identity on GKE?
Open an interactive chat with Bash
How does Workload Identity improve security compared to API keys?
Open an interactive chat with Bash
How do you configure Workload Identity to bind Kubernetes and Google Cloud service accounts?
Open an interactive chat with Bash
What is Workload Identity in Google Kubernetes Engine (GKE)?
Open an interactive chat with Bash
Why are long-lived secrets like API keys considered non-compliant in Google Cloud environments?
Open an interactive chat with Bash
How does Workload Identity improve security compared to other authentication methods on GKE?
Open an interactive chat with Bash
GCP Professional Cloud Architect
Managing implementation
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 .