Cloud service · Azure · Updated

Azure Web Application Firewall - Azure Web Application Firewall is a managed HTTP-layer security service that inspects web requests and applies rules to detect or block attacks against applications and APIs.

In short

Azure Web Application Firewall provides centralized protection against common web exploits, malicious bots, and abusive request patterns through managed rules and application-specific policies. It integrates with Azure Front Door for global edge protection, Azure Application Gateway for regional protection, and Application Gateway for Containers for supported Kubernetes workloads, with capabilities varying by platform and tier.

Cloud Services Hub →

9 key features of Azure Web Application Firewall

01
Managed attack detection rules

Apply Microsoft-managed rule sets to detect common attacks such as SQL injection, cross-site scripting, and protocol violations. Select a rule set supported by the deployment platform, and test version upgrades before enforcing them in production.

02
Custom request filtering

Create prioritized rules using supported conditions such as source IP address, geographic location, request method, URI, or headers. Custom rules execute before managed rules, so narrowly scope allow actions to avoid unintentionally bypassing inspection.

03
Detection and Prevention modes

Use Detection mode to observe rule matches while assessing application compatibility. After tuning and validating legitimate workflows, switch to Prevention mode to enforce blocking.

04
Application-specific policy scope

Separate policies by application to isolate exclusions, custom rules, and rollout risk. Application Gateway WAF_v2 supports gateway, listener, and path-based associations, while Front Door Premium supports profile, domain, and route scopes.

05
Rate limiting and bot controls

Use supported rate-limit rules to reduce abusive request volumes and bot rules to classify automated traffic. Choose thresholds that account for shared client IP addresses, and verify which controls are available on the selected platform and tier.

06
False-positive tuning

Use exclusions, exceptions, and managed rule overrides to accommodate legitimate application traffic. Prefer the narrowest available scope so that resolving one false positive does not weaken protection across unrelated requests.

07
Request body inspection

Inspect supported request body formats, including JSON and XML on Application Gateway, to identify attacks beyond URLs and headers. Validate inspection limits and upload behavior against the application's payload sizes and content types.

08
Investigation and security telemetry

Export WAF diagnostics for querying, alerting, and security correlation. WAF Insights on Application Gateway and Front Door provides built-in dashboards for investigating rule matches, blocked requests, attack patterns, and potential false positives.

09
Sensitive-data protection in logs

Configure supported log-scrubbing settings to mask sensitive request values before they are written to WAF logs. Restrict access to diagnostic destinations because remaining request details can still contain confidential application information.

Where Azure Web Application Firewall is used

  1. 01
    Protect globally distributed applications

    Use Front Door Premium WAF to inspect traffic at the edge before routing it to regional origins. Restrict direct origin access so attackers cannot bypass the WAF by contacting a backend endpoint.

  2. 02
    Secure regional web applications

    Deploy Application Gateway WAF_v2 in front of applications hosted on virtual machines, App Service, or supported private backends. Assign separate listener or path policies when applications on the same gateway need different controls.

  3. 03
    Reduce exposure during vulnerability remediation

    Apply relevant managed rules or a narrowly targeted custom rule while an application vulnerability is being patched. Test the control against the specific exploit and legitimate requests; WAF coverage is not a guarantee that every variant is blocked.

  4. 04
    Limit automated endpoint abuse

    Apply bot protection and rate limits to endpoints such as sign-in, search, and checkout. Combine these controls with application-side authentication, account protections, and quotas rather than relying on source IP filtering alone.

  5. 05
    Centralize web attack investigation

    Send WAF events to a shared monitoring or security workspace to investigate attacks across applications. Correlate rule matches with backend errors and deployment changes to distinguish hostile traffic from policy regressions.

  6. 06
    Protect Kubernetes ingress

    Place Application Gateway WAF_v2 in front of supported AKS ingress architectures, or use Application Gateway for Containers WAF for supported Gateway API deployments. Verify platform-specific policy support before reusing rules from another WAF deployment.

How Azure Web Application Firewall is priced

Application Gateway WAF_v2 consumption

WAF protection is purchased through the Application Gateway WAF_v2 tier rather than as an independent inspection appliance. Costs include the gateway's fixed hourly charge and capacity-unit consumption, with applicable networking and monitoring charges added separately.

Front Door Standard WAF add-on

Front Door Standard supports custom WAF rules, with WAF charges based on configured policies, rules, and processed requests under the applicable pricing schedule. Front Door base, request, and data-transfer charges also apply; managed rule sets require Premium.

Front Door Premium bundled WAF

Front Door Premium includes WAF capabilities within its tier pricing rather than charging separately for WAF policies and rules. Budget for the Premium base fee, request processing, data transfer, and any additional origin or diagnostic costs.

Services Azure Web Application Firewall works with

A common global architecture places Front Door Premium WAF ahead of App Service, regional gateways, or other supported origins. Front Door handles edge routing and WAF enforcement, while origins provide application processing. Prevent direct origin access through supported private connectivity or carefully configured network and application restrictions. Where public Front Door origin access is required, combine permitted Front Door traffic sources with validation of the expected Front Door instance.

Regional architectures typically use Application Gateway WAF_v2 to inspect traffic entering applications in or connected to a virtual network. Separate listener or path policies allow applications sharing a gateway to use different exclusions and custom rules. Kubernetes workloads can use supported Application Gateway integrations or Application Gateway for Containers WAF, but policy features are not interchangeable across platforms.

Centralize diagnostics in Azure Monitor and Log Analytics, then connect relevant events to Microsoft Sentinel for security correlation. During rule rollouts, compare WAF matches with access logs, backend failures, and application deployment times. Configure scrubbing, retention, alerts, and rollback procedures together. For eligible public regional endpoints, combine WAF with Azure DDoS Protection to address both HTTP-layer attacks and network-layer floods.

Azure Front Door

Front Door provides the global edge request path where WAF policies inspect incoming traffic before it reaches origins. For example, apply a baseline policy across a Premium profile and a targeted route policy for a sign-in endpoint. Use Premium when managed rule sets are required, and secure origins against direct access.

Azure Application Gateway

Application Gateway combines regional HTTP routing, TLS termination, and WAF inspection within a virtual network deployment. For example, host multiple application listeners on one WAF_v2 gateway and associate a distinct policy with each application. Configure backend TLS and health probes independently of WAF rule settings.

App Service

Protect App Service applications by routing requests through Front Door WAF or Application Gateway WAF. For example, expose a web application through Front Door Premium and use supported Private Link connectivity to its origin. If the origin remains public, configure access restrictions and, for Front Door, validate the expected instance identifier to reduce bypass risk.

Azure Kubernetes Service (AKS)

AKS applications can receive inspected traffic through an Application Gateway WAF_v2 architecture or supported Application Gateway for Containers WAF deployments. For example, apply WAF protection to a public Kubernetes API service exposed through a Gateway API configuration. Check controller compatibility, policy attachment behavior, and supported rule features before deployment.

Azure Monitor

Use diagnostic settings on the hosting Front Door or Application Gateway resources to send WAF events to a Log Analytics workspace. For example, query blocked requests by URI and rule identifier after an application release, then alert on unexpected increases. Apply log scrubbing and retention policies before collecting sensitive request details.

Microsoft Sentinel

Microsoft Sentinel consumes WAF telemetry through the relevant logging and connector configuration to support security investigations. For example, correlate repeated WAF detections against a sign-in endpoint with identity-related events to investigate credential attacks. Validate analytic rules and automation so false-positive WAF matches do not trigger inappropriate response actions.

Azure DDoS Protection

Azure DDoS Protection complements WAF for supported public IP resources by addressing network-layer attacks rather than HTTP request content. For example, protect an eligible public Application Gateway endpoint with DDoS protection while WAF evaluates application requests. Front Door supplies its own platform-level network DDoS protection and uses a different deployment model.

API Management

Azure Web Application Firewall on Application Gateway can inspect incoming API requests before forwarding them to an API Management gateway in internal virtual network mode. This lets WAF filter malicious HTTP requests while API Management handles tasks such as authentication and throttling.

Azure Blob Storage

Azure Web Application Firewall logs can be archived in Azure Blob Storage through diagnostic settings on Application Gateway or Front Door. You can retain rule matches and blocked-request records for later investigations.

Azure Content Delivery Network

Azure Web Application Firewall policies can be associated with endpoints on Azure CDN Standard from Microsoft (classic). The firewall evaluates incoming requests at the CDN edge and can block matching requests before they reach the origin.

Alternatives to Azure Web Application Firewall in other clouds

AWS

AWS WAFAWS WAF

AWS WAF and Azure Web Application Firewall inspect web requests and use managed and custom rules to protect applications and APIs. AWS WAF integrates directly with services such as CloudFront and API Gateway, while Azure WAF runs through Front Door, Application Gateway, or Application Gateway for Containers; Azure Front Door requires Premium for managed rules.

Compare fact by fact
Azure Web Application FirewallAWS WAF
Deployment integrationsFront Door, App Gateway (+ Containers)CloudFront, ALB, API Gateway and more
Edge WAF billingStandard add-on; included in PremiumPay-as-you-go or flat-rate plans
Rule evaluation orderCustom rules before managed rulesConfigurable rule priority
Compared Nov 2026

What is Azure Web Application Firewall

2 min read

Azure Web Application Firewall (WAF) inspects HTTP and HTTPS requests before they reach protected applications. It evaluates request attributes such as headers, cookies, query strings, and supported request bodies against managed and custom rules. Managed rules detect patterns associated with SQL injection, cross-site scripting, protocol violations, and other common attacks. WAF reduces exposure to known attack techniques, but it does not replace secure application development, authentication, authorization, or vulnerability remediation.

Choose the hosting platform according to the application's traffic path. Azure Front Door applies WAF policies at Microsoft's global edge and can protect applications with origins in multiple regions or outside Azure. Front Door Premium supports managed rules and the full WAF feature set; Front Door Standard supports custom rules only. Application Gateway WAF_v2 provides regional inspection through a gateway deployed in an Azure virtual network. Application Gateway for Containers provides a WAF option for Kubernetes Gateway API workloads, with a platform-specific feature set.

A WAF policy contains enforcement settings, custom rules, managed rule selections, and tuning configuration. On Application Gateway WAF_v2, policies can be associated with the gateway, individual listeners, or path-based routing rules. Front Door Premium supports policy associations at profile, domain, and route scope. Use application-specific policies or appropriately scoped associations when applications require different exclusions, request limits, or enforcement controls. Keep policy definitions in source control and deploy changes through infrastructure-as-code workflows.

Introduce new policies and managed rule upgrades in Detection mode, collect representative production traffic, and investigate matches before enabling Prevention mode. Detection mode provides visibility rather than blocking protection. Tune false positives with narrowly scoped exclusions, exceptions, or rule overrides instead of broadly disabling inspection. Custom rules run before managed rules, so review allow rules carefully because they can bypass subsequent evaluation. Test sign-in, uploads, API requests, and administrative workflows after every material policy change.

Configure rate limits to reduce scraping, repeated login attempts, and request floods, while accounting for legitimate clients that share public IP addresses. Enable supported bot protection when automated traffic is a concern. Review request body inspection and size settings against application requirements; inspection limits and supported controls differ between platforms and rule set versions. WAF is not an API schema validator or a substitute for application-level quotas and authorization.

Prevent attackers from bypassing inspection by restricting direct access to application origins. For Front Door, use supported private origin connectivity where appropriate, or combine network restrictions with validation of the expected Front Door instance. Export diagnostic logs to Azure Monitor and correlate them with access logs and application telemetry. Configure sensitive-data scrubbing where supported, retain a known-good policy for rollback, and verify enforcement and logging after regional failover. For public regional endpoints, evaluate Azure DDoS Protection separately because WAF does not replace network-layer DDoS protection.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.