-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* FUM-3033-waf-module-refactor * FUM-3033 reduce variables, clanup rule priorities fix priorities fix ipv6 list fix-rule-action-override * allow-only-count-block-managed-rule-groups * FUM-3033 add challenge and captcha support * FUM-3033 readme * FUM-3033 small fix * Update README.md Co-authored-by: Demetrio Carrara <[email protected]> * Update variables.tf Co-authored-by: Demetrio Carrara <[email protected]> * Update variables.tf Co-authored-by: Demetrio Carrara <[email protected]> * Update waf.tf Co-authored-by: Demetrio Carrara <[email protected]> * Update waf.tf Co-authored-by: Demetrio Carrara <[email protected]> * FUM-3033 move example in separated folder Further examples that can be created: regional waf * FUM-3033 remove hostname whitelisting * FUM-3033 remove note * spellchecking * Update README.md Co-authored-by: Demetrio Carrara <[email protected]> --------- Co-authored-by: Demetrio Carrara <[email protected]>
- Loading branch information
Showing
8 changed files
with
572 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
terraform { | ||
required_version = ">= 1.4.0" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 5.0" | ||
} | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "us-east-1" | ||
alias = "us" | ||
} | ||
|
||
module "waf" { | ||
source = "../../" | ||
providers = { | ||
aws = aws.us | ||
} | ||
# Required variables: None | ||
# Non required variables" | ||
waf_name = "cloudfront-waf" | ||
waf_scope = "CLOUDFRONT" | ||
waf_logs_retention = 7 | ||
enable_oracle_crawler_whitelist = true | ||
oracle_data_cloud_crawlers_url = "https://www.oracle.com/corporate/acquisitions/grapeshot/crawler.html" | ||
enable_google_bots_whitelist = true | ||
google_bots_url = "https://developers.google.com/search/apis/ipranges/googlebot.json" | ||
enable_parsely_crawlers_whitelist = false | ||
parsely_crawlers_url = "https://www.parse.ly/static/data/crawler-ips.json" | ||
enable_k6_whitelist = false | ||
k6_ip_ranges_url = "https://ip-ranges.amazonaws.com/ip-ranges.json" | ||
whitelisted_ips_v4 = ["1.1.1.1/16", "255.255.255.255/32"] | ||
whitelisted_ips_v6 = [] | ||
aws_managed_rule_groups = [ | ||
{ | ||
name = "AWSManagedRulesAnonymousIpList" # Full list of labels from this group: https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-ip-rep.html | ||
priority = 10 | ||
}, | ||
{ | ||
name = "AWSManagedRulesAmazonIpReputationList" # Full list of labels from this group: https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-ip-rep.html | ||
priority = 11 | ||
} | ||
] | ||
aws_managed_rule_labels = [ | ||
{ | ||
name = "aws_managed_rule_low_limit" | ||
labels = ["awswaf:managed:aws:anonymous-ip-list:AnonymousIPList", "awswaf:managed:aws:amazon-ip-list:AWSManagedIPReputationList", "awswaf:managed:aws:amazon-ip-list:AWSManagedReconnaissanceList", "awswaf:managed:aws:amazon-ip-list:AWSManagedIPDDoSList"] | ||
priority = 20 | ||
}, | ||
{ | ||
name = "aws_managed_rule_high_limit" | ||
labels = ["awswaf:managed:aws:anonymous-ip-list:HostingProviderIPList"] | ||
limit = 750 | ||
priority = 21 | ||
}, | ||
] | ||
count_requests_from_ch = false | ||
country_rates = [ | ||
{ | ||
name = "Group_1-CH" | ||
limit = 50000 | ||
country_codes = ["CH"] | ||
priority = 30 | ||
}, | ||
{ | ||
name = "Group_2-DE_AT_FR" | ||
limit = 4000 | ||
country_codes = ["AT", "FR", "DE"] | ||
priority = 31 | ||
}, | ||
{ | ||
name = "Very_slow" | ||
limit = 100 | ||
country_codes = ["AR", "BD", "BR", "KH", "CN", "CO", "EC", "IN", "ID", "MX", "NP", "PK", "RU", "SG", "TR", "UA", "AE", "ZM", "VN"] | ||
priority = 35 | ||
} | ||
] | ||
everybody_else_limit = 0 | ||
limit_search_requests_by_countries = { | ||
limit = 100 | ||
country_codes = ["CH"] | ||
} | ||
block_uri_path_string = [] | ||
block_articles = [] | ||
block_regex_pattern = {} | ||
enable_logging = false | ||
deploy_athena_queries = true | ||
logs_bucket_name_override = null | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.