GCP Professional Cloud Security Engineer Practice Question
Your company operates a Java service in its on-premises data center that invokes Google Cloud Translation API with an API key embedded in application code. Security engineers want to reduce the blast radius if the key is leaked: the key must remain usable only from the data-center's two static egress IP addresses and must never work against any Google APIs except Cloud Translation. Which configuration best satisfies these requirements while preserving current functionality?
Keep the key unrestricted but set per-user daily quota to zero for every Google API except Cloud Translation.
Replace the API key with OAuth 2.0 service-account authentication so requests use signed JWTs instead of an API key.
Edit the existing API key to add an IP address application restriction for the two egress IPs and enable an API restriction that permits only the Cloud Translation API.
Place Cloud Translation API and the on-premises project inside a VPC Service Controls service perimeter that blocks egress to all other Google APIs.
You can harden an API key in two complementary ways:
Application restrictions - limit where requests can originate (for example, specific IPv4 address ranges).
API restrictions - list exactly which Google APIs the key may call. By editing the existing key to add an IP address application restriction for the on-premises egress addresses and an API restriction that allows only the Cloud Translation API, any stolen key used from another IP or against another Google API will be rejected.
Creating a VPC Service Controls perimeter does not evaluate calls that use API keys, so it would not mitigate misuse. Switching to OAuth 2.0 credentials would protect the call but requires code changes and does not meet the "preserve current functionality" constraint. Lowering quotas on all other services still permits abuse up to the quota limit and fails to block calls entirely.
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.
How do application restrictions work for API keys?
Open an interactive chat with Bash
What are API restrictions and how do they protect API keys?
Open an interactive chat with Bash
Why doesn't VPC Service Controls work with 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 .