ManagedRuleGroupConfigProperty Struct
Additional information that's used by a managed rule group. Many managed rule groups don't require this.
The rule groups used for intelligent threat mitigation require additional configuration:
- Use the
AWSManagedRulesACFPRuleSetconfiguration object to configure the account creation fraud prevention managed rule group. The configuration includes the registration and sign-up pages of your application and the locations in the account creation request payload of data, such as the user email and phone number fields. - Use the
AWSManagedRulesATPRuleSetconfiguration object to configure the account takeover prevention managed rule group. The configuration includes the sign-in page of your application and the locations in the login request payload of data such as the username and password. - Use the
AWSManagedRulesBotControlRuleSetconfiguration object to configure the protection level that you want the Bot Control rule group to use.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
const managedRuleGroupConfigProperty: wafv2.CfnWebACL.ManagedRuleGroupConfigProperty = {
awsManagedRulesAcfpRuleSet: {
creationPath: 'creationPath',
registrationPagePath: 'registrationPagePath',
requestInspection: {
payloadType: 'payloadType',
// the properties below are optional
addressFields: [{
identifier: 'identifier',
}],
emailField: {
identifier: 'identifier',
},
passwordField: {
identifier: 'identifier',
},
phoneNumberFields: [{
identifier: 'identifier',
}],
usernameField: {
identifier: 'identifier',
},
},
// the properties below are optional
enableRegexInPath: false,
responseInspection: {
bodyContains: {
failureStrings: ['failureStrings'],
successStrings: ['successStrings'],
},
header: {
failureValues: ['failureValues'],
name: 'name',
successValues: ['successValues'],
},
json: {
failureValues: ['failureValues'],
identifier: 'identifier',
successValues: ['successValues'],
},
statusCode: {
failureCodes: [123],
successCodes: [123],
},
},
},
awsManagedRulesAntiDDoSRuleSet: {
clientSideActionConfig: {
challenge: {
usageOfAction: 'usageOfAction',
// the properties below are optional
exemptUriRegularExpressions: [{
regexString: 'regexString',
}],
sensitivity: 'sensitivity',
},
},
// the properties below are optional
sensitivityToBlock: 'sensitivityToBlock',
},
awsManagedRulesAtpRuleSet: {
loginPath: 'loginPath',
// the properties below are optional
enableRegexInPath: false,
requestInspection: {
passwordField: {
identifier: 'identifier',
},
payloadType: 'payloadType',
usernameField: {
identifier: 'identifier',
},
},
responseInspection: {
bodyContains: {
failureStrings: ['failureStrings'],
successStrings: ['successStrings'],
},
header: {
failureValues: ['failureValues'],
name: 'name',
successValues: ['successValues'],
},
json: {
failureValues: ['failureValues'],
identifier: 'identifier',
successValues: ['successValues'],
},
statusCode: {
failureCodes: [123],
successCodes: [123],
},
},
},
awsManagedRulesBotControlRuleSet: {
inspectionLevel: 'inspectionLevel',
// the properties below are optional
enableMachineLearning: false,
},
loginPath: 'loginPath',
passwordField: {
identifier: 'identifier',
},
payloadType: 'payloadType',
usernameField: {
identifier: 'identifier',
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wafv2 as wafv2
managed_rule_group_config_property = wafv2.CfnWebACL.ManagedRuleGroupConfigProperty(
aws_managed_rules_acfp_rule_set=wafv2.CfnWebACL.AWSManagedRulesACFPRuleSetProperty(
creation_path="creationPath",
registration_page_path="registrationPagePath",
request_inspection=wafv2.CfnWebACL.RequestInspectionACFPProperty(
payload_type="payloadType",
# the properties below are optional
address_fields=[wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
)],
email_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
),
password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
),
phone_number_fields=[wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
)],
username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
)
),
# the properties below are optional
enable_regex_in_path=False,
response_inspection=wafv2.CfnWebACL.ResponseInspectionProperty(
body_contains=wafv2.CfnWebACL.ResponseInspectionBodyContainsProperty(
failure_strings=["failureStrings"],
success_strings=["successStrings"]
),
header=wafv2.CfnWebACL.ResponseInspectionHeaderProperty(
failure_values=["failureValues"],
name="name",
success_values=["successValues"]
),
json=wafv2.CfnWebACL.ResponseInspectionJsonProperty(
failure_values=["failureValues"],
identifier="identifier",
success_values=["successValues"]
),
status_code=wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty(
failure_codes=[123],
success_codes=[123]
)
)
),
aws_managed_rules_anti_d_do_s_rule_set=wafv2.CfnWebACL.AWSManagedRulesAntiDDoSRuleSetProperty(
client_side_action_config=wafv2.CfnWebACL.ClientSideActionConfigProperty(
challenge=wafv2.CfnWebACL.ClientSideActionProperty(
usage_of_action="usageOfAction",
# the properties below are optional
exempt_uri_regular_expressions=[wafv2.CfnWebACL.RegexProperty(
regex_string="regexString"
)],
sensitivity="sensitivity"
)
),
# the properties below are optional
sensitivity_to_block="sensitivityToBlock"
),
aws_managed_rules_atp_rule_set=wafv2.CfnWebACL.AWSManagedRulesATPRuleSetProperty(
login_path="loginPath",
# the properties below are optional
enable_regex_in_path=False,
request_inspection=wafv2.CfnWebACL.RequestInspectionProperty(
password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
),
payload_type="payloadType",
username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
)
),
response_inspection=wafv2.CfnWebACL.ResponseInspectionProperty(
body_contains=wafv2.CfnWebACL.ResponseInspectionBodyContainsProperty(
failure_strings=["failureStrings"],
success_strings=["successStrings"]
),
header=wafv2.CfnWebACL.ResponseInspectionHeaderProperty(
failure_values=["failureValues"],
name="name",
success_values=["successValues"]
),
json=wafv2.CfnWebACL.ResponseInspectionJsonProperty(
failure_values=["failureValues"],
identifier="identifier",
success_values=["successValues"]
),
status_code=wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty(
failure_codes=[123],
success_codes=[123]
)
)
),
aws_managed_rules_bot_control_rule_set=wafv2.CfnWebACL.AWSManagedRulesBotControlRuleSetProperty(
inspection_level="inspectionLevel",
# the properties below are optional
enable_machine_learning=False
),
login_path="loginPath",
password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
),
payload_type="payloadType",
username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
identifier="identifier"
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;
ManagedRuleGroupConfigProperty managedRuleGroupConfigProperty = ManagedRuleGroupConfigProperty.builder()
.awsManagedRulesAcfpRuleSet(AWSManagedRulesACFPRuleSetProperty.builder()
.creationPath("creationPath")
.registrationPagePath("registrationPagePath")
.requestInspection(RequestInspectionACFPProperty.builder()
.payloadType("payloadType")
// the properties below are optional
.addressFields(List.of(FieldIdentifierProperty.builder()
.identifier("identifier")
.build()))
.emailField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.passwordField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.phoneNumberFields(List.of(FieldIdentifierProperty.builder()
.identifier("identifier")
.build()))
.usernameField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.build())
// the properties below are optional
.enableRegexInPath(false)
.responseInspection(ResponseInspectionProperty.builder()
.bodyContains(ResponseInspectionBodyContainsProperty.builder()
.failureStrings(List.of("failureStrings"))
.successStrings(List.of("successStrings"))
.build())
.header(ResponseInspectionHeaderProperty.builder()
.failureValues(List.of("failureValues"))
.name("name")
.successValues(List.of("successValues"))
.build())
.json(ResponseInspectionJsonProperty.builder()
.failureValues(List.of("failureValues"))
.identifier("identifier")
.successValues(List.of("successValues"))
.build())
.statusCode(ResponseInspectionStatusCodeProperty.builder()
.failureCodes(List.of(123))
.successCodes(List.of(123))
.build())
.build())
.build())
.awsManagedRulesAntiDDoSRuleSet(AWSManagedRulesAntiDDoSRuleSetProperty.builder()
.clientSideActionConfig(ClientSideActionConfigProperty.builder()
.challenge(ClientSideActionProperty.builder()
.usageOfAction("usageOfAction")
// the properties below are optional
.exemptUriRegularExpressions(List.of(RegexProperty.builder()
.regexString("regexString")
.build()))
.sensitivity("sensitivity")
.build())
.build())
// the properties below are optional
.sensitivityToBlock("sensitivityToBlock")
.build())
.awsManagedRulesAtpRuleSet(AWSManagedRulesATPRuleSetProperty.builder()
.loginPath("loginPath")
// the properties below are optional
.enableRegexInPath(false)
.requestInspection(RequestInspectionProperty.builder()
.passwordField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.payloadType("payloadType")
.usernameField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.build())
.responseInspection(ResponseInspectionProperty.builder()
.bodyContains(ResponseInspectionBodyContainsProperty.builder()
.failureStrings(List.of("failureStrings"))
.successStrings(List.of("successStrings"))
.build())
.header(ResponseInspectionHeaderProperty.builder()
.failureValues(List.of("failureValues"))
.name("name")
.successValues(List.of("successValues"))
.build())
.json(ResponseInspectionJsonProperty.builder()
.failureValues(List.of("failureValues"))
.identifier("identifier")
.successValues(List.of("successValues"))
.build())
.statusCode(ResponseInspectionStatusCodeProperty.builder()
.failureCodes(List.of(123))
.successCodes(List.of(123))
.build())
.build())
.build())
.awsManagedRulesBotControlRuleSet(AWSManagedRulesBotControlRuleSetProperty.builder()
.inspectionLevel("inspectionLevel")
// the properties below are optional
.enableMachineLearning(false)
.build())
.loginPath("loginPath")
.passwordField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.payloadType("payloadType")
.usernameField(FieldIdentifierProperty.builder()
.identifier("identifier")
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;
var managedRuleGroupConfigProperty = new ManagedRuleGroupConfigProperty {
AwsManagedRulesAcfpRuleSet = new AWSManagedRulesACFPRuleSetProperty {
CreationPath = "creationPath",
RegistrationPagePath = "registrationPagePath",
RequestInspection = new RequestInspectionACFPProperty {
PayloadType = "payloadType",
// the properties below are optional
AddressFields = new [] { new FieldIdentifierProperty {
Identifier = "identifier"
} },
EmailField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PasswordField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PhoneNumberFields = new [] { new FieldIdentifierProperty {
Identifier = "identifier"
} },
UsernameField = new FieldIdentifierProperty {
Identifier = "identifier"
}
},
// the properties below are optional
EnableRegexInPath = false,
ResponseInspection = new ResponseInspectionProperty {
BodyContains = new ResponseInspectionBodyContainsProperty {
FailureStrings = new [] { "failureStrings" },
SuccessStrings = new [] { "successStrings" }
},
Header = new ResponseInspectionHeaderProperty {
FailureValues = new [] { "failureValues" },
Name = "name",
SuccessValues = new [] { "successValues" }
},
Json = new ResponseInspectionJsonProperty {
FailureValues = new [] { "failureValues" },
Identifier = "identifier",
SuccessValues = new [] { "successValues" }
},
StatusCode = new ResponseInspectionStatusCodeProperty {
FailureCodes = new [] { 123 },
SuccessCodes = new [] { 123 }
}
}
},
AwsManagedRulesAntiDDoSRuleSet = new AWSManagedRulesAntiDDoSRuleSetProperty {
ClientSideActionConfig = new ClientSideActionConfigProperty {
Challenge = new ClientSideActionProperty {
UsageOfAction = "usageOfAction",
// the properties below are optional
ExemptUriRegularExpressions = new [] { new RegexProperty {
RegexString = "regexString"
} },
Sensitivity = "sensitivity"
}
},
// the properties below are optional
SensitivityToBlock = "sensitivityToBlock"
},
AwsManagedRulesAtpRuleSet = new AWSManagedRulesATPRuleSetProperty {
LoginPath = "loginPath",
// the properties below are optional
EnableRegexInPath = false,
RequestInspection = new RequestInspectionProperty {
PasswordField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PayloadType = "payloadType",
UsernameField = new FieldIdentifierProperty {
Identifier = "identifier"
}
},
ResponseInspection = new ResponseInspectionProperty {
BodyContains = new ResponseInspectionBodyContainsProperty {
FailureStrings = new [] { "failureStrings" },
SuccessStrings = new [] { "successStrings" }
},
Header = new ResponseInspectionHeaderProperty {
FailureValues = new [] { "failureValues" },
Name = "name",
SuccessValues = new [] { "successValues" }
},
Json = new ResponseInspectionJsonProperty {
FailureValues = new [] { "failureValues" },
Identifier = "identifier",
SuccessValues = new [] { "successValues" }
},
StatusCode = new ResponseInspectionStatusCodeProperty {
FailureCodes = new [] { 123 },
SuccessCodes = new [] { 123 }
}
}
},
AwsManagedRulesBotControlRuleSet = new AWSManagedRulesBotControlRuleSetProperty {
InspectionLevel = "inspectionLevel",
// the properties below are optional
EnableMachineLearning = false
},
LoginPath = "loginPath",
PasswordField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PayloadType = "payloadType",
UsernameField = new FieldIdentifierProperty {
Identifier = "identifier"
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
managedRuleGroupConfigProperty := &ManagedRuleGroupConfigProperty{
AwsManagedRulesAcfpRuleSet: &AWSManagedRulesACFPRuleSetProperty{
CreationPath: jsii.String("creationPath"),
RegistrationPagePath: jsii.String("registrationPagePath"),
RequestInspection: &RequestInspectionACFPProperty{
PayloadType: jsii.String("payloadType"),
// the properties below are optional
AddressFields: []interface{}{
&FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
},
EmailField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
PasswordField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
PhoneNumberFields: []interface{}{
&FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
},
UsernameField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
},
// the properties below are optional
EnableRegexInPath: jsii.Boolean(false),
ResponseInspection: &ResponseInspectionProperty{
BodyContains: &ResponseInspectionBodyContainsProperty{
FailureStrings: []*string{
jsii.String("failureStrings"),
},
SuccessStrings: []*string{
jsii.String("successStrings"),
},
},
Header: &ResponseInspectionHeaderProperty{
FailureValues: []*string{
jsii.String("failureValues"),
},
Name: jsii.String("name"),
SuccessValues: []*string{
jsii.String("successValues"),
},
},
Json: &ResponseInspectionJsonProperty{
FailureValues: []*string{
jsii.String("failureValues"),
},
Identifier: jsii.String("identifier"),
SuccessValues: []*string{
jsii.String("successValues"),
},
},
StatusCode: &ResponseInspectionStatusCodeProperty{
FailureCodes: []interface{}{
jsii.Number(123),
},
SuccessCodes: []interface{}{
jsii.Number(123),
},
},
},
},
AwsManagedRulesAntiDDoSRuleSet: &AWSManagedRulesAntiDDoSRuleSetProperty{
ClientSideActionConfig: &ClientSideActionConfigProperty{
Challenge: &ClientSideActionProperty{
UsageOfAction: jsii.String("usageOfAction"),
// the properties below are optional
ExemptUriRegularExpressions: []interface{}{
&RegexProperty{
RegexString: jsii.String("regexString"),
},
},
Sensitivity: jsii.String("sensitivity"),
},
},
// the properties below are optional
SensitivityToBlock: jsii.String("sensitivityToBlock"),
},
AwsManagedRulesAtpRuleSet: &AWSManagedRulesATPRuleSetProperty{
LoginPath: jsii.String("loginPath"),
// the properties below are optional
EnableRegexInPath: jsii.Boolean(false),
RequestInspection: &RequestInspectionProperty{
PasswordField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
PayloadType: jsii.String("payloadType"),
UsernameField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
},
ResponseInspection: &ResponseInspectionProperty{
BodyContains: &ResponseInspectionBodyContainsProperty{
FailureStrings: []*string{
jsii.String("failureStrings"),
},
SuccessStrings: []*string{
jsii.String("successStrings"),
},
},
Header: &ResponseInspectionHeaderProperty{
FailureValues: []*string{
jsii.String("failureValues"),
},
Name: jsii.String("name"),
SuccessValues: []*string{
jsii.String("successValues"),
},
},
Json: &ResponseInspectionJsonProperty{
FailureValues: []*string{
jsii.String("failureValues"),
},
Identifier: jsii.String("identifier"),
SuccessValues: []*string{
jsii.String("successValues"),
},
},
StatusCode: &ResponseInspectionStatusCodeProperty{
FailureCodes: []interface{}{
jsii.Number(123),
},
SuccessCodes: []interface{}{
jsii.Number(123),
},
},
},
},
AwsManagedRulesBotControlRuleSet: &AWSManagedRulesBotControlRuleSetProperty{
InspectionLevel: jsii.String("inspectionLevel"),
// the properties below are optional
EnableMachineLearning: jsii.Boolean(false),
},
LoginPath: jsii.String("loginPath"),
PasswordField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
PayloadType: jsii.String("payloadType"),
UsernameField: &FieldIdentifierProperty{
Identifier: jsii.String("identifier"),
},
}
Properties
awsManagedRulesAcfpRuleSetoptionalIResolvable | CfnWebACL.aws_managed_rules_acfp_rule_setoptionaltyping.Union[IResolvable, AWSManagedRulesACFPRuleSetProperty]awsManagedRulesAcfpRuleSetoptionalIResolvableAwsManagedRulesAcfpRuleSetoptionalIResolvableAwsManagedRulesAcfpRuleSetoptionalinterface{} #notes
Use this to provide account creation request information to the rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution responds to account creation requests.
For information about using the ACFP managed rule group, see AWS WAF Fraud Control account creation fraud prevention (ACFP) rule group and AWS WAF Fraud Control account creation fraud prevention (ACFP) in the AWS WAF Developer Guide .
awsManagedRulesAntiDDoSRuleSetoptionalIResolvable | CfnWebACL.aws_managed_rules_anti_d_do_s_rule_setoptionaltyping.Union[IResolvable, AWSManagedRulesAntiDDoSRuleSetProperty]awsManagedRulesAntiDDoSRuleSetoptionalIResolvableAwsManagedRulesAntiDDoSRuleSetoptionalIResolvableAwsManagedRulesAntiDDoSRuleSetoptionalinterface{} #notes
Use this to configure anti-DDoS behavior for the rule group.
For information about using the anti-DDoS managed rule group, see AWS WAF Anti-DDoS rule group and Distributed Denial of Service (DDoS) prevention in the AWS WAF Developer Guide .
awsManagedRulesAtpRuleSetoptionalIResolvable | CfnWebACL.aws_managed_rules_atp_rule_setoptionaltyping.Union[IResolvable, AWSManagedRulesATPRuleSetProperty]awsManagedRulesAtpRuleSetoptionalIResolvableAwsManagedRulesAtpRuleSetoptionalIResolvableAwsManagedRulesAtpRuleSetoptionalinterface{} #notes
Use this to provide login request information to the rule group. For web ACLs that protect CloudFront distributions, use this to also provide the information about how your distribution responds to login requests.
This configuration replaces the individual configuration fields in ManagedRuleGroupConfig and provides additional feature configuration.
For information about using the ATP managed rule group, see AWS WAF Fraud Control account takeover prevention (ATP) rule group and AWS WAF Fraud Control account takeover prevention (ATP) in the AWS WAF Developer Guide .
awsManagedRulesBotControlRuleSetoptionalIResolvable | CfnWebACL.aws_managed_rules_bot_control_rule_setoptionaltyping.Union[IResolvable, AWSManagedRulesBotControlRuleSetProperty]awsManagedRulesBotControlRuleSetoptionalIResolvableAwsManagedRulesBotControlRuleSetoptionalIResolvableAwsManagedRulesBotControlRuleSetoptionalinterface{} #notes
Use this to specify the inspection level that you want to use. For information about using the Bot Control managed rule group, see AWS WAF Bot Control rule group and AWS WAF Bot Control in the AWS WAF Developer Guide .
loginPathoptionalstringlogin_pathoptionalstrloginPathoptionalStringLoginPathoptionalstringLoginPathoptional*string #passwordFieldoptionalIResolvable | CfnWebACL.password_fieldoptionaltyping.Union[IResolvable, FieldIdentifierProperty]passwordFieldoptionalIResolvablePasswordFieldoptionalIResolvablePasswordFieldoptionalinterface{} #payloadTypeoptionalstringpayload_typeoptionalstrpayloadTypeoptionalStringPayloadTypeoptionalstringPayloadTypeoptional*string #usernameFieldoptionalIResolvable | CfnWebACL.username_fieldoptionaltyping.Union[IResolvable, FieldIdentifierProperty]usernameFieldoptionalIResolvableUsernameFieldoptionalIResolvableUsernameFieldoptionalinterface{} #