Skip to content
v2.275.0

FirewallPolicyProperty Struct ​

The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const firewallPolicyProperty: networkfirewall.CfnFirewallPolicy.FirewallPolicyProperty = {
  statelessDefaultActions: ['statelessDefaultActions'],
  statelessFragmentDefaultActions: ['statelessFragmentDefaultActions'],

  // the properties below are optional
  enableTlsSessionHolding: false,
  policyVariables: {
    ruleVariables: {
      ruleVariablesKey: {
        definition: ['definition'],
      },
    },
  },
  statefulDefaultActions: ['statefulDefaultActions'],
  statefulEngineOptions: {
    flowTimeouts: {
      tcpIdleTimeoutSeconds: 123,
    },
    ruleOrder: 'ruleOrder',
    streamExceptionPolicy: 'streamExceptionPolicy',
  },
  statefulRuleGroupReferences: [{
    resourceArn: 'resourceArn',

    // the properties below are optional
    deepThreatInspection: false,
    override: {
      action: 'action',
    },
    priority: 123,
  }],
  statelessCustomActions: [{
    actionDefinition: {
      publishMetricAction: {
        dimensions: [{
          value: 'value',
        }],
      },
    },
    actionName: 'actionName',
  }],
  statelessRuleGroupReferences: [{
    priority: 123,
    resourceArn: 'resourceArn',
  }],
  tlsInspectionConfigurationArn: 'tlsInspectionConfigurationArn',
};

Properties ​

enableTlsSessionHoldingoptionalboolean | IResolvableenable_tls_session_holdingoptionaltyping.Union[bool, IResolvable]enableTlsSessionHoldingoptionalBooleanEnableTlsSessionHoldingoptionalboolEnableTlsSessionHoldingoptionalinterface{}#
When true, prevents TCP and TLS packets from reaching destination servers until TLS Inspection has evaluated Server Name Indication (SNI) rules.

Requires an associated TLS Inspection configuration.

policyVariablesoptionalIResolvable | CfnFirewallPolicy.PolicyVariablesPropertypolicy_variablesoptionaltyping.Union[IResolvable, PolicyVariablesProperty]policyVariablesoptionalIResolvablePolicyVariablesoptionalIResolvablePolicyVariablesoptionalinterface{}#
Contains variables that you can use to override default Suricata settings in your firewall policy.
statefulDefaultActionsoptionalstring[]stateful_default_actionsoptionaltyping.List[str]statefulDefaultActionsoptionalList<String>StatefulDefaultActionsoptionalstring[]StatefulDefaultActionsoptional*[]*string#
The default actions to take on a packet that doesn't match any stateful rules.
notes

The stateful default action is optional, and is only valid when using the strict rule order.

Valid values of the stateful default action:

  • aws:drop_strict
  • aws:drop_established
  • aws:alert_strict
  • aws:alert_established

For more information, see Strict evaluation order in the AWS Network Firewall Developer Guide .

statefulEngineOptionsoptionalIResolvable | CfnFirewallPolicy.StatefulEngineOptionsPropertystateful_engine_optionsoptionaltyping.Union[IResolvable, StatefulEngineOptionsProperty]statefulEngineOptionsoptionalIResolvableStatefulEngineOptionsoptionalIResolvableStatefulEngineOptionsoptionalinterface{}#
Additional options governing how Network Firewall handles stateful rules.

The stateful rule groups that you use in your policy must have stateful rule options settings that are compatible with these settings.

statefulRuleGroupReferencesoptionalIResolvable | IResolvable | CfnFirewallPolicy.StatefulRuleGroupReferenceProperty[]stateful_rule_group_referencesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StatefulRuleGroupReferenceProperty]]]statefulRuleGroupReferencesoptionalIResolvableStatefulRuleGroupReferencesoptionalIResolvableStatefulRuleGroupReferencesoptionalinterface{}#
References to the stateful rule groups that are used in the policy.

These define the inspection criteria in stateful rules.

statelessCustomActionsoptionalIResolvable | IResolvable | CfnFirewallPolicy.CustomActionProperty[]stateless_custom_actionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CustomActionProperty]]]statelessCustomActionsoptionalIResolvableStatelessCustomActionsoptionalIResolvableStatelessCustomActionsoptionalinterface{}#
The custom action definitions that are available for use in the firewall policy's `StatelessDefaultActions` setting.

You name each custom action that you define, and then you can use it by name in your default actions specifications.

statelessDefaultActionsstring[]stateless_default_actionstyping.List[str]statelessDefaultActionsList<String>StatelessDefaultActionsstring[]StatelessDefaultActions*[]*stringrequired#
The actions to take on a packet if it doesn't match any of the stateless rules in the policy.
notes

If you want non-matching packets to be forwarded for stateful inspection, specify aws:forward_to_sfe .

You must specify one of the standard actions: aws:pass , aws:drop , or aws:forward_to_sfe . In addition, you can specify custom actions that are compatible with your standard section choice.

For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”] . For information about compatibility, see the custom action descriptions.

statelessFragmentDefaultActionsstring[]stateless_fragment_default_actionstyping.List[str]statelessFragmentDefaultActionsList<String>StatelessFragmentDefaultActionsstring[]StatelessFragmentDefaultActions*[]*stringrequired#
The actions to take on a fragmented packet if it doesn't match any of the stateless rules in the policy.
notes

If you want non-matching fragmented packets to be forwarded for stateful inspection, specify aws:forward_to_sfe .

You must specify one of the standard actions: aws:pass , aws:drop , or aws:forward_to_sfe . In addition, you can specify custom actions that are compatible with your standard section choice.

For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”] . For information about compatibility, see the custom action descriptions.

statelessRuleGroupReferencesoptionalIResolvable | IResolvable | CfnFirewallPolicy.StatelessRuleGroupReferenceProperty[]stateless_rule_group_referencesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StatelessRuleGroupReferenceProperty]]]statelessRuleGroupReferencesoptionalIResolvableStatelessRuleGroupReferencesoptionalIResolvableStatelessRuleGroupReferencesoptionalinterface{}#
References to the stateless rule groups that are used in the policy.

These define the matching criteria in stateless rules.

tlsInspectionConfigurationArnoptionalstringtls_inspection_configuration_arnoptionalstrtlsInspectionConfigurationArnoptionalStringTlsInspectionConfigurationArnoptionalstringTlsInspectionConfigurationArnoptional*string#
The Amazon Resource Name (ARN) of the TLS inspection configuration.