AWS::WAFv2::WebACL ResponseInspection
The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates.
The ATP rule group evaluates the responses that your protected resources send back to client login attempts, keeping count of successful and failed attempts from each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that submit too many failed login attempts in a short amount of time.
Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.
This is part of the AWSManagedRulesATPRuleSet
configuration in ManagedRuleGroupConfig
.
Enable login response inspection by configuring exactly one component of the response to inspect. You can't configure more than one. If you don't configure any of the response inspection options, response inspection is disabled.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "BodyContains" :
ResponseInspectionBodyContains
, "Header" :ResponseInspectionHeader
, "Json" :ResponseInspectionJson
, "StatusCode" :ResponseInspectionStatusCode
}
YAML
BodyContains:
ResponseInspectionBodyContains
Header:ResponseInspectionHeader
Json:ResponseInspectionJson
StatusCode:ResponseInspectionStatusCode
Properties
BodyContains
-
Configures inspection of the response body. AWS WAF can inspect the first 65,536 bytes (64 KB) of the response body.
Required: No
Type: ResponseInspectionBodyContains
Update requires: No interruption
Header
-
Configures inspection of the response header.
Required: No
Type: ResponseInspectionHeader
Update requires: No interruption
Json
-
Configures inspection of the response JSON. AWS WAF can inspect the first 65,536 bytes (64 KB) of the response JSON.
Required: No
Type: ResponseInspectionJson
Update requires: No interruption
StatusCode
-
Configures inspection of the response status code.
Required: No
Type: ResponseInspectionStatusCode
Update requires: No interruption
Examples
Configure the response inspection fields for status code inspection
The following shows an example ResponseInspection
for the status code component inspection.
YAML
ResponseInspection: StatusCode: SuccessCodes: - 200 - 202 FailureCodes: - 400 - 404
JSON
"ResponseInspection":{ "StatusCode":{ "SuccessCodes":[ 200, 202 ], "FailureCodes":[ 400, 404 ] } }
Configure the response inspection fields for inspection of the response body
The following shows an example RequestInspection
for inspection of the response body.
YAML
ResponseInspection: BodyContains: SuccessStrings: - Successful - Logged In FailureStrings: - Loginfailed - Failed Attempt
JSON
"ResponseInspection":{ "BodyContains":{ "SuccessStrings":[ "Successful", "Logged In" ], "FailureStrings":[ "Login Failed", "Failed Attempt" ] } }