Class: AWSCDK::WAFv2::CfnRuleGroup::XssMatchStatementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnRuleGroup::XssMatchStatementProperty
- Defined in:
- wa_fv2/cfn_rule_group.rb
Overview
A rule statement that inspects for cross-site scripting (XSS) attacks.
In XSS attacks, the attacker uses vulnerabilities in a benign website as a vehicle to inject malicious client-site scripts into other legitimate web browsers.
Instance Attribute Summary collapse
-
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::FieldToMatchProperty
readonly
The part of the web request that you want AWS WAF to inspect.
-
#text_transformations ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::TextTransformationProperty>
readonly
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(field_to_match:, text_transformations:) ⇒ XssMatchStatementProperty
constructor
A new instance of XssMatchStatementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(field_to_match:, text_transformations:) ⇒ XssMatchStatementProperty
Returns a new instance of XssMatchStatementProperty.
4490 4491 4492 4493 4494 4495 |
# File 'wa_fv2/cfn_rule_group.rb', line 4490 def initialize(field_to_match:, text_transformations:) @field_to_match = field_to_match.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnRuleGroup::FieldToMatchProperty.new(**field_to_match.transform_keys(&:to_sym)) : field_to_match Jsii::Type.check_type(@field_to_match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5SdWxlR3JvdXAuRmllbGRUb01hdGNoUHJvcGVydHkifV19fQ==")), "fieldToMatch") @text_transformations = text_transformations Jsii::Type.check_type(@text_transformations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuUnVsZUdyb3VwLlRleHRUcmFuc2Zvcm1hdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "textTransformations") end |
Instance Attribute Details
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::FieldToMatchProperty (readonly)
The part of the web request that you want AWS WAF to inspect.
4501 4502 4503 |
# File 'wa_fv2/cfn_rule_group.rb', line 4501 def field_to_match @field_to_match end |
#text_transformations ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::TextTransformationProperty> (readonly)
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.
4508 4509 4510 |
# File 'wa_fv2/cfn_rule_group.rb', line 4508 def text_transformations @text_transformations end |
Class Method Details
.jsii_properties ⇒ Object
4510 4511 4512 4513 4514 4515 |
# File 'wa_fv2/cfn_rule_group.rb', line 4510 def self.jsii_properties { :field_to_match => "fieldToMatch", :text_transformations => "textTransformations", } end |
Instance Method Details
#to_jsii ⇒ Object
4517 4518 4519 4520 4521 4522 4523 4524 |
# File 'wa_fv2/cfn_rule_group.rb', line 4517 def to_jsii result = {} result.merge!({ "fieldToMatch" => @field_to_match, "textTransformations" => @text_transformations, }) result.compact end |