An enterprise is improving the security posture of an existing web portal hosted on Amazon EC2 instances behind an Application Load Balancer (ALB). The security team attaches an AWS WAF WebACL to the ALB with the following requirements:
1. Block all requests containing SQL injection (SQLi) patterns.
2. Limit requests from any single IP address to a maximum of 2,000 requests per 5 minutes.
3. Allow an external partner's automated testing suite, which originates from a specific static IP range, to bypass the rate limit.
The WebACL is initially configured with the following rules:
- Priority 10: A rule matching the partner's IP address range with an action of Allow.
- Priority 20: An AWS Managed Rules SQL database rule group with an action of Block.
- Priority 30: A custom rate-based rule set to Block requests exceeding 2,000 per 5 minutes.
- Default Action: Allow.
During a penetration test, the partner successfully performs a SQL injection attack against the portal.
Which configuration change should the security team implement to resolve this vulnerability while meeting all requirements?
- Reorder the WebACL rules so that the SQL database rule group is evaluated at Priority 10, the partner's IP match rule (with an Allow action) is evaluated at Priority 20, and the rate-based rule (with a Block action) is evaluated at Priority 30.Answer
- BChange the action of the partner's IP match rule at Priority 10 to Count, while keeping the SQL database rule group at Priority 20 and the rate-based rule at Priority 30.
- CReorder the WebACL rules so that the rate-based rule is evaluated at Priority 10, the partner's IP match rule (with an Allow action) is evaluated at Priority 20, and the SQL database rule group is evaluated at Priority 30.
- DImplement a Service Control Policy (SCP) at the AWS Organizations root to block SQL injection payloads at the Organization level, and remove the SQL database rule group from the WebACL.