-
Notifications
You must be signed in to change notification settings - Fork 219
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
Feat(eos_cli_config_gen): add SNMPv3 hashed user passphrases support #1721
Conversation
* Can now use local engineID * Can use localized at the user level to indicate that the passphrases (auth and priv) have been hashed using the correct engineID * Behavioral question * Added tests to verify every single combination of noauth/auth/priv and localized or not * Fixed documentation Potential gap: * if using user.localized without setting an engineID, the config generation will silently generate the non localized version (expecting cleartext passphrases) - maybe could add a warning here.
So the changes are changing some outputs in some molecule:
this is because of the change in documentation - is the process to regenerate all these molecules as well? |
Yes, we need to update molecule on all scenarios. |
this has already been done in the latest commit |
...tions/arista/avd/molecule/eos_cli_config_gen_v4.0/documentation/devices/snmp-server-traps.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Outdated
Show resolved
Hide resolved
* regenerate the outputs for molecule tests
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
* add remote engine IDs support * update documentation * update tests Caveat: does not add support for remote users
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
* change engine_ids/remote to remotes * change engined_ids/remotes name to id * change engined_ids/remotes ip to address * changed snmp users/remote_ip to remote_address * fix comments in the eos_cli_config_gen/templates/eos/snmp-settings.j2 * update in the eos_cli_config_gen/templates/documentation/snmp-settings.j2 as per PR * update README * update molecule tests
ansible_collections/arista/avd/molecule/eos_cli_config_gen_v4.0/documentation/devices/snmp.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
* remove redundant check in templates/eos/snmp-settings.j2 * remove extra blank lines in templates/documentation/snmp-settings.j2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor adjustments. I have added them as suggestions, so you can just add them to batch and commit everything on github.
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Outdated
Show resolved
Hide resolved
Co-authored-by: Claus Holbech <holbech@arista.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/snmp-settings.j2
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md
Outdated
Show resolved
Hide resolved
* Rename port to udp_port * Fix engine_id description (engine_name -> engine_id) * Move remote engineIDs after contact and location to match CLI * Move the * Simplify documentation/snmp-settings.j2 as per PR * Fix documentation/snmp-settings.j2 engineIDs table * Fix the test input variables to accommodate the changes * Run the test suite to update the expected output Did not: * update udp port descirption * change the README.md info for remote engineIDs address
ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/snmp-settings.j2
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Change Summary
As of now the eos_cli_config_gen module only support the following syntax:
(though the documentation indicates "encrypted" passphrases for auth and priv, this is not accurate as the passphrases will be rehashed with the local engineID when configured on the switch.)
This feature request intends to allow the configuration of:
Related Issue(s)
Fixes #1720
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
Modification of the
snmp-settings.j2
template to:localized
keyword that indicate that the engineID isDocumentation template has been updated to indicate the configured Local Engine ID.
README.md updated
CAVEATS:
snmp_server.engineid.local
is not configured the current behavior (which can be changed) is that the template will revert to non localized syntax (the one is use currently in the repo). However passing hashed passphrases to the non localized syntax will eventually fail as the passphrases will be rehashed with the device engineID (the default one if none is configured) at configuration time. This faulty behavior is already allowed in the current AVD version - and the passphrases in this version MUST be passed in cleartext (contrary to what the documentation indicates).How to test
Run molecule
Checklist
User Checklist
Repository Checklist