-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from komtaki/feature/add-aws-waf
chore: add cloud formation of waf
- Loading branch information
Showing
2 changed files
with
102 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: "Create webAcl" | ||
|
||
Parameters: | ||
AppEnvironment: | ||
Description: Type of app environment. | ||
Type: String | ||
Default: staging | ||
AllowedValues: | ||
- staging | ||
- production | ||
|
||
Resources: | ||
# ------------------------------------------------------------# | ||
# AWS WAFv2 | ||
# ------------------------------------------------------------# | ||
WebAclCloudFront: | ||
Type: AWS::WAFv2::WebACL | ||
Properties: | ||
DefaultAction: | ||
Allow: {} | ||
Description: WebACL for CloudFront | ||
Name: !Sub ${AppEnvironment}-cfj-decidim-web-acl | ||
Rules: | ||
- Name: !Sub ${AppEnvironment}-AWSManagedRulesCommonRuleSet | ||
Priority: 0 | ||
OverrideAction: | ||
Count: {} | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: AWSManagedRulesCommonRuleSetMetric | ||
Statement: | ||
ManagedRuleGroupStatement: | ||
VendorName: AWS | ||
Name: AWSManagedRulesCommonRuleSet | ||
- Name: !Sub ${AppEnvironment}-AWSManagedRulesKnownBadInputsRuleSet | ||
Priority: 1 | ||
OverrideAction: | ||
Count: {} | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: AWSManagedRulesKnownBadInputsRuleSetMetric | ||
Statement: | ||
ManagedRuleGroupStatement: | ||
VendorName: AWS | ||
Name: AWSManagedRulesKnownBadInputsRuleSet | ||
- Name: !Sub ${AppEnvironment}-AWSManagedRulesAmazonIpReputationList | ||
Priority: 2 | ||
OverrideAction: | ||
Count: {} | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: AWSManagedRulesAmazonIpReputationListMetric | ||
Statement: | ||
ManagedRuleGroupStatement: | ||
VendorName: AWS | ||
Name: AWSManagedRulesAmazonIpReputationList | ||
- Name: !Sub ${AppEnvironment}-AWSManagedRulesLinuxRuleSet | ||
Priority: 3 | ||
OverrideAction: | ||
Count: {} | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: AWSManagedRulesLinuxRuleSetMetric | ||
Statement: | ||
ManagedRuleGroupStatement: | ||
VendorName: AWS | ||
Name: AWSManagedRulesLinuxRuleSet | ||
- Name: !Sub ${AppEnvironment}-AWSManagedRulesSQLiRuleSet | ||
Priority: 4 | ||
OverrideAction: | ||
Count: {} | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: AWSManagedRulesSQLiRuleSetMetric | ||
Statement: | ||
ManagedRuleGroupStatement: | ||
VendorName: AWS | ||
Name: AWSManagedRulesSQLiRuleSet | ||
Scope: CLOUDFRONT | ||
VisibilityConfig: | ||
SampledRequestsEnabled: true | ||
CloudWatchMetricsEnabled: true | ||
MetricName: !Sub ${AppEnvironment}-cfj-decidim-web-acl |
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