A company hosts a web application behind an Application Load Balancer (ALB) protected by an AWS WAF Web ACL. The Web ACL contains the AWS Managed Rules Common Rule Set (AWSManagedRulesCommonRuleSet) to block common web exploits.
During a deployment, a SysOps Administrator notices that legitimate requests to an administrative API endpoint, /import/config, are being blocked with an HTTP 403 Forbidden error. Troubleshooting WAF logs reveals that these requests are matching the GenericLFI_BODY rule within the managed rule group, which flags local file inclusion patterns in the request body. The administrator must resolve this false positive to allow legitimate requests to /import/config while ensuring that the rest of the application remains protected by this rule.
Which configuration will resolve the issue with the least administrative effort?
- AEdit the settings of the AWS Managed Rules Common Rule Set. Add a scope-down statement directly to the GenericLFI_BODY rule definition that excludes the URI path /import/config from being evaluated by the rule.
- BConfigure a Network Access Control List (NACL) rule for the ALB subnets to deny traffic from IP addresses that trigger the WAF rule. Use a custom AWS Lambda function triggered by Amazon CloudWatch Logs to dynamically update the NACL rules, excluding requests containing the /import/config URI path.
- Set the action of the GenericLFI_BODY rule within the AWSManagedRulesCommonRuleSet rule group to Count. Create a custom WAF rule in the Web ACL that evaluates after the managed rule group. Configure the custom rule to block requests that contain the awswaf:managed:aws:common-ruleset:GenericLFI_BODY label, unless the request's URI path matches /import/config.Answer
- DCreate an AWS Config rule to monitor WAF Web ACL changes. Configure an Amazon EventBridge rule that detects when the GenericLFI_BODY rule is triggered, and runs an AWS Systems Manager (SSM) Automation document to temporarily disable the rule group when requests contain the /import/config path.