Ensure logging is enabled on AWS WAFv2 regional and global web ACLs for enhanced security measures.
Rule | Logging should be enabled on AWS WAFv2 regional and global web access control list (ACLs) |
Framework | GxP 21 CFR Part 11 |
Severity | ✔ Low |
Rule Description:
Enabling logging on AWS WAFv2 regional and global web access control lists (ACLs) is necessary to ensure compliance with GxP 21 CFR Part 11 regulations. Logging provides a detailed record of all web traffic that passes through the ACLs, allowing for effective monitoring, analysis, and auditing of security events. By activating logging, administrators can gain insights into potential security breaches, track unauthorized access attempts, and maintain an accurate trail of actions taken within the system.
Troubleshooting Steps:
If there are any issues with enabling logging on AWS WAFv2 regional and global ACLs, the following troubleshooting steps can be performed:
Check AWS WAFv2 Configurations: Verify that the WAFv2 configurations are correctly set up, including the creation of regional and global ACLs.
Verify Logging Configuration: Ensure that the logging configuration for the ACLs is correctly specified. Check the destination for logs, such as Amazon CloudWatch Logs, to guarantee that the ACLs are correctly linked to the logging service.
IAM Permissions: Verify that the IAM user or role used to enable logging has the necessary permissions to access and write logs to the designated logging service.
CloudWatch Logs Permissions: Confirm that IAM permissions provide the necessary permissions to write logs to CloudWatch Logs. The IAM policy should include the "logs:CreateLogGroup" and "logs:CreateLogStream" actions.
Double-Check ACL Association: Ensure that the regional and global ACLs are correctly associated with the desired resources, such as Amazon API Gateway or Application Load Balancer.
Necessary Codes:
aws wafv2 update-web-acl \ --name <ACL_NAME> \ --scope REGIONAL \ --default-action ALLOW \ --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=<METRIC_NAME> \ --logging-configuration LogDestinationConfigs=<CLOUDWATCH_LOG_ARN>
aws wafv2 update-web-acl \ --name <ACL_NAME> \ --scope CLOUDFRONT \ --default-action ALLOW \ --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=<METRIC_NAME> \ --logging-configuration LogDestinationConfigs=<CLOUDWATCH_LOG_ARN>
Make sure to replace the placeholders with appropriate values:
<ACL_NAME>
: The name of the access control list.<METRIC_NAME>
: The desired name for the CloudWatch metric.<CLOUDWATCH_LOG_ARN>
: The Amazon Resource Name (ARN) of the CloudWatch Logs destination.Step-by-Step Guide for Remediation:
Follow the step-by-step guide below to enable logging on AWS WAFv2 regional and global web access control lists:
By following these steps, you can enable logging on AWS WAFv2 regional and global web access control lists, ensuring compliance with GxP 21 CFR Part 11 regulations while maintaining a secure environment.