4 of the 13 questions we have for this objective, shown with the answer and the reasoning.
Implement security for application platform services
Elmcroft Health publishes a patient-records API through Azure API Management. Client applications obtain access tokens from Microsoft Entra ID for an app registration whose application ID URI is api://patient-records. API Management must reject any request whose token was not issued by the company's tenant for that audience, and must reject tokens that lack the Records.Read role, before the request reaches the back end. The back-end code must not change.
Which inbound policy should you add?
- Avalidate-azure-ad-token with the tenant ID, an audiences element containing api://patient-records, and a required-claims element requiring the roles claim to contain Records.Read.validate-azure-ad-token is purpose-built for Microsoft Entra ID tokens: it checks issuer and signature for the tenant, enforces the audience, and can require specific claim values such as roles.
- Bcheck-header that requires the Authorization header to be present.check-header verifies only that a header exists or has a fixed value; it does not validate token signature, issuer, audience, or claims.
- CRequire a subscription key on the product and set subscriptionRequired to true.Subscription keys identify API Management subscribers; they are not identity tokens and do not enforce audience or role claims.
- Dip-filter with an allow list of the client applications' IP addresses.IP filtering restricts source addresses but provides no assurance of the caller's identity or authorization.
Why: API Management can enforce authentication at the gateway so that back ends never see unauthenticated traffic. The validate-azure-ad-token policy validates Microsoft Entra ID JWTs against the tenant's signing keys, enforces the expected audience, and supports required-claims to check roles or scopes, all without back-end code changes. The alternatives in the distractors each address a different control: check-header is a presence test, subscription keys are a usage-tracking and simple access mechanism, and ip-filter is a network allow list. The trap is treating a subscription key or IP allow list as equivalent to identity-based authorization.
Implement security for application platform services
Pemberly Travel has an HTTP-triggered Azure Functions app named func-bookings that is called by a single-page application. Today the function uses an anonymous authorization level. Security requires that every caller present a valid Microsoft Entra ID token issued to the company's tenant, and the function code must not be changed.
What should you configure?
- AChange the HTTP trigger's authLevel to function and distribute the function key to the application.Function keys are shared secrets, not user identities; they do not validate Entra tokens, and changing authLevel is a code or metadata change.
- BEnable App Service authentication (Easy Auth) on func-bookings with the Microsoft identity provider and set unauthenticated requests to return HTTP 401.Easy Auth runs as a platform middleware in front of the function host and validates Entra tokens for every request before the function code executes, with no code change.
- CAdd a Key Vault reference to the function app settings for the client secret used by the single-page application.Key Vault references deliver secrets to app settings; they do not authenticate incoming requests.
- DPlace the function behind Azure Front Door and enable the Web Application Firewall managed rule set.WAF inspects requests for attack patterns; it does not validate identity tokens or reject unauthenticated callers.
Why: App Service built-in authentication, commonly called Easy Auth, is available for Azure Functions and provides identity-based access control without code changes. The platform intercepts each request, validates the bearer token against the configured Microsoft Entra ID app registration, and either rejects unauthenticated calls or forwards them with identity headers. Function keys are the trap: they are shared API keys for simple scenarios and provide no user or tenant assurance. Key Vault references and WAF address secret storage and request filtering, which are different problems.
Implement security for application platform services
Cairnwood Publishing protects a content management web app with an Application Gateway WAF v2 policy in Prevention mode using the OWASP 3.2 managed rule set. Editors report that saving articles that contain SQL code samples is blocked. The WAF logs show rule 942100 in the SQLI rule group matching the request body field named articleBody. The security team requires that other requests, and other fields in the same request, remain fully protected.
What should you do?
- ASwitch the WAF policy to Detection mode.Detection mode logs but never blocks any rule, which removes protection for the entire application.
- BDisable the SQLI rule group in the managed rule set.Disabling the whole rule group removes SQL injection protection for every request and field, far beyond the single false positive.
- CAdd a per-rule exclusion for rule 942100 that excludes the request body post argument named articleBody from evaluation.Per-rule exclusions in Application Gateway WAF v2 scope the exemption to a specific rule and a specific match variable, so the rest of the request and all other rules continue to be enforced.
- DCreate a custom rule with priority 1 that allows all requests to the article save path.An allow custom rule with the highest priority bypasses all managed rules for every request on that path, leaving it unprotected.
Why: Handling false positives in a WAF is about narrowing the exemption to the smallest scope that resolves the problem. Application Gateway WAF v2 supports exclusions at the global, rule set, rule group, and individual rule level, and each exclusion can target a specific match variable such as a request body post argument name. Excluding the articleBody field from rule 942100 removes the false positive while every other rule and every other field remains in Prevention mode. The traps all reduce protection far beyond what is needed: Detection mode and disabling the rule group are global changes, and a high-priority allow custom rule short-circuits managed rule evaluation for the whole path.
Implement security for application platform services
Marlin Ticketing serves its public website through Azure Front Door Premium with a WAF policy that uses the Default Rule Set. During ticket releases, the login endpoint at /api/login receives bursts of password-guessing attempts from individual IP addresses. The security team wants any single client IP address that sends more than 100 requests to /api/login within one minute to be blocked, without affecting traffic to other paths.
What should you add to the WAF policy?
- AA custom rule of type rate limit, with a threshold of 100 requests per 1 minute, a match condition on the request URI containing /api/login, and the action Block.Front Door WAF rate-limit custom rules count requests per client address over a one- or five-minute window for requests matching the conditions and block the client once the threshold is exceeded.
- BThe Microsoft_BotManagerRuleSet managed rule set in Block mode.Bot Manager classifies known bad, good, and unknown bots by signature and reputation; it does not enforce a numeric per-IP request threshold on a specific path.
- CA custom rule of type match with a geo-location condition that blocks requests from outside the sales regions.Geo-filtering restricts by country or region and would not stop high-volume attempts from allowed regions, nor is it specific to the login path.
- DUpgrade the managed rule set to the latest Default Rule Set version and set the policy to Prevention mode.The managed rule set detects attack signatures such as injection; it does not implement request-rate thresholds.
Why: Azure Front Door WAF custom rules come in two types: match rules, which evaluate conditions on each request, and rate-limit rules, which additionally track the number of matching requests from each client address over a one- or five-minute window. A rate-limit rule scoped to the /api/login path with a threshold of 100 requests per minute and a Block action targets credential-stuffing bursts without affecting other traffic. Managed rule sets and Bot Manager are signature- and reputation-based and are the trap here: they are valuable complementary controls but do not express a numeric per-IP limit on a path.