Azure WAF Policy

Azure WAF Policy Pre-Deployment Checklist

Azure Web Application Firewall Policy — rule set selection, custom rules, exclusions, and mode configuration for Application Gateway

Azure Networking Security

A comprehensive pre-deployment checklist for Azure Web Application Firewall (WAF) Policy as a standalone ARM resource associated with an Application Gateway (WAF_v2 SKU).

WAF Policy is a separate resource from the Application Gateway itself — it can be versioned, shared across multiple gateways, and updated independently. This checklist covers managed rule set selection and version, custom rule authoring (IP match, geo-match, rate limiting, string match), per-listener vs global policy association, exclusion planning, Detection-to-Prevention mode transition, bot protection, and IaC deployment.

Application Gateway infrastructure prerequisites (subnet, NSG, SKU selection, listeners, backend pools) are covered in the Azure Application Gateway Pre-Deployment Checklist. This checklist assumes the gateway is already provisioned or being provisioned in parallel.

GitHub View IaC on GitHub → Resource templates, deployment scripts, and other helpful information.
✅ All items checked — ready to deploy.
Progress
0% 0 / 0
▶ ARM Items marked ARM map to required properties in the ARM resource declaration — the portal will not submit and the ARM/Bicep template will fail validation without them.

Compliance alignment

This checklist is reviewed and maintained against three Microsoft architectural frameworks. Items within each section are tagged required, recommended, or optional based on framework guidance — with Zero Trust items typically driving the required bar, and Well-Architected pillar guidance informing the recommended set.

CAF
Cloud Adoption Framework
Governance & operations

WAF Policy naming follows CAF convention: waf-{workload}-{env}-{region}-{index} (example: waf-ecomm-prod-eus-01). The policy is a distinct, independently versioned ARM resource — store its Bicep definition alongside the Application Gateway template in the same source control repository, with branch protection requiring peer review on all rule changes. Governance items address resource tagging (Workload, Environment, CostCenter, createdBy), CanNotDelete locks on the policy resource group, and Azure Policy compliance. Managed rule set upgrades are a governance event requiring a documented review, a Detection-mode validation window, and a defined rollback plan before re-enabling Prevention.

WAF
Well-Architected Framework
All five pillars

Reliability: WAF policy changes that incorrectly block legitimate traffic effectively take down the application — validate all rule additions and exclusion removals in Detection mode first, with a defined rollback procedure. Security: Prevention mode with OWASP CRS 3.2 or Microsoft DRS is the baseline; bot protection add-on, rate limiting on sensitive endpoints, and geo-blocking of irrelevant regions strengthen posture significantly. Performance Efficiency: overly broad exclusions reduce WAF effectiveness; overly narrow rules increase false positives and block legitimate traffic — tune against actual traffic logs from ApplicationGatewayFirewallLog. Cost Optimization: WAF Policy itself is billed per policy and per rule evaluation at scale — review custom rule count and ensure no redundant rules are left from tuning sessions. Operational Excellence: policy-as-code in source control with staged rollout (Detection → Prevention) and structured runbook for rule lifecycle management.

ZT
Zero Trust
Verify, least privilege, assume breach

Verify explicitly: WAF Prevention mode is the baseline — Detection-only WAF provides zero active protection, it only logs. Every request reaching backend application code must have traversed an actively blocking WAF policy. Per-listener policies allow stricter rules on sensitive paths (admin, API, auth) without loosening rules on public paths. Least privilege: WAF Policy Contributor access is time-bound via PIM — no standing write access for operations teams, as a misconfigured rule change blocks the entire application immediately. Assume breach: ApplicationGatewayFirewallLog provides a complete record of every request the WAF evaluated, every rule that fired, and every block action taken. Continuous monitoring of this log for anomalies (rule spike, new geo or IP pattern, unusual User-Agent) is the WAF's contribution to the assume-breach detection posture.