RuleGroup
networkfirewall.services.k8s.aws/v1alpha1
Type | Link |
---|---|
GoDoc | networkfirewall-controller/apis/v1alpha1#RuleGroup |
Metadata
Property | Value |
---|---|
Scope | Namespaced |
Kind | RuleGroup |
ListKind | RuleGroupList |
Plural | rulegroups |
Singular | rulegroup |
The object that defines the rules in a rule group. This, along with RuleGroupResponse, define the rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup.
Network Firewall uses a rule group to inspect and control network traffic. You define stateless rule groups to inspect individual packets and you define stateful rule groups to inspect packets in the context of their traffic flow.
To use a rule group, you include it by reference in an Network Firewall firewall policy, then you use the policy in a firewall. You can reference a rule group from more than one firewall policy, and you can use a firewall policy in more than one firewall.
Spec
analyzeRuleGroup: boolean
capacity: integer
description: string
dryRun: boolean
encryptionConfiguration:
keyID: string
type_: string
ruleGroup:
referenceSets:
ipSetReferences: {}
ruleVariables:
ipSets: {}
portSets: {}
rulesSource:
rulesSourceList:
generatedRulesType: string
targetTypes:
- string
targets:
- string
rulesString: string
statefulRules:
- action: string
header:
destination: string
destinationPort: string
direction: string
protocol: string
source: string
sourcePort: string
ruleOptions:
- keyword: string
settings:
- string
statelessRulesAndCustomActions:
customActions:
actionDefinition:
publishMetricAction:
dimensions:
- value: string
actionName: string
statelessRules:
- priority: integer
ruleDefinition:
actions:
- string
matchAttributes:
destinationPorts:
- fromPort: integer
toPort: integer
destinations:
- addressDefinition: string
protocols:
- integer
sourcePorts:
- fromPort: integer
toPort: integer
sources:
- addressDefinition: string
tcpFlags:
flags:
- string
masks:
- string
statefulRuleOptions:
ruleOrder: string
ruleGroupName: string
rules: string
sourceMetadata:
sourceARN: string
sourceUpdateToken: string
tags:
- key: string
value: string
type_: string
Field | Description |
---|---|
analyzeRuleGroup Optional | boolean Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior such as asymmetric routing. If set to TRUE, Network Firewall runs the analysis and then creates the rule group for you. To run the stateless rule group analyzer without creating the rule group, set DryRun to TRUE. |
capacity Required | integer The maximum operating resources that this rule group can use. Rule group capacity is fixed at creation. When you update a rule group, you are limited to this capacity. When you reference a rule group from a firewall policy, Network Firewall reserves this capacity for the rule group. You can retrieve the capacity that would be required for a rule group before you create the rule group by calling CreateRuleGroup with DryRun set to TRUE. You can’t change or exceed this capacity when you update the rule group, so leave room for your rule group to grow. Capacity for a stateless rule group For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules that you expect to have in the rule group. To calculate the capacity requirement of a single rule, multiply the capacity requirement values of each of the rule’s match settings: * A match setting with no criteria specified has a value of 1. * A match setting with Any specified has a value of 1. * All other match settings have a value equal to the number of elements provided in the setting. For example, a protocol setting [“UDP”] and a source setting [“10.0.0.0/24”] each have a value of 1. A protocol setting [“UDP”,“TCP”] has a value of 2. A source setting [“10.0.0.0/24”,“10.0.0.1/24”,“10.0.0.2/24”] has a value of 3. A rule with no criteria specified in any of its match settings has a capacity requirement of 1. A rule with protocol setting [“UDP”,“TCP”], source setting [“10.0.0.0/24”,“10.0.0.1/24”,“10.0.0.2/24”], and a single specification or no specification for each of the other match settings has a capacity requirement of 6. Capacity for a stateful rule group For a stateful rule group, the minimum capacity required is the number of individual rules that you expect to have in the rule group. |
description Optional | string A description of the rule group. |
dryRun Optional | boolean Indicates whether you want Network Firewall to just check the validity of the request, rather than run the request. If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn’t actually make the requested changes. The call returns the value that the request would return if you ran it with dry run set to FALSE, but doesn’t make additions or changes to your resources. This option allows you to make sure that you have the required permissions to run the request and that your request parameters are valid. If set to FALSE, Network Firewall makes the requested changes to your resources. |
encryptionConfiguration Optional | object A complex type that contains settings for encryption of your rule group resources. |
encryptionConfiguration.keyID Optional | string |
**encryptionConfiguration.type_** Optional | string |
ruleGroup Optional | object An object that defines the rule group rules. You must provide either this rule group setting or a Rules setting, but not both. |
ruleGroup.referenceSets Optional | object Contains a set of IP set references. |
ruleGroup.referenceSets.ipSetReferences Optional | object |
ruleGroup.ruleVariables Optional | object Settings that are available for use in the rules in the RuleGroup where this is defined. |
ruleGroup.ruleVariables.ipSets Optional | object |
ruleGroup.ruleVariables.portSets Optional | object |
ruleGroup.rulesSource Optional | object The stateless or stateful rules definitions for use in a single rule group. Each rule group requires a single RulesSource. You can use an instance of this for either stateless rules or stateful rules. |
ruleGroup.rulesSource.rulesSourceList Optional | object Stateful inspection criteria for a domain list rule group. For HTTPS traffic, domain filtering is SNI-based. It uses the server name indicator extension of the TLS handshake. By default, Network Firewall domain list inspection only includes traffic coming from the VPC where you deploy the firewall. To inspect traffic from IP addresses outside of the deployment VPC, you set the HOME_NET rule variable to include the CIDR range of the deployment VPC plus the other CIDR ranges. For more information, see RuleVariables in this guide and Stateful domain list rule groups in Network Firewall (https://docs.aws.amazon.com/network-firewall/latest/developerguide/stateful-rule-groups-domain-names.html) in the Network Firewall Developer Guide. |
ruleGroup.rulesSource.rulesSourceList.generatedRulesType Optional | string |
ruleGroup.rulesSource.rulesSourceList.targetTypes Optional | array |
ruleGroup.rulesSource.rulesSourceList.targetTypes.[] Required | string |
ruleGroup.rulesSource.rulesSourceList.targets.[] Required | string |
ruleGroup.rulesSource.statefulRules Optional | array |
ruleGroup.rulesSource.statefulRules.[] Required | object 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 (https://suricata.readthedocs.io/en/suricata-6.0.9/rules/intro.html). | |
ruleGroup.rulesSource.statefulRules.[].header Optional | object The basic rule criteria for Network Firewall to use to inspect packet headers in stateful traffic flow inspection. Traffic flows that match the criteria are a match for the corresponding StatefulRule. |
ruleGroup.rulesSource.statefulRules.[].header.destination Optional | string |
ruleGroup.rulesSource.statefulRules.[].header.destinationPort Optional | string |
ruleGroup.rulesSource.statefulRules.[].header.direction Optional | string |
ruleGroup.rulesSource.statefulRules.[].header.protocol Optional | string |
ruleGroup.rulesSource.statefulRules.[].header.source Optional | string |
ruleGroup.rulesSource.statefulRules.[].header.sourcePort Optional | string |
ruleGroup.rulesSource.statefulRules.[].ruleOptions Optional | array |
ruleGroup.rulesSource.statefulRules.[].ruleOptions.[] Required | object Additional settings for a stateful rule. This is part of the StatefulRule |
configuration. | |
ruleGroup.rulesSource.statefulRules.[].ruleOptions.[].settings Optional | array |
ruleGroup.rulesSource.statefulRules.[].ruleOptions.[].settings.[] Required | string |
ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions Optional | array |
ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[] Required | object An optional, non-standard action to use for stateless packet handling. You |
can define this in addition to the standard action that you must specify. |
You define and name the custom actions that you want to be able to use, and then you reference them by name in your actions settings.
You can use custom actions in the following places:
In a rule group’s StatelessRulesAndCustomActions specification. The custom actions are available for use by name inside the StatelessRulesAndCustomActions where you define them. You can use them for your stateless rule actions to specify what to do with a packet that matches the rule’s match attributes.
In a FirewallPolicy specification, in StatelessCustomActions. The custom actions are available for use inside the policy where you define them. You can use them for the policy’s default stateless actions settings to specify what to do with packets that don’t match any of the policy’s stateless rules. || ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionDefinition
Optional | object
A custom action to use in stateless rule actions settings. This is used in
CustomAction. | | ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionDefinition.publishMetricAction
Optional | object
Stateless inspection criteria that publishes the specified metrics to Amazon
CloudWatch for the matching packet. This setting defines a CloudWatch dimension
value to be published. | | ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionDefinition.publishMetricAction.dimensions
Optional | array
| | ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionDefinition.publishMetricAction.dimensions.[]
Required | object
The value to use in an Amazon CloudWatch custom metric dimension. This is used in the PublishMetrics CustomAction. A CloudWatch custom metric dimension is a name/value pair that’s part of the identity of a metric.
Network Firewall sets the dimension name to CustomAction and you provide the dimension value.
For more information about CloudWatch custom metric dimensions, see Publishing
Custom Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#usingDimensions)
in the Amazon CloudWatch User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html). || ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionDefinition.publishMetricAction.dimensions.[].value
Optional | string
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.customActions.[].actionName
Optional | string
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[]
Required | object
A single stateless rule. This is used in StatelessRulesAndCustomActions. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].priority
Optional | integer
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition
Optional | object
The inspection criteria and action for a single stateless rule. Network Firewall
inspects each packet for the specified matching criteria. When a packet matches
the criteria, Network Firewall performs the rule’s actions on the packet. |
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.actions
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.actions.[]
Required | string
|| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes
Optional | object
Criteria for Network Firewall to use to inspect an individual packet in stateless
rule inspection. Each match attributes set can include one or more items
such as IP address, CIDR range, port number, protocol, and TCP flags. |
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinationPorts
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinationPorts.[]
Required | object
A single port range specification. This is used for source and destination
port ranges in the stateless rule MatchAttributes, SourcePorts, and DestinationPorts
settings. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinationPorts.[].fromPort
Optional | integer
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinationPorts.[].toPort
Optional | integer
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinations
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinations.[]
Required | object
A single IP address specification. This is used in the MatchAttributes source
and destination specifications. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.destinations.[].addressDefinition
Optional | string
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.protocols
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.protocols.[]
Required | integer
|| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sourcePorts
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sourcePorts.[]
Required | object
A single port range specification. This is used for source and destination
port ranges in the stateless rule MatchAttributes, SourcePorts, and DestinationPorts
settings. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sourcePorts.[].fromPort
Optional | integer
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sourcePorts.[].toPort
Optional | integer
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sources
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sources.[]
Required | object
A single IP address specification. This is used in the MatchAttributes source
and destination specifications. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.sources.[].addressDefinition
Optional | string
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags.[]
Required | object
TCP flags and masks to inspect packets for, used in stateless rules MatchAttributes
settings. || ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags.[].flags
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags.[].flags.[]
Required | string
|| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags.[].masks
Optional | array
|
| ruleGroup.rulesSource.statelessRulesAndCustomActions.statelessRules.[].ruleDefinition.matchAttributes.tcpFlags.[].masks.[]
Required | string
|| ruleGroup.statefulRuleOptions
Optional | object
Additional options governing how Network Firewall handles the rule group.
You can only use these for stateful rule groups. |
| ruleGroup.statefulRuleOptions.ruleOrder
Optional | string
|
| ruleGroupName
Required | string
The descriptive name of the rule group. You can’t change the name of a rule
group after you create it. |
| rules
Optional | string
A string containing stateful rule group rules specifications in Suricata
flat format, with one rule per line. Use this to import your existing Suricata
compatible rule groups.
You must provide either this rules setting or a populated RuleGroup setting,
but not both.
You can provide your rule group specification in Suricata flat format through
this setting when you create or update your rule group. The call response
returns a RuleGroup object that Network Firewall has populated from your
string. |
| sourceMetadata
Optional | object
A complex type that contains metadata about the rule group that your own
rule group is copied from. You can use the metadata to keep track of updates
made to the originating rule group. |
| sourceMetadata.sourceARN
Optional | string
|
| sourceMetadata.sourceUpdateToken
Optional | string
|
| tags
Optional | array
The key:value pairs to associate with the resource. |
| tags.[]
Required | object
A key:value pair associated with an Amazon Web Services resource. The key:value
pair can be anything you define. Typically, the tag key represents a category
(such as “environment”) and the tag value represents a specific value within
that category (such as “test,” “development,” or “production”). You can add
up to 50 tags to each Amazon Web Services resource. || tags.[].key
Optional | string
|
| tags.[].value
Optional | string
|
| **type_**
Required | **string**
Indicates whether the rule group is stateless or stateful. If the rule group
is stateless, it contains stateless rules. If it is stateful, it contains
stateful rules. |
Status
ackResourceMetadata:
arn: string
ownerAccountID: string
region: string
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
ruleGroupResponse:
analysisResults:
- analysisDetail: string
identifiedRuleIDs:
- string
identifiedType: string
capacity: integer
consumedCapacity: integer
description: string
encryptionConfiguration:
keyID: string
type_: string
lastModifiedTime: string
numberOfAssociations: integer
ruleGroupARN: string
ruleGroupID: string
ruleGroupName: string
ruleGroupStatus: string
snsTopic: string
sourceMetadata:
sourceARN: string
sourceUpdateToken: string
tags:
- key: string
value: string
type_: string
updateToken: string
Field | Description |
---|---|
ackResourceMetadata Optional | object All CRs managed by ACK have a common Status.ACKResourceMetadata memberthat is used to contain resource sync state, account ownership, constructed ARN for the resource |
ackResourceMetadata.arn Optional | string ARN is the Amazon Resource Name for the resource. This is a globally-unique identifier and is set only by the ACK service controller once the controller has orchestrated the creation of the resource OR when it has verified that an “adopted” resource (a resource where the ARN annotation was set by the Kubernetes user on the CR) exists and matches the supplied CR’s Spec field values. https://github.com/aws/aws-controllers-k8s/issues/270 |
ackResourceMetadata.ownerAccountID Required | string OwnerAccountID is the AWS Account ID of the account that owns the backend AWS service API resource. |
ackResourceMetadata.region Required | string Region is the AWS region in which the resource exists or will exist. |
conditions Optional | array All CRS managed by ACK have a common Status.Conditions member thatcontains a collection of ackv1alpha1.Condition objects that describethe various terminal states of the CR and its backend AWS service API resource |
conditions.[] Required | object Condition is the common struct used by all CRDs managed by ACK service |
controllers to indicate terminal states of the CR and its backend AWS | |
service API resource | |
conditions.[].message Optional | string A human readable message indicating details about the transition. |
conditions.[].reason Optional | string The reason for the condition’s last transition. |
conditions.[].status Optional | string Status of the condition, one of True, False, Unknown. |
conditions.[].type Optional | string Type is the type of the Condition |
ruleGroupResponse Optional | object The high-level properties of a rule group. This, along with the RuleGroup, define the rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup. |
ruleGroupResponse.analysisResults Optional | array |
ruleGroupResponse.analysisResults.[] Required | object The analysis result for Network Firewall’s stateless rule group analyzer. |
Every time you call CreateRuleGroup, UpdateRuleGroup, or DescribeRuleGroup | |
on a stateless rule group, Network Firewall analyzes the stateless rule groups | |
in your account and identifies the rules that might adversely effect your | |
firewall’s functionality. For example, if Network Firewall detects a rule | |
that’s routing traffic asymmetrically, which impacts the service’s ability | |
to properly process traffic, the service includes the rule in a list of analysis | |
results. | |
ruleGroupResponse.analysisResults.[].identifiedRuleIDs Optional | array |
ruleGroupResponse.analysisResults.[].identifiedRuleIDs.[] Required | string |
ruleGroupResponse.capacity Optional | integer |
ruleGroupResponse.consumedCapacity Optional | integer |
ruleGroupResponse.description Optional | string |
ruleGroupResponse.encryptionConfiguration Optional | object A complex type that contains optional Amazon Web Services Key Management Service (KMS) encryption settings for your Network Firewall resources. Your data is encrypted by default with an Amazon Web Services owned key that Amazon Web Services owns and manages for you. You can use either the Amazon Web Services owned key, or provide your own customer managed key. To learn more about KMS encryption of your Network Firewall resources, see Encryption at rest with Amazon Web Services Key Managment Service (https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html) in the Network Firewall Developer Guide. |
ruleGroupResponse.encryptionConfiguration.keyID Optional | string |
**ruleGroupResponse.encryptionConfiguration.type_** Optional | string |
ruleGroupResponse.lastModifiedTime Optional | string |
ruleGroupResponse.numberOfAssociations Optional | integer |
ruleGroupResponse.ruleGroupARN Optional | string |
ruleGroupResponse.ruleGroupID Optional | string |
ruleGroupResponse.ruleGroupName Optional | string |
ruleGroupResponse.ruleGroupStatus Optional | string |
ruleGroupResponse.snsTopic Optional | string |
ruleGroupResponse.sourceMetadata Optional | object High-level information about the managed rule group that your own rule group is copied from. You can use the the metadata to track version updates made to the originating rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup (https://docs.aws.amazon.com/network-firewall/latest/APIReference/API_DescribeRuleGroup.html). |
ruleGroupResponse.sourceMetadata.sourceARN Optional | string |
ruleGroupResponse.sourceMetadata.sourceUpdateToken Optional | string |
ruleGroupResponse.tags Optional | array |
ruleGroupResponse.tags.[] Required | object A key:value pair associated with an Amazon Web Services resource. The key:value |
pair can be anything you define. Typically, the tag key represents a category | |
(such as “environment”) and the tag value represents a specific value within | |
that category (such as “test,” “development,” or “production”). You can add | |
up to 50 tags to each Amazon Web Services resource. | |
ruleGroupResponse.tags.[].value Optional | string |
**ruleGroupResponse.type_** Optional | string |
updateToken Optional | string A token used for optimistic locking. Network Firewall returns a token to your requests that access the rule group. The token marks the state of the rule group resource at the time of the request. To make changes to the rule group, you provide the token in your request. Network Firewall uses the token to ensure that the rule group hasn’t changed since you last retrieved it. If it has changed, the operation fails with an InvalidTokenException. If this happens, retrieve the rule group again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token. |