SqliMatchStatementProperty Struct
A rule statement that inspects for malicious SQL code.
Attackers insert malicious SQL code into web requests to do things like modify your database or extract data from it.
| 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';
declare const all: any;
declare const allQueryArguments: any;
declare const method: any;
declare const queryString: any;
declare const singleHeader: any;
declare const singleQueryArgument: any;
declare const uriPath: any;
const sqliMatchStatementProperty: wafv2.CfnRuleGroup.SqliMatchStatementProperty = {
fieldToMatch: {
allQueryArguments: allQueryArguments,
body: {
oversizeHandling: 'oversizeHandling',
},
cookies: {
matchPattern: {
all: all,
excludedCookies: ['excludedCookies'],
includedCookies: ['includedCookies'],
},
matchScope: 'matchScope',
oversizeHandling: 'oversizeHandling',
},
headerOrder: {
oversizeHandling: 'oversizeHandling',
},
headers: {
matchPattern: {
all: all,
excludedHeaders: ['excludedHeaders'],
includedHeaders: ['includedHeaders'],
},
matchScope: 'matchScope',
oversizeHandling: 'oversizeHandling',
},
ja3Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
ja4Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
jsonBody: {
matchPattern: {
all: all,
includedPaths: ['includedPaths'],
},
matchScope: 'matchScope',
// the properties below are optional
invalidFallbackBehavior: 'invalidFallbackBehavior',
oversizeHandling: 'oversizeHandling',
},
method: method,
queryString: queryString,
singleHeader: singleHeader,
singleQueryArgument: singleQueryArgument,
uriFragment: {
fallbackBehavior: 'fallbackBehavior',
},
uriPath: uriPath,
},
textTransformations: [{
priority: 123,
type: 'type',
}],
// the properties below are optional
preParseTextTransformations: [{
priority: 123,
type: 'type',
}],
sensitivityLevel: 'sensitivityLevel',
};
# 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
# all: Any
# all_query_arguments: Any
# method: Any
# query_string: Any
# single_header: Any
# single_query_argument: Any
# uri_path: Any
sqli_match_statement_property = wafv2.CfnRuleGroup.SqliMatchStatementProperty(
field_to_match=wafv2.CfnRuleGroup.FieldToMatchProperty(
all_query_arguments=all_query_arguments,
body=wafv2.CfnRuleGroup.BodyProperty(
oversize_handling="oversizeHandling"
),
cookies=wafv2.CfnRuleGroup.CookiesProperty(
match_pattern=wafv2.CfnRuleGroup.CookieMatchPatternProperty(
all=all,
excluded_cookies=["excludedCookies"],
included_cookies=["includedCookies"]
),
match_scope="matchScope",
oversize_handling="oversizeHandling"
),
header_order=wafv2.CfnRuleGroup.HeaderOrderProperty(
oversize_handling="oversizeHandling"
),
headers=wafv2.CfnRuleGroup.HeadersProperty(
match_pattern=wafv2.CfnRuleGroup.HeaderMatchPatternProperty(
all=all,
excluded_headers=["excludedHeaders"],
included_headers=["includedHeaders"]
),
match_scope="matchScope",
oversize_handling="oversizeHandling"
),
ja3_fingerprint=wafv2.CfnRuleGroup.JA3FingerprintProperty(
fallback_behavior="fallbackBehavior"
),
ja4_fingerprint=wafv2.CfnRuleGroup.JA4FingerprintProperty(
fallback_behavior="fallbackBehavior"
),
json_body=wafv2.CfnRuleGroup.JsonBodyProperty(
match_pattern=wafv2.CfnRuleGroup.JsonMatchPatternProperty(
all=all,
included_paths=["includedPaths"]
),
match_scope="matchScope",
# the properties below are optional
invalid_fallback_behavior="invalidFallbackBehavior",
oversize_handling="oversizeHandling"
),
method=method,
query_string=query_string,
single_header=single_header,
single_query_argument=single_query_argument,
uri_fragment=wafv2.CfnRuleGroup.UriFragmentProperty(
fallback_behavior="fallbackBehavior"
),
uri_path=uri_path
),
text_transformations=[wafv2.CfnRuleGroup.TextTransformationProperty(
priority=123,
type="type"
)],
# the properties below are optional
pre_parse_text_transformations=[wafv2.CfnRuleGroup.PreParseTextTransformationProperty(
priority=123,
type="type"
)],
sensitivity_level="sensitivityLevel"
)
// 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 method;
Object queryString;
Object singleHeader;
Object singleQueryArgument;
Object uriPath;
SqliMatchStatementProperty sqliMatchStatementProperty = SqliMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headerOrder(HeaderOrderProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.ja3Fingerprint(JA3FingerprintProperty.builder()
.fallbackBehavior("fallbackBehavior")
.build())
.ja4Fingerprint(JA4FingerprintProperty.builder()
.fallbackBehavior("fallbackBehavior")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriFragment(UriFragmentProperty.builder()
.fallbackBehavior("fallbackBehavior")
.build())
.uriPath(uriPath)
.build())
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
// the properties below are optional
.preParseTextTransformations(List.of(PreParseTextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.sensitivityLevel("sensitivityLevel")
.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 all;
var allQueryArguments;
var method;
var queryString;
var singleHeader;
var singleQueryArgument;
var uriPath;
var sqliMatchStatementProperty = new SqliMatchStatementProperty {
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
HeaderOrder = new HeaderOrderProperty {
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Ja3Fingerprint = new JA3FingerprintProperty {
FallbackBehavior = "fallbackBehavior"
},
Ja4Fingerprint = new JA4FingerprintProperty {
FallbackBehavior = "fallbackBehavior"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriFragment = new UriFragmentProperty {
FallbackBehavior = "fallbackBehavior"
},
UriPath = uriPath
},
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} },
// the properties below are optional
PreParseTextTransformations = new [] { new PreParseTextTransformationProperty {
Priority = 123,
Type = "type"
} },
SensitivityLevel = "sensitivityLevel"
};
// 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"
var all interface{}
var allQueryArguments interface{}
var method interface{}
var queryString interface{}
var singleHeader interface{}
var singleQueryArgument interface{}
var uriPath interface{}
sqliMatchStatementProperty := &SqliMatchStatementProperty{
FieldToMatch: &FieldToMatchProperty{
AllQueryArguments: allQueryArguments,
Body: &BodyProperty{
OversizeHandling: jsii.String("oversizeHandling"),
},
Cookies: &CookiesProperty{
MatchPattern: &CookieMatchPatternProperty{
All: all,
ExcludedCookies: []*string{
jsii.String("excludedCookies"),
},
IncludedCookies: []*string{
jsii.String("includedCookies"),
},
},
MatchScope: jsii.String("matchScope"),
OversizeHandling: jsii.String("oversizeHandling"),
},
HeaderOrder: &HeaderOrderProperty{
OversizeHandling: jsii.String("oversizeHandling"),
},
Headers: &HeadersProperty{
MatchPattern: &HeaderMatchPatternProperty{
All: all,
ExcludedHeaders: []*string{
jsii.String("excludedHeaders"),
},
IncludedHeaders: []*string{
jsii.String("includedHeaders"),
},
},
MatchScope: jsii.String("matchScope"),
OversizeHandling: jsii.String("oversizeHandling"),
},
Ja3Fingerprint: &JA3FingerprintProperty{
FallbackBehavior: jsii.String("fallbackBehavior"),
},
Ja4Fingerprint: &JA4FingerprintProperty{
FallbackBehavior: jsii.String("fallbackBehavior"),
},
JsonBody: &JsonBodyProperty{
MatchPattern: &JsonMatchPatternProperty{
All: all,
IncludedPaths: []*string{
jsii.String("includedPaths"),
},
},
MatchScope: jsii.String("matchScope"),
// the properties below are optional
InvalidFallbackBehavior: jsii.String("invalidFallbackBehavior"),
OversizeHandling: jsii.String("oversizeHandling"),
},
Method: method,
QueryString: queryString,
SingleHeader: singleHeader,
SingleQueryArgument: singleQueryArgument,
UriFragment: &UriFragmentProperty{
FallbackBehavior: jsii.String("fallbackBehavior"),
},
UriPath: uriPath,
},
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
// the properties below are optional
PreParseTextTransformations: []interface{}{
&PreParseTextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
SensitivityLevel: jsii.String("sensitivityLevel"),
}
Properties
fieldToMatchIResolvable | CfnRuleGroup.field_to_matchtyping.Union[IResolvable, FieldToMatchProperty]fieldToMatchIResolvableFieldToMatchIResolvableFieldToMatchinterface{} required #preParseTextTransformationsoptionalIResolvable | IResolvable | CfnRuleGroup.pre_parse_text_transformationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PreParseTextTransformationProperty]]]preParseTextTransformationsoptionalIResolvablePreParseTextTransformationsoptionalIResolvablePreParseTextTransformationsoptionalinterface{} #sensitivityLeveloptionalstringsensitivity_leveloptionalstrsensitivityLeveloptionalStringSensitivityLeveloptionalstringSensitivityLeveloptional*string #notes
HIGH detects more attacks, but might generate more false positives, especially if your web requests frequently contain unusual strings. For information about identifying and mitigating false positives, see Testing and tuning in the AWS WAF Developer Guide .
LOW is generally a better choice for resources that already have other protections against SQL injection attacks or that have a low tolerance for false positives.
Default: LOW
textTransformationsIResolvable | IResolvable | CfnRuleGroup.text_transformationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TextTransformationProperty]]]textTransformationsIResolvableTextTransformationsIResolvableTextTransformationsinterface{} required #notes
If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.