You are deploying a new WAF policy on an Azure Application Gateway WAF_v2 instance that serves a production web application. The requirements are:
- During the first two weeks, the WAF must not block any requests.
- During that period, the security team must be able to review the WAF log to find which requests match rules, so that they can add exclusions or custom rules.
- After tuning, the WAF must block attacks that meet the configured blocking criteria.
Which rollout approach meets the requirements?
Why
Microsoft recommends an initial Detection period for collecting logs and tuning a new production WAF. Application Gateway diagnostics must be enabled with the WAF log selected so the team can review the matches. After tuning, Prevention mode blocks requests that meet the configured blocking criteria.
- Not correct: Start in Prevention mode with the WAF log turned on, and keep Prevention mode. The source explains that Prevention mode blocks detected attacks that meet the blocking criteria. It therefore permits blocking during the initial period, violating the requirement to allow every request.
- Not correct: Start in Detection mode with the WAF log turned on, and keep Detection mode. The source states that Detection mode does not block incoming requests. Keeping that mode would prevent enforcement after tuning.
- Not correct: Start in Detection mode without turning on diagnostics, then switch to Prevention mode. The source requires logging diagnostics to be enabled and the WAF log to be selected. Without those settings, the team cannot review the required WAF log during tuning.
- Correct: Start in Detection mode with the WAF log turned on, then switch to Prevention mode. The source explains that Detection mode permits requests while logging threat alerts when diagnostics and the WAF log are enabled. Prevention mode subsequently enforces blocking for requests that meet the blocking criteria.
Source