Class: AWSCDK::WAFv2::CfnWebACL::RequestInspectionACFPProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_web_acl.rb

Overview

The criteria for inspecting account creation requests, used by the ACFP rule group to validate and track account creation attempts.

This is part of the AWSManagedRulesACFPRuleSet configuration in ManagedRuleGroupConfig .

In these settings, you specify how your application accepts account creation attempts by providing the request payload type and the names of the fields within the request body where the username, password, email, and primary address and phone number fields are provided.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload_type:, address_fields: nil, email_field: nil, password_field: nil, phone_number_fields: nil, username_field: nil) ⇒ RequestInspectionACFPProperty

Returns a new instance of RequestInspectionACFPProperty.

Parameters:



4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
# File 'wa_fv2/cfn_web_acl.rb', line 4960

def initialize(payload_type:, address_fields: nil, email_field: nil, password_field: nil, phone_number_fields: nil, username_field: nil)
  @payload_type = payload_type
  Jsii::Type.check_type(@payload_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "payloadType")
  @address_fields = address_fields
  Jsii::Type.check_type(@address_fields, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLkZpZWxkSWRlbnRpZmllclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "addressFields") unless @address_fields.nil?
  @email_field = email_field.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::FieldIdentifierProperty.new(**email_field.transform_keys(&:to_sym)) : email_field
  Jsii::Type.check_type(@email_field, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRmllbGRJZGVudGlmaWVyUHJvcGVydHkifV19fQ==")), "emailField") unless @email_field.nil?
  @password_field = password_field.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::FieldIdentifierProperty.new(**password_field.transform_keys(&:to_sym)) : password_field
  Jsii::Type.check_type(@password_field, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRmllbGRJZGVudGlmaWVyUHJvcGVydHkifV19fQ==")), "passwordField") unless @password_field.nil?
  @phone_number_fields = phone_number_fields
  Jsii::Type.check_type(@phone_number_fields, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLkZpZWxkSWRlbnRpZmllclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "phoneNumberFields") unless @phone_number_fields.nil?
  @username_field = username_field.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::FieldIdentifierProperty.new(**username_field.transform_keys(&:to_sym)) : username_field
  Jsii::Type.check_type(@username_field, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRmllbGRJZGVudGlmaWVyUHJvcGVydHkifV19fQ==")), "usernameField") unless @username_field.nil?
end

Instance Attribute Details

#address_fieldsAWSCDK::IResolvable, ... (readonly)

The names of the fields in the request payload that contain your customer's primary physical address.

Order the address fields in the array exactly as they are ordered in the request payload.

How you specify the address fields depends on the request inspection payload type.

  • For JSON payloads, specify the field identifiers 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": { "primaryaddressline1": "THE_ADDRESS1", "primaryaddressline2": "THE_ADDRESS2", "primaryaddressline3": "THE_ADDRESS3" } } , the address field idenfiers are /form/primaryaddressline1 , /form/primaryaddressline2 , and /form/primaryaddressline3 .

  • For form encoded payload types, use the HTML form names.

For example, for an HTML form with input elements named primaryaddressline1 , primaryaddressline2 , and primaryaddressline3 , the address fields identifiers are primaryaddressline1 , primaryaddressline2 , and primaryaddressline3 .



4996
4997
4998
# File 'wa_fv2/cfn_web_acl.rb', line 4996

def address_fields
  @address_fields
end

#email_fieldAWSCDK::IResolvable, ... (readonly)

The name of the field in the request payload that contains your customer's email.

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": { "email": "THE_EMAIL" } } , the email field specification is /form/email .

  • For form encoded payload types, use the HTML form names.

For example, for an HTML form with the input element named email1 , the email field specification is email1 .



5011
5012
5013
# File 'wa_fv2/cfn_web_acl.rb', line 5011

def email_field
  @email_field
end

#password_fieldAWSCDK::IResolvable, ... (readonly)

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 is password1 .



5026
5027
5028
# File 'wa_fv2/cfn_web_acl.rb', line 5026

def password_field
  @password_field
end

#payload_typeString (readonly)

The payload type for your account creation endpoint, either JSON or form encoded.



4979
4980
4981
# File 'wa_fv2/cfn_web_acl.rb', line 4979

def payload_type
  @payload_type
end

#phone_number_fieldsAWSCDK::IResolvable, ... (readonly)

The names of the fields in the request payload that contain your customer's primary phone number.

Order the phone number fields in the array exactly as they are ordered in the request payload.

How you specify the phone number fields depends on the request inspection payload type.

  • For JSON payloads, specify the field identifiers 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": { "primaryphoneline1": "THE_PHONE1", "primaryphoneline2": "THE_PHONE2", "primaryphoneline3": "THE_PHONE3" } } , the phone number field identifiers are /form/primaryphoneline1 , /form/primaryphoneline2 , and /form/primaryphoneline3 .

  • For form encoded payload types, use the HTML form names.

For example, for an HTML form with input elements named primaryphoneline1 , primaryphoneline2 , and primaryphoneline3 , the phone number field identifiers are primaryphoneline1 , primaryphoneline2 , and primaryphoneline3 .



5043
5044
5045
# File 'wa_fv2/cfn_web_acl.rb', line 5043

def phone_number_fields
  @phone_number_fields
end

#username_fieldAWSCDK::IResolvable, ... (readonly)

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 is username1



5058
5059
5060
# File 'wa_fv2/cfn_web_acl.rb', line 5058

def username_field
  @username_field
end

Class Method Details

.jsii_propertiesObject



5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
# File 'wa_fv2/cfn_web_acl.rb', line 5060

def self.jsii_properties
  {
    :payload_type => "payloadType",
    :address_fields => "addressFields",
    :email_field => "emailField",
    :password_field => "passwordField",
    :phone_number_fields => "phoneNumberFields",
    :username_field => "usernameField",
  }
end

Instance Method Details

#to_jsiiObject



5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
# File 'wa_fv2/cfn_web_acl.rb', line 5071

def to_jsii
  result = {}
  result.merge!({
    "payloadType" => @payload_type,
    "addressFields" => @address_fields,
    "emailField" => @email_field,
    "passwordField" => @password_field,
    "phoneNumberFields" => @phone_number_fields,
    "usernameField" => @username_field,
  })
  result.compact
end