Class: AWSCDK::NetworkFirewall::CfnRuleGroup::StatefulRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::NetworkFirewall::CfnRuleGroup::StatefulRuleProperty
- Defined in:
- network_firewall/cfn_rule_group.rb
Overview
A single Suricata rules specification, for use in a stateful rule group.
Use this option to specify a simple Suricata rule with protocol, source and destination, ports, direction, and rule options. For information about the Suricata Rules format, see Rules Format .
Instance Attribute Summary collapse
-
#action ⇒ String
readonly
Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria.
-
#header ⇒ AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::HeaderProperty
readonly
The stateful inspection criteria for this rule, used to inspect traffic flows.
-
#rule_options ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::RuleOptionProperty>
readonly
Additional settings for a stateful rule, provided as keywords and settings.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, header:, rule_options:) ⇒ StatefulRuleProperty
constructor
A new instance of StatefulRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, header:, rule_options:) ⇒ StatefulRuleProperty
Returns a new instance of StatefulRuleProperty.
1623 1624 1625 1626 1627 1628 1629 1630 |
# File 'network_firewall/cfn_rule_group.rb', line 1623 def initialize(action:, header:, rule_options:) @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") @header = header.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::HeaderProperty.new(**header.transform_keys(&:to_sym)) : header Jsii::Type.check_type(@header, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLkhlYWRlclByb3BlcnR5In1dfX0=")), "header") @rule_options = Jsii::Type.check_type(@rule_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbmV0d29ya2ZpcmV3YWxsLkNmblJ1bGVHcm91cC5SdWxlT3B0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "ruleOptions") end |
Instance Attribute Details
#action ⇒ String (readonly)
Defines what Network Firewall should do with the packets in a traffic flow when the flow matches the stateful rule criteria.
For all actions, Network Firewall performs the specified action and discontinues stateful inspection of the traffic flow.
The actions for a stateful rule are defined as follows:
- PASS - Permits the packets to go to the intended destination.
- DROP - Blocks the packets from going to the intended destination and sends an alert log message, if alert logging is configured in the firewall logging configuration.
- REJECT - Drops traffic that matches the conditions of the stateful rule and sends a TCP reset packet back to sender of the packet. A TCP reset packet is a packet with no payload and a
RSTbit contained in the TCP header flags.REJECTis available only for TCP traffic. - ALERT - Permits the packets to go to the intended destination and sends an alert log message, if alert logging is configured in the firewall logging configuration.
You can use this action to test a rule that you intend to use to drop traffic. You can enable the rule with ALERT action, verify in the logs that the rule is filtering as you want, then change the action to DROP .
- REJECT - Drops TCP traffic that matches the conditions of the stateful rule, and sends a TCP reset packet back to sender of the packet. A TCP reset packet is a packet with no payload and a
RSTbit contained in the TCP header flags. Also sends an alert log mesage if alert logging is configured in the firewall logging configuration.
REJECT isn't currently available for use with IMAP and FTP protocols.
1651 1652 1653 |
# File 'network_firewall/cfn_rule_group.rb', line 1651 def action @action end |
#header ⇒ AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::HeaderProperty (readonly)
The stateful inspection criteria for this rule, used to inspect traffic flows.
1656 1657 1658 |
# File 'network_firewall/cfn_rule_group.rb', line 1656 def header @header end |
#rule_options ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::RuleOptionProperty> (readonly)
Additional settings for a stateful rule, provided as keywords and settings.
1661 1662 1663 |
# File 'network_firewall/cfn_rule_group.rb', line 1661 def @rule_options end |
Class Method Details
.jsii_properties ⇒ Object
1663 1664 1665 1666 1667 1668 1669 |
# File 'network_firewall/cfn_rule_group.rb', line 1663 def self.jsii_properties { :action => "action", :header => "header", :rule_options => "ruleOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
1671 1672 1673 1674 1675 1676 1677 1678 1679 |
# File 'network_firewall/cfn_rule_group.rb', line 1671 def to_jsii result = {} result.merge!({ "action" => @action, "header" => @header, "ruleOptions" => @rule_options, }) result.compact end |