Microsoft Azure Developer Associate AZ-204 Practice Question
You manage an Azure API Management (APIM) instance that exposes several internal APIs to external partners. To reduce the risk of accidental exposure of subscription keys in browser history and logs, the security team requires that callers send the key only in the Ocp-Apim-Subscription-Key request header. Any request that includes the subscription-key query-string parameter must be rejected before it reaches the backend service. Which built-in APIM policy should you add to the inbound pipeline of the affected APIs to meet this requirement with the least custom code?
Add an inbound check-header policy that requires the key in Ocp-Apim-Subscription-Key.
Add an inbound validate-parameters policy that asserts the subscription-key query parameter does not exist.
Add an inbound rewrite-uri policy to remove the subscription-key parameter from the URL before forwarding.
Add an outbound rate-limit-by-key policy that throttles requests when the key appears in the query string.
The validate-parameters policy can inspect incoming requests and enforce rules on individual parameters defined in an API specification, including query-string parameters. By configuring a rule that declares the subscription-key parameter must not exist (exists="false"), APIM automatically returns a policy-defined error response when the key is passed in the URL. The policy acts before the request is forwarded, so no backend code changes are needed.
Other options are incorrect:
check-header validates request headers, not query parameters, so it cannot detect the key in the query string.
rewrite-uri rewrites URLs but does not block requests based on parameter presence.
rate-limit-by-key controls call volume; it neither inspects nor rejects based on where the key is supplied.
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 a validate-parameters policy in Azure API Management?
Open an interactive chat with Bash
Why can't the check-header policy detect query-string parameters?
Open an interactive chat with Bash
What are the differences between rewrite-uri and validate-parameters in APIM?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Connect to and consume Azure services and third-party services
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 .