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
Add an SNMPv3 management profile type #2699
Add an SNMPv3 management profile type #2699
Conversation
SNMPv3 attributes are very distinct from either SNMPv1 or SNMPv2, so i deserves a new type.
My browser tries to input my NAV username and password in these unrelated profile fields. This is not some kind of login form, so this suggests to the browser to eschew autocompletion of usernames and passwords.
The two password are only required dependent upon which security level has been chosen for this profile.
This is used to signal to end users that while SNMPv3 profiles are available, the functionality in NAV is not yet complete and cannot be expected to work. This notabene can be removed from `SNMPV3Form` once SNMPv3 implementation is considered complete.
Codecov Report
@@ Coverage Diff @@
## master #2699 +/- ##
==========================================
+ Coverage 55.19% 55.24% +0.05%
==========================================
Files 561 561
Lines 40917 40947 +30
==========================================
+ Hits 22584 22622 +38
+ Misses 18333 18325 -8
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
These need to reflect the existence of the new SNMPv3 profile type.
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.
Looking good. I'm assuming what's missing is tests?
Correct! Still missing being able to run tests directly from my editor when working with NAV. Also, the coverage data generated inside the docker container will have different paths to reference the covered files, which aren't recognized by my IDE, so I cannot even view proper coverage data without pushing a PR to get some CodeCov feedback :P |
As with SNMP v1/v2 profiles, it is good to know whether a profile represents write access to a device or not, something PortAdmin or Arnold will need to know in order to select the correct profile if there are several.
Netbox.get_preferred_snmp_management_profile() also needs to be able to look at SNMPv3 profiles and return those if they fit - as they would take priority before SNMPv2 profiles, if there are any.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Looks good, is it feature complete now? See also inline comment.
AFAIK, it is. But profiles are flexible, so we can always revisit it if we find we need more options later. |
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.
Looks fine to me but maybe @johannaengland will spot something. Though, the real challenge will be the actual implementation!
While there is already a profile type for SNMP with a v1/v2c protocol version choice, none of the other attributes of this profile are relevant for SNMPv3, and it hardly serves us to complicate these profiles with reams of attributes that don't belong in v1/v2c.
This therefore adds a new profile type for SNMPv3, with the corresponding definition in a SeedDB management profile form.
It also adds the option to add generic warning messages to protocol forms as a whole, so that the SNMPv3 protocol form can be marked as experimental/not-yet-fully-implemented-in-the-backend
Closes #2693