AWS WAF v2Old PlanLegacyUsage
This article explains how to configure Log and Notification configuration on WAF Config if you are using the old plan and Legacy rule policy.
There are three configurations in this case.
After you’ve completed the initial configuration, you can click the [Edit] button on the details page to change or add configurations.
This configuration will transfer access logs from ALB and CloudFront to WafCharm.
By transferring access logs, WafCharm can aggregate a number of web requests and provide dynamic denylist by rematching signatures to access logs.
If you have more than one resource attached to your web ACL, please add Web Site Configs for each resource.
If you are using CloudFront, please see the [If you are using CloudFront] section first.
This field is for management purposes only. The value can be optional. Please enter a value that makes it easy for you to manage the configurations.
If your CloudFront access logs are outputted to S3://bucket-name/optional-prefix/
, enter the complete S3 path.
If your ALB access logs are outputted to S3://bucket-name/optional-prefix/AWSLogs/aws-account-id/elasticloadbalancing/region/
, enter the complete S3 path.
If you want to use the same credential as WAF Config, check [Reuse Credential in Basic Config].
If you want to select a different credential, uncheck [Reuse Credential in Basic Config] and choose the credential from the drop-down menu, or click the [Register new credential] link to add new credential information.
How to configure Credential Store for AWS WAF v2 (new plan/MP ver.)
If you have multiple resources (ALB and CloudFront) attached to your web ACL and want to register multiple Web Site Configs (S3 path to each resource's access logs), click the [Add Web Site Config] button to add another Web Site Config.
If you have accidentally added a Web Site Config, click the garbage can icon at the bottom right corner to delete it.
There are multiple ways to output access logs in CloudFront. However, WafCharm is only compatible with access logs from the type [S3 Legacy].
When using WafCharm, please select [Amazon S3 (Legacy)] as your logging destination and register the S3 Path of that configuration in Web Site Config.
Please note that you can select other destinations, such as Amazon S3 and CloudWatch Logs, in addition to Amazon S3 (Legacy), in the CloudFront logging setting. Please refrain from registering S3 Path from Amazon S3 because WafCharm is only compatible with access logs from Amazon S3 (Legacy).
In addition, if you are configuring both [Amazon S3] and [Amazon S3 Legacy], please set different paths. If the S3 destination log file path conflicts with another S3 destination, access logs will overwrite one another, and WafCharm may be unable to use the transferred access logs.
"FQDN value" is the actual FQDN value you registered when adding a Web Site Config.
There are two methods of WAF log retrieval: the new method and the old method.
The new method allows users to enable WAF log-related features by opting in with a WAF log retrieval checkbox.
The old method is the same as the one available on the old WafCharm Dashboard, which uses Lambda to transfer WAF logs.
If you are using the Legacy rule policy, you can use both, but it is recommended to switch to the new method.
*Currently, WAF log retrieval is limited to old plan users. If you want to use the new method, please contact the WafCharm support team with details on logging configurations per WAF Config.
Enabling WAF log retrieval is optional. If you want to refrain from configuring this option, do not check the [Enable WAF log retrieval] checkbox under the [WAF log retrieval] tab when adding a WAF Config. In addition, please avoid configuring the old method (Lambda method).
The new method enables the blocked status on the Dashboard page, the WAF log search feature, the monthly report feature, and the WAF log alert (detection notification) feature.
Currently, WAF log retrieval is limited to old plan users. If you want to use the new method, please contact the WafCharm support team with the information below (details on logging configurations per WAF Config).
[S3 bucket name]/AWSLogs/[AWS Account ID]/WAFLogs/[Region]/[Web ACL Name]/2024/07/01/02/55/
[S3 bucket name]/2024/06/10/07/
If you are using the new method, please check the items below before you begin.
For example, if your WAF logs are outputted to the S3 bucket with the name csc-waftest
, enter csc-waftest
under the [S3 Bucket Name] field.
If WAF logs are outputted directly to your S3 bucket, [S3 Prefix] can be left as-is (empty) in most cases. If you used CLI to create your S3 bucket and added a prefix, please enter the prefix value.
If you are using Data Firehose, please enter information about your Amazon S3 destination.
In addition, please enter the complete path to the destination of your WAF logs in the [S3 Prefix] field for Data Firehose. For the dates and time (hour), please replace the numbers with YYYY, MM, DD, and HH. For more details on specifying the S3 prefix, refer to the Notes on using Amazon Data Firehose below.
waflog/
:waflog/YYYY/MM/DD/HH
waflog/!{timestamp:yyyy}/!{timestamp:MM}/!{timestamp:dd}/!{timestamp:HH}
:waflog/YYYY/MM/DD/HH
waflog/year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/hour=!{timestamp:HH}/
:waflog/year=YYYY/month=MM/day=DD/hour=HH
YYYY/MM/DD/HH
Please refer to the article below.
How to configure WAF log integration (old method) for AWS WAF v2
WAF log alert settings are equivalent to the Notification page in the old WafCharm Dashboard.
If you have enabled WAF log integration (new or old method) and WAF log alert, you can receive detection notification emails at the email addresses you have registered.