flync_4_security¶
MACsec Configuration¶
Hint
Find a YAML example for MACsec inside the Controller example (key macsec_config).
- class MACsecConfig¶
Bases:
FLYNCBaseModelConfiguration for MACsec (Media Access Control Security).
Includes global MKA (MACsec Key Agreement) settings and per-port security configuration.
Parameters¶
- vlan_bypasslist of int
VLANs which shall not be protected with MACsec.
- ethertype_bypasslist of
Ethertype, optional Ethertypes which shall not be protected with MACsec (defaults to
[]).- src_mac_address_bypasslist of
FLYNCMacAddress, optional Source MAC addresses which shall not be protected with MACsec (defaults to
[]).- dest_mac_address_bypasslist of
FLYNCMacAddress, optional Destination MAC addresses which shall not be protected with MACsec (defaults to
[]).- cknstr
Connectivity Association Key Name (CKN) used to identify the CAK. 1-32 octets (characters in the range 0x00-0xFF).
- mka_enabledbool
Whether MACsec Key Agreement (MKA) is enabled. Default is True.
- hello_timeint
MKPDU period when a connection is established, applicable when delay_protect is disabled (milliseconds).
- bounded_hello_timeint
Hello time applicable with delay_protect enabled (milliseconds).
- life_timeint
Life time for a peer to transmit MKPDU’s in order to consider it alive (milliseconds).
- sak_retire_timeint
During a key rotation, time to retire the previous SAK key (milliseconds).
- hello_time_rampuplist of int, optional
Periods between initial MKA messages after linkup in milliseconds (defaults to
[]).- sak_rekey_timeint, optional
Minimum interval in seconds before rekeying the SAK (defaults to
3).- macsec_modeLiteral[“disabled”, “integrity”, “integrity_confidentiality”]
MACsec operation mode. Options include disabled, integrity-only, and full encryption.
- kay_onbool
Whether to activate the KaY (Key Agreement Entity) module. When disabled, MACsec is not negotiated.
- key_roleLiteral[“key_server_always”, “key_server_never”]
Role of the device in key negotiation.
- delay_protectbool
When enabled, performs frequent updates of the packet number on the receiving side to prevent attackers from delaying MACsec frames.
- participant_activationLiteral[“disabled”, “onoperup”, “always”]
Strategy for participant activation.
- sci_includedbool, optional
Whether to include the Secure Channel Identifier (SCI) in MACsec frames (defaults to
False).- replay_protection_windowint, optional
Size of the replay protection window (defaults to
0). Any value other than0emits a warning.- cipher_preferencelist of
DiscriminatedCipher List of preferred ciphers to negotiate, ordered by priority. Defaults to using integrity-only without confidentiality.
- class CipherSuiteBaseModel¶
Bases:
FLYNCBaseModelCommon configuration items for MACsec cipher suites.
Parameters¶
- cipher_suiteLiteral[GCM-AES-128, GCM-AES-256, GCM-AES-XPN-128, GCM-AES-XPN-256], optional
MACsec Cipher Suite defined in IEEE (defaults to
"GCM-AES-XPN-256").
- class IntegrityWithoutConfidentiality¶
Bases:
CipherSuiteBaseModelCipher configuration representing integrity protection without confidentiality.
This configuration supports authentication and integrity checks but does not encrypt the data.
Parameters¶
- typeLiteral[“integrity_without_confidentiality”]
Identifier for the cipher type. Always
"integrity_without_confidentiality".- confidentiality_offsetLiteral[0], optional
Preference for offset timing (defaults to
0). Always 0 for this cipher.
- class IntegrityWithConfidentiality¶
Bases:
CipherSuiteBaseModelCipher configuration representing both integrity protection and confidentiality.
This configuration includes both encryption and authentication features.
Parameters¶
- typeLiteral[“integrity_with_confidentiality”]
Identifier for the cipher type. Always
"integrity_with_confidentiality".- confidentiality_offsetLiteral[0, 30, 50], optional
Confidentiality Offset preference for transmission in bytes (defaults to
0). Allows choosing between no offset, 30 bytes, or 50 bytes.
Firewall Configuration¶
- class Firewall¶
Bases:
FLYNCBaseModelRepresents a set of firewall rules with a default action.
Parameters¶
- default_actionLiteral[‘reject’, ‘accept’, ‘drop’], optional
The action to apply to packets that do not match any rule (defaults to
'reject'). Can be one of'reject','accept', or'drop'.- input_ruleslist of
FirewallRule, optional A list of
FirewallRuleobjects that define input traffic matching conditions and actions.- output_ruleslist of
FirewallRule, optional A list of
FirewallRuleobjects that define output traffic matching conditions and actions.- forward_ruleslist of
FirewallRule, optional A list of
FirewallRuleobjects that define forwarded traffic matching conditions and actions.
- class FirewallRule¶
Bases:
FLYNCBaseModelDefines a single firewall rule for matching and handling frames.
Parameters¶
- namestr
A unique name identifying the rule.
- actionLiteral[‘reject’, ‘accept’, ‘drop’]
The action to take when the pattern matches. Can be one of
'reject','accept', or'drop'.- pattern
FrameFilter The filter pattern used to match frames for this rule.