AWS::WAFv2::WebACL RequestInspection
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.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "PasswordField" :FieldIdentifier, "PayloadType" :String, "UsernameField" :FieldIdentifier}
YAML
PasswordField:FieldIdentifierPayloadType:StringUsernameField:FieldIdentifier
Properties
PasswordField-
Details about your login page password field.
How you specify this depends on the 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
. For example, for the JSON payload
{ "login": { "username": "THE_USERNAME", "password": "THE_PASSWORD" } }, the username field specification is/login/usernameand the password field specification is/login/password. -
For form encoded payload types, use the HTML form names.
For example, for an HTML form with input elements named
username1andpassword1, the username field specification isusername1and the password field specification ispassword1.
Required: Yes
Type: FieldIdentifier
Update requires: No interruption
-
PayloadType-
The payload type for your login endpoint, either JSON or form encoded.
Required: Yes
Type: String
Allowed values:
FORM_ENCODED | JSONUpdate requires: No interruption
UsernameField-
Details about your login page username field.
How you specify this depends on the 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
. For example, for the JSON payload
{ "login": { "username": "THE_USERNAME", "password": "THE_PASSWORD" } }, the username field specification is/login/usernameand the password field specification is/login/password. -
For form encoded payload types, use the HTML form names.
For example, for an HTML form with input elements named
username1andpassword1, the username field specification isusername1and the password field specification ispassword1.
Required: Yes
Type: FieldIdentifier
Update requires: No interruption
-
Examples
Configure the request inspection fields for a JSON payload
The following shows an example RequestInspection for a JSON payload type.
YAML
RequestInspection: PayloadType: JSON UsernameField: Identifier: /form/username PasswordField: Identifier: /form/password
JSON
"RequestInspection": { "PayloadType": "JSON", "UsernameField": { "Identifier": "/form/username" }, "PasswordField": { "Identifier": "/form/password" } }
Configure the request inspection fields for a form encoded payload
The following shows an example RequestInspection for a form encoded payload type.
YAML
RequestInspection: PayloadType: FORM_ENCODED UsernameField: Identifier: username PasswordField: Identifier: password
JSON
"RequestInspection": { "PayloadType": "FORM_ENCODED", "UsernameField": { "Identifier": "username" }, "PasswordField": { "Identifier": "password" } }