Interface CfnWebACL.ResponseInspectionProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnWebACL.ResponseInspectionProperty.Jsii$Proxy
Enclosing class:
CfnWebACL

@Stability(Stable) public static interface CfnWebACL.ResponseInspectionProperty extends software.amazon.jsii.JsiiSerializable
The criteria for inspecting responses to login requests and account creation requests, used by the ATP and ACFP rule groups to track login and account creation success and failure rates.

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

The rule groups evaluates the responses that your protected resources send back to client login and account creation 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 with too much suspicious activity in a short amount of time.

This is part of the AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet configurations in ManagedRuleGroupConfig .

Enable response inspection by configuring exactly one component of the response to inspect, for example, Header or StatusCode . You can't configure more than one component for inspection. If you don't configure any of the response inspection options, response inspection is disabled.

Example:

 // 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.*;
 ResponseInspectionProperty responseInspectionProperty = 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();
 
  • Method Details

    • getBodyContains

      @Stability(Stable) @Nullable default Object getBodyContains()
      Configures inspection of the response body for success and failure indicators.

      AWS WAF can inspect the first 65,536 bytes (64 KB) of the response body.

    • getHeader

      @Stability(Stable) @Nullable default Object getHeader()
      Configures inspection of the response header for success and failure indicators.
    • getJson

      @Stability(Stable) @Nullable default Object getJson()
      Configures inspection of the response JSON for success and failure indicators.

      AWS WAF can inspect the first 65,536 bytes (64 KB) of the response JSON.

    • getStatusCode

      @Stability(Stable) @Nullable default Object getStatusCode()
      Configures inspection of the response status code for success and failure indicators.
    • builder

      @Stability(Stable) static CfnWebACL.ResponseInspectionProperty.Builder builder()
      Returns:
      a CfnWebACL.ResponseInspectionProperty.Builder of CfnWebACL.ResponseInspectionProperty