An enterprise hosts a partner-only web portal behind an Application Load Balancer (ALB). To secure the portal, a Solutions Architect configures an AWS WAF Web ACL with a default action of 'Block'. The Web ACL contains two rules: a rule using an IP set to allow corporate partner network ranges, and a rate-based rule to block clients sending more than 2,000 requests per 5 minutes. The IP allowlist rule is currently evaluated first. During a security audit, a simulated HTTP flood from a partner's IP address successfully overwhelms the backend servers because the rate-based rule was not triggered. Which of the following changes should the Solutions Architect make to remediate this vulnerability?
- AKeep the IP allowlist rule evaluated first, but configure a scope-down statement within the IP allowlist rule that references the rate-based rule to dynamically exclude blocked IPs.
- Configure the rate-based rule with a higher evaluation priority (lower rule priority number) than the IP allowlist rule, ensuring the rate-based rule is evaluated first.Answer
- CDeploy a Service Control Policy (SCP) at the AWS Organizations Organizational Unit (OU) level that restricts the maximum request rate for the ALB, allowing the SCP to override local WAF rule evaluation.
- DConfigure AWS-managed KMS key policies for the application's database to restrict API decryption rates, throttling the partner's traffic at the database layer instead.
Answer
Configure the rate-based rule with a higher evaluation priority (lower rule priority number) than the IP allowlist rule, ensuring the rate-based rule is evaluated first.
Evaluating the rate-based rule first ensures that any client exceeding the request threshold is blocked, regardless of whether their IP is on the corporate partner allowlist. Requests from partner IPs that do not exceed the rate limit will proceed to the next rule and be allowed.
Step-by-Step Solution
Key Concept
AWS WAF Web ACL rule evaluation order and action behaviors