Struct aws_sdk_wafv2::types::RequestInspection
source · #[non_exhaustive]pub struct RequestInspection {
pub payload_type: PayloadType,
pub username_field: Option<UsernameField>,
pub password_field: Option<PasswordField>,
}
Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.payload_type: PayloadType
The payload type for your login endpoint, either JSON or form encoded.
username_field: Option<UsernameField>
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.
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 isusername1
password_field: Option<PasswordField>
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.
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 ispassword1
.
Implementations§
source§impl RequestInspection
impl RequestInspection
sourcepub fn payload_type(&self) -> &PayloadType
pub fn payload_type(&self) -> &PayloadType
The payload type for your login endpoint, either JSON or form encoded.
sourcepub fn username_field(&self) -> Option<&UsernameField>
pub fn username_field(&self) -> Option<&UsernameField>
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.
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 isusername1
sourcepub fn password_field(&self) -> Option<&PasswordField>
pub fn password_field(&self) -> Option<&PasswordField>
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.
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 ispassword1
.
source§impl RequestInspection
impl RequestInspection
sourcepub fn builder() -> RequestInspectionBuilder
pub fn builder() -> RequestInspectionBuilder
Creates a new builder-style object to manufacture RequestInspection
.
Trait Implementations§
source§impl Clone for RequestInspection
impl Clone for RequestInspection
source§fn clone(&self) -> RequestInspection
fn clone(&self) -> RequestInspection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RequestInspection
impl Debug for RequestInspection
source§impl PartialEq for RequestInspection
impl PartialEq for RequestInspection
source§fn eq(&self, other: &RequestInspection) -> bool
fn eq(&self, other: &RequestInspection) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RequestInspection
Auto Trait Implementations§
impl Freeze for RequestInspection
impl RefUnwindSafe for RequestInspection
impl Send for RequestInspection
impl Sync for RequestInspection
impl Unpin for RequestInspection
impl UnwindSafe for RequestInspection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more