Study guide

11.4 Web Application Firewall and API Management Protection

Microsoft Certified: Cloud and AI Security Engineer Associate SC-500

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Skills Measured & Weightings 1.3 Study Path, Prerequisites & Exam Strategy

2 Microsoft Entra ID Secure Access

2.1 Privileged Identity Management (PIM) 2.2 Conditional Access Policies 2.3 MFA and Passwordless Authentication 2.4 Application Identities, OAuth Consent & Managed Identities

3 Azure Key Vault Secrets and Keys

3.1 Deploy and Configure Key Vault 3.2 Access Control and Firewall for Key Vault 3.3 Keys, Secrets, Certificates & Defender for Key Vault

4 Governance, Policy & RBAC

4.1 Azure Policy for Security Controls 4.2 Defender for Cloud Compliance & Security Standards 4.3 Resource Locks and Azure RBAC 4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

5 Secure Storage Accounts

5.1 Storage Account Security Fundamentals 5.2 Storage Firewalls and Access Policies 5.3 Defender for Storage

6 Secure Databases

6.1 Azure SQL Platform Security 6.2 Database Auditing 6.3 Defender for Databases

7 Network Security Groups & Virtual Network Manager

7.1 Network Security Groups and Application Security Groups 7.2 Azure Virtual Network Manager Security Admin Rules 7.3 Virtual WAN and VPN Security

8 Private Access, Private Link & Azure Firewall

8.1 Microsoft Entra Private Access 8.2 Private Endpoints and Private Link 8.3 Azure Firewall 8.4 Network Watcher Diagnostics and Effective Rules

9 Security for AI Workloads

9.1 Purview DSPM for AI and Data Overexposure 9.2 Copilot Studio Protection and Agent Management 9.3 Microsoft Entra Agent ID Security 9.4 Defender for AI, Foundry Guardrails & AI Gateway

10 Secure Servers and Virtual Machines

10.1 Disk Encryption 10.2 Azure Bastion and JIT VM Access 10.3 Azure Arc and Defender for Servers 10.4 Trusted Launch, VM Security Features & Machine Configuration

11 Application Platform Security

11.1 Containers: AKS, ACR, ACI, Container Apps & Defender for Containers 11.2 Azure Functions and Logic Apps Security 11.3 Azure App Service Security 11.4 Web Application Firewall and API Management Protection

12 Defender for Cloud Security Posture

12.1 Defender CSPM and Secure Score 12.2 Workload Protection Plans and Multicloud Connectors 12.3 Vulnerability Management and Defender EASM

13 Microsoft Sentinel Activity and Event Collection

13.1 Workspaces, Roles & Content Hub 13.2 Data Connectors, Syslog/CEF & Windows Event Collection 13.3 Custom Tables, Retention & Purview Audit 13.4 Automation Rules and Playbooks

14 Microsoft Security Copilot & Final Review

14.1 Microsoft Security Copilot Workspaces and Roles 14.2 Plugins and Security Agents 14.3 Final Review and Exam-Day Strategy

11.4 Web Application Firewall and API Management Protection

Key Takeaways Explain This Topic AI

Azure WAF runs on Application Gateway (regional) and Azure Front Door (global edge) to inspect HTTP(S) for OWASP-style attacks, bots, and custom conditions.

WAF Detection mode logs without blocking; Prevention mode blocks matched requests—roll out Detection first when tuning.

Managed rule sets (OWASP CRS / Microsoft Default Rule Set) plus custom rules and bot protection form the core WAF policy toolkit.

API Management protects backends with inbound policies such as validate-jwt, rate-limit, and ip-filter, plus managed-identity authentication to backends.

AI Gateway patterns in APIM for Microsoft Foundry are covered in chapter 9—this section is the general WAF + APIM protection foundation those patterns extend.

Last updated: July 2026

11.4 Web Application Firewall and API Management Protection

Quick Answer: SC-500 measures Azure Web Application Firewall and security policies for back-end API protection by using API Management . Place WAF on Application Gateway or Azure Front Door to stop common web exploits; use APIM policies ( validate-jwt , rate limits, ip-filter , backend auth) so APIs are not a naked public surface. For AI Gateway in front of Microsoft Foundry, see chapter 9 —this section is the general platform foundation.

Even a perfectly configured App Service still runs application code that can be vulnerable to injection, protocol abuse, and automated bots. WAF and APIM are the edge control planes for HTTP and API traffic under application platform security.

Azure Web Application Firewall placement

Azure WAF is a service capability attached to global or regional entry points:

Host Scope Typical use

Azure Application Gateway WAF Regional, inside a VNet Zone-redundant regional apps, reverse proxy to App Service/AKS/VMs

Azure Front Door WAF Global edge (anycast POPs) Internet apps needing global distribution, edge TLS, integrated DDoS posture

Both evaluate HTTP(S) requests against WAF policies before traffic reaches healthy backends (when correctly architected so clients cannot bypass the WAF).

Bypass prevention (exam theme)

WAF only helps if attackers cannot hit the origin directly:

Lock App Service with access restrictions allowing only Front Door/App Gateway identifiers as documented

Or use private origins (Private Link to App Service / internal load balancers) so the public only sees the edge

Exam trap: Enabling WAF while leaving the App Service fully public with no origin filter = attackers skip the WAF.

Managed rule sets and OWASP

WAF policies include managed rule sets that encode protections aligned with common web attack classes (SQL injection, XSS, protocol anomalies, remote file inclusion patterns, and more)—often discussed in OWASP Top 10 terms.

  • Component Role
  • OWASP CRS / Microsoft Default Rule Set (DRS) Baseline signatures and anomaly scoring for common exploits
  • Bot Manager rule set Categories bots (good/bad/unknown) for allow/block/log strategies
  • Custom rules Your conditions: geo, IP, headers, URI, methods, rate limits (on supported SKUs)
  • Exclusions / per-rule actions Tune false positives without disabling the entire set
  • Policy mode Detection vs Prevention

You do not need to memorize every rule ID for SC-500. You do need to know that managed rules cover OWASP-class web attacks , that custom rules extend policy for business logic (block country X, allow partner IP Y), and that bot protection is a first-class managed set.

Prevention vs Detection

  • Mode Behavior When to use
  • Detection Matches are logged , traffic still flows Initial deployment, tuning, measuring false positives
  • Prevention Matches are blocked (per action configuration) Production once tuned

Operational pattern (same spirit as Conditional Access report-only):

Deploy WAF in Detection .

Review logs (Log Analytics / Sentinel).

Add exclusions for legitimate traffic that trips rules (for example unusual but valid headers).

Switch to Prevention .

Monitor blocked requests and backend health.

Exam trap: Leaving production internet apps in Detection forever “to be safe” fails the goal of blocking attacks. Detection is a phase , not the end state for exposed critical apps.

  • Custom rules and bot protection (high level)
  • Custom rules

Custom rules evaluate match conditions and take actions such as Allow, Block, Log, Redirect, or rate-based controls (feature set depends on Front Door vs Application Gateway SKUs).

Examples:

  • Block known-bad IP ranges
  • Geo-filter admin paths
  • Rate-limit extreme request rates from a single IP
  • Allow a monitoring probe path that would otherwise trip a managed rule (carefully)

Order matters: custom rules are processed with priority numbers; an early Allow can short-circuit later inspection depending on policy design—understand priority when tuning.

Bot protection

Bot Manager-type rule sets classify automated traffic. Strategies include:

  • Allow verified good bots (search engines) if desired
  • Block malicious bots
  • Challenge or log unknown bots (capabilities vary by product generation)

SC-500 level: know bot protection exists as managed rules , not the deep ML training details.

Azure API Management for backend API protection

Azure API Management (APIM) is a managed API gateway. SC-500 explicitly calls out security policies for back-end API protection . Think of APIM as policy middleware between clients and your Functions, App Service, Logic Apps, AKS services, or other APIs.

Inbound policy toolkit (memorize these)

Policy / pattern Security purpose

validate-jwt / validate-azure-ad-token Verify signature, issuer, audience, lifetime, required claims/roles/scopes

  • rate-limit / rate-limit-by-key Throttle abuse per subscription, IP, or claim
  • quota-by-key Longer-window quotas (monthly partner caps)
  • ip-filter Allow/deny CIDR ranges
  • Subscription keys Identify calling products/partners (not a full substitute for OAuth on sensitive APIs)
  • authentication-managed-identity APIM obtains Entra token to call Azure backends
  • authentication-certificate mTLS to backend
  • Header/body rewrite Strip sensitive data, enforce required headers
  • Backend protection patterns

Do not expose backends publicly when APIM is the front door—use private endpoints, VNet-injected APIM modes, or access restrictions allowing only APIM.

Authenticate APIM to the backend with managed identity; enable Easy Auth on the backend accepting only APIM’s app ID.

Least privilege products and subscriptions for external partners.

Named values referencing Key Vault for secrets used in policies.

Diagnostics to Log Analytics for failed JWT validations and spike detection.

validate-jwt exam focus

When a scenario says partners call with OAuth2 access tokens, the APIM answer is almost always validate JWT (or the Entra-specific validation policy) before the request reaches the backend. Check:

  • Signing keys / OpenID metadata
  • Audience matches the API
  • Issuer is your Entra tenant (or expected IdP)
  • Required roles/scopes
  • Expiry enforced

Subscription keys alone do not prove user/app identity with the same strength as JWT validation for Entra-protected enterprise APIs.

WAF and APIM together

They complement; they do not replace each other.

  • Layer Strength
  • WAF Generic HTTP exploit and bot filtering, platform-managed signatures
  • APIM API productization, OAuth/JWT, per-consumer rate limits, transformation, backend identity
  • App auth (Easy Auth) Application identity enforcement
  • Private networking Path isolation

Common design: Internet → Front Door WAF → APIM → private Function/App Service . WAF blocks SQLi/XSS noise; APIM enforces partner contracts and JWT; backend trusts only APIM’s managed identity.

For purely regional private APIs, Application Gateway WAF may sit in the hub instead of Front Door.

Cross-reference: AI Gateway (chapter 9)

Chapter 9.4 Defender for AI, Foundry Guardrails & AI Gateway covers configuring AI Gateway in Azure API Management for Microsoft Foundry —token limits, auth, logging, and governance specific to model/agent endpoints. Those controls build on the same APIM policy engine introduced here ( validate-jwt , rate limits, managed identity backends, observability). On SC-500:

Use this section for general web/API edge security (WAF modes, OWASP rules, classic API protection policies).

Use chapter 9 when the backend is Foundry / AI and the gateway is explicitly an AI Gateway pattern.

Do not invent a separate product that “replaces APIM” for AI; Microsoft’s measured skill is AI Gateway in APIM for Foundry scenarios.

Scenario: public payments API

Contoso exposes /payments to fintech partners.

Front Door Premium + WAF in Prevention with DRS + Bot Manager; custom rule rate-limits extreme clients.

Origin is APIM (public or via Private Link patterns as designed); backends not directly public.

APIM inbound: validate-jwt (audience api://payments , scope payments.write ), rate-limit-by-key per partner app ID, optional ip-filter for registered partner ranges.

Backend Function: Easy Auth + only APIM managed identity; Function MI to Key Vault and Cosmos DB.

Logs: WAF + APIM diagnostics → Sentinel for JWT failure spikes and blocked SQLi attempts.

SC-500 traps

WAF Detection forever — Must move critical apps to Prevention after tuning.

APIM subscription key equals Entra user auth — Keys identify subscriptions; JWT validates identity tokens.

WAF replaces input validation in code — Defense in depth; developers still fix vulnerabilities.

Public backend behind “secret URL” — Bypasses gateway controls; lock origin.

Confusing Azure Firewall with WAF — Firewall is broader network filtering; WAF is HTTP application inspection on App Gateway/Front Door.

Mixing AI Gateway details here — Keep Foundry-specific AI Gateway content tied to chapter 9 skills.

Engineer checklist

Choose Front Door WAF (global) vs Application Gateway WAF (regional) based on architecture.

Start managed rules in Detection , tune, then Prevention .

Add custom rules and bot protections appropriate to risk.

Ensure origins cannot be bypassed .

Front APIs with APIM ; apply validate-jwt , rate-limit , ip-filter as needed.

Authenticate APIM → backend with managed identity ; harden backend Easy Auth/network.

Centralize logs; alert on block spikes and auth failures.

For Foundry/AI front doors, apply chapter 9 AI Gateway patterns on the same APIM foundation.

Bottom line: SC-500 application edge security is WAF for malicious HTTP plus APIM for identity-aware API contracts . Configure both, close bypass paths, and remember AI Gateway is the specialized APIM application of these ideas for Foundry—not a totally separate exam silo.