@Stability(value=Stable)
public static interface CfnRuleGroup.XssMatchStatementProperty
extends software.amazon.jsii.JsiiSerializable
XSS attacks are those where the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers. The XSS match statement provides the location in requests that you want AWS WAF to search and text transformations to use on the search area before AWS WAF searches for character sequences that are likely to be malicious strings.
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.*;
Object all;
Object allQueryArguments;
Object body;
Object method;
Object queryString;
Object singleHeader;
Object singleQueryArgument;
Object uriPath;
XssMatchStatementProperty xssMatchStatementProperty = XssMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(body)
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnRuleGroup.XssMatchStatementProperty.Builder
A builder for
CfnRuleGroup.XssMatchStatementProperty |
static class |
CfnRuleGroup.XssMatchStatementProperty.Jsii$Proxy
An implementation for
CfnRuleGroup.XssMatchStatementProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnRuleGroup.XssMatchStatementProperty.Builder |
builder() |
Object |
getFieldToMatch()
The part of a web request that you want AWS WAF to inspect.
|
Object |
getTextTransformations()
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
|
@Stability(value=Stable) @NotNull Object getFieldToMatch()
@Stability(value=Stable) @NotNull Object getTextTransformations()
If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.
@Stability(value=Stable) static CfnRuleGroup.XssMatchStatementProperty.Builder builder()
Copyright © 2022. All rights reserved.