# RequestInspectionProperty

The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage.

This is part of the `AWSManagedRulesATPRuleSet` configuration in `ManagedRuleGroupConfig` .

In these settings, you specify how your application accepts login attempts by providing the request payload type and the names of the fields within the request body where the username and password are provided.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// 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';
const requestInspectionProperty: wafv2.CfnWebACL.RequestInspectionProperty = {
  passwordField: {
    identifier: 'identifier',
  },
  payloadType: 'payloadType',
  usernameField: {
    identifier: 'identifier',
  },
};
```

Python:

```python
# 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

request_inspection_property = wafv2.CfnWebACL.RequestInspectionProperty(
    password_field=wafv2.CfnWebACL.FieldIdentifierProperty(
        identifier="identifier"
    ),
    payload_type="payloadType",
    username_field=wafv2.CfnWebACL.FieldIdentifierProperty(
        identifier="identifier"
    )
)
```

Java:

```java
// 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.*;

RequestInspectionProperty requestInspectionProperty = RequestInspectionProperty.builder()
        .passwordField(FieldIdentifierProperty.builder()
                .identifier("identifier")
                .build())
        .payloadType("payloadType")
        .usernameField(FieldIdentifierProperty.builder()
                .identifier("identifier")
                .build())
        .build();
```

C# / .NET:

```csharp
// 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 requestInspectionProperty = new RequestInspectionProperty {
    PasswordField = new FieldIdentifierProperty {
        Identifier = "identifier"
    },
    PayloadType = "payloadType",
    UsernameField = new FieldIdentifierProperty {
        Identifier = "identifier"
    }
};
```

Golang:

```go
// 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"

requestInspectionProperty := &RequestInspectionProperty{
	PasswordField: &FieldIdentifierProperty{
		Identifier: jsii.String("identifier"),
	},
	PayloadType: jsii.String("payloadType"),
	UsernameField: &FieldIdentifierProperty{
		Identifier: jsii.String("identifier"),
	},
}
```

## Properties

- `passwordField`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWebACL.FieldIdentifierProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_wafv2.CfnWebACL.FieldIdentifierProperty.html) (required) — The name of the field in the request payload that contains your customer's password.

  How you specify this depends on the request inspection payload type.

  - For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation [JavaScript Object Notation (JSON) Pointer](https://docs.aws.amazon.com/https://tools.ietf.org/html/rfc6901) .

  For example, for the JSON payload `{ "form": { "password": "THE_PASSWORD" } }` , the password field specification is `/form/password` .
  - For form encoded payload types, use the HTML form names.

  For example, for an HTML form with the input element named `password1` , the password field specification is `password1` .

- `payloadType`: string (required) — The payload type for your login endpoint, either JSON or form encoded.

- `usernameField`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWebACL.FieldIdentifierProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_wafv2.CfnWebACL.FieldIdentifierProperty.html) (required) — The name of the field in the request payload that contains your customer's username.

  How you specify this depends on the request inspection payload type.

  - For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation [JavaScript Object Notation (JSON) Pointer](https://docs.aws.amazon.com/https://tools.ietf.org/html/rfc6901) .

  For example, for the JSON payload `{ "form": { "username": "THE_USERNAME" } }` , the username field specification is `/form/username` .
  - For form encoded payload types, use the HTML form names.

  For example, for an HTML form with the input element named `username1` , the username field specification is `username1`
