Prompt
I’m building on Azure and want a WAF recommendation for login protection and bot mitigation.
Latest observation
For Azure login protection and bot mitigation, the best default recommendation is:
Recommended setup
Azure Front Door Premium + Azure Web Application Firewall (WAF)
This gives you:
- Global edge protection
- WAF rules for common web attacks
- Bot protection / mitigation capabilities
- DDoS resilience at the edge
- Better performance for users worldwide
Why this is the best fit
For login pages, you usually want to protect against:
- credential stuffing
- brute-force attacks
- automated scraping
- malicious bots
- OWASP Top 10 web attacks
Azure Front Door WAF helps by:
- filtering requests before they reach your app
- applying managed rule sets
- enabling custom rules for login paths like
/login,/signin,/auth - integrating with rate limiting and geo/IP controls
- supporting bot-oriented protection strategies
What to enable
1) Managed WAF rule sets
Use the latest Microsoft managed rules for:
- SQL injection
- XSS
- protocol anomalies
- common exploit patterns
2) Custom rules for login endpoints
Add rules such as:
- rate limiting on
/loginand/auth - block or challenge suspicious IP ranges
- allow only expected countries if appropriate
- block known bad user agents or ASN ranges if needed
3) Bot mitigation strategy
Use a layered approach:
- WAF bot rules / detection
- rate limiting
- authentication hardening
- MFA
- CAPTCHA / challenge mechanisms if your app supports them
- sign-in throttling in your identity provider
Important note
Azure WAF is very good for request filtering and bot reduction, but it is not a full identity protection product. For login abuse, pair it with:
- Microsoft Entra ID
- MFA
- Conditional Access
- Identity Protection for risky sign-ins
- app-level throttling and lockout policies
If your app is regionally deployed
If you do not need global edge protection, another option is:
- Application Gateway WAF v2
Use this when:
- traffic stays in one region
- you need internal/VNet integration
- you want regional WAF in front of app services/AKS
My recommendation by scenario
- Internet-facing login, global users: Azure Front Door Premium + WAF
- Single-region or internal app: Application Gateway WAF v2
- High-value login protection: Front Door WAF + Entra ID Identity Protection + app rate limits
Practical baseline recommendation
If I had to choose one for most Azure login pages: Azure Front Door Premium WAF with managed rules, custom rate limiting on auth endpoints, and Entra ID-based identity protections.
If you want, I can also give you:
- a reference architecture,
- a sample WAF policy, or
- a comparison of Front Door WAF vs Application Gateway WAF for login protection.