aws-cdk-lib.aws_wafv2.CfnWebACL.SqliMatchStatementProperty

interface SqliMatchStatementProperty

LanguageType name
.NETAmazon.CDK.AWS.WAFv2.CfnWebACL.SqliMatchStatementProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnWebACL_SqliMatchStatementProperty
Javasoftware.amazon.awscdk.services.wafv2.CfnWebACL.SqliMatchStatementProperty
Pythonaws_cdk.aws_wafv2.CfnWebACL.SqliMatchStatementProperty
TypeScript aws-cdk-lib » aws_wafv2 » CfnWebACL » SqliMatchStatementProperty

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.

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.CfnWebACL.SqliMatchStatementProperty = {
  fieldToMatch: {
    allQueryArguments: allQueryArguments,
    body: {
      oversizeHandling: 'oversizeHandling',
    },
    cookies: {
      matchPattern: {
        all: all,
        excludedCookies: ['excludedCookies'],
        includedCookies: ['includedCookies'],
      },
      matchScope: 'matchScope',
      oversizeHandling: 'oversizeHandling',
    },
    headers: {
      matchPattern: {
        all: all,
        excludedHeaders: ['excludedHeaders'],
        includedHeaders: ['includedHeaders'],
      },
      matchScope: 'matchScope',
      oversizeHandling: 'oversizeHandling',
    },
    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,
    uriPath: uriPath,
  },
  textTransformations: [{
    priority: 123,
    type: 'type',
  }],

  // the properties below are optional
  sensitivityLevel: 'sensitivityLevel',
};

Properties

NameTypeDescription
fieldToMatchIResolvable | FieldToMatchPropertyThe part of the web request that you want AWS WAF to inspect.
textTransformationsIResolvable | IResolvable | TextTransformationProperty[]Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
sensitivityLevel?stringThe sensitivity that you want AWS WAF to use to inspect for SQL injection attacks.

fieldToMatch

Type: IResolvable | FieldToMatchProperty

The part of the web request that you want AWS WAF to inspect.


textTransformations

Type: IResolvable | IResolvable | TextTransformationProperty[]

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.

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.


sensitivityLevel?

Type: string (optional)

The sensitivity that you want AWS WAF to use to inspect for SQL injection attacks.

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