Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(eos_cli_config_gen): MAC Security key fallback configured even if set to false #3437

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ FIPS restrictions enabled.
###### Keys

| Key ID | Fallback |
| ------ | -------- |
| ------ | -------- |
| 1234a | - |
| 1234c | True |

Expand All @@ -168,9 +168,23 @@ FIPS restrictions enabled.
###### Keys

| Key ID | Fallback |
| ------ | -------- |
| ------ | -------- |
| 1234b | - |

##### Profile A3

###### Settings

| Cipher | Key-Server Priority | Rekey-Period | SCI |
| ------ | ------------------- | ------------ | --- |
| aes256-gcm-xpn | - | - | - |

###### Keys

| Key ID | Fallback |
| ------ | -------- |
| ab | False |

### MACsec Device Configuration

```eos
Expand All @@ -189,4 +203,7 @@ mac security
l2-protocol lldp bypass unauthorized
profile A2
key 1234b 7 <removed>
profile A3
cipher aes256-gcm-xpn
key ab 7 <removed>
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ mac security
l2-protocol lldp bypass unauthorized
profile A2
key 1234b 7 12485744465E5A53
profile A3
cipher aes256-gcm-xpn
key ab 7 10195F4C5144405A
!
hostname mac-security-eth-po-entropy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ mac_security:
connection_keys:
- id: 1234b
encrypted_key: 12485744465E5A53
- name: A3
cipher: aes256-gcm-xpn
connection_keys:
- id: ab
encrypted_key: 10195F4C5144405A
fallback: false

### Mgmt sec
management_security:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ FIPS restrictions enabled.
###### Keys

| Key ID | Fallback |
| ------ | -------- |
| ------ | -------- |
| 1234b | - |

### MACsec Device Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ FIPS restrictions enabled.
###### Keys

| Key ID | Fallback |
| ------ | -------- |
| ------ | -------- |
{% for connection_key in profile.connection_keys | arista.avd.natural_sort('id') %}
{% if connection_key.encrypted_key is arista.avd.defined %}
{% set fallback = connection_key.fallback | arista.avd.default('-') %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mac security
{% for connection_key in profile.connection_keys | arista.avd.natural_sort('id') %}
{% if connection_key.encrypted_key is arista.avd.defined %}
{% set key_cli = "key " ~ connection_key.id ~ " 7 " ~ connection_key.encrypted_key | arista.avd.hide_passwords(hide_passwords) %}
{% if connection_key.fallback is arista.avd.defined %}
{% if connection_key.fallback is arista.avd.defined(true) %}
{% set key_cli = key_cli ~ " fallback" %}
{% endif %}
{{ key_cli }}
Expand Down