luci-app-snmpd: add strong SNMPv3 crypto options#8570
luci-app-snmpd: add strong SNMPv3 crypto options#8570micpf wants to merge 1 commit intoopenwrt:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
@micpf Please make github action happy |
|
ping @ckorber |
Add SHA-256, SHA-384, SHA-512, SHA-224 authentication and AES-192, AES-256 encryption options to the SNMPv3 user configuration. net-snmp has supported these algorithms for a while, but the LuCI dropdown only offered SHA(-1), MD5, AES(-128) and DES. Modern security standards (e.g. EN 18031 CCK-1) require at least 112-bit security strength, which rules out SHA-1 (80-bit) and DES (56-bit). The default authentication type is changed from SHA to SHA-256. The init script already passes auth_type and privacy_type directly to net-snmp's createUser, so no backend changes are needed. Signed-off-by: Michael Pfeifroth <michael.pfeifroth@westermo.com>
2fd9c67 to
597b550
Compare
|
Ok, now signed off with full name. |
|
Thank you. @micpf I tested that on my machine: But User Seems that there are also changes necessary in net-snmp |
|
Thanks for testing! I was able to reproduce and investigate the "Unknown user name" issue. Root cause: stale persistent user data. net-snmp caches created users in Fix: Delete Verified all combinations on OpenWrt 25.12 (net-snmp 5.9.4, aarch64):
Also verified that wrong passwords are properly rejected (no false positives). net-snmp handles key extension internally for cases where the auth hash output is shorter than the privacy key requirement (e.g. SHA-1 with AES-256), using the Blumenthal key extension algorithm (RFC 3826 / draft-blumenthal-aes-usm-04). |
|
Evidently a change in parameters requires a reinit. The way this (sort of) is handled in lldpd is to run an md5 or sha hash over the output config (existing vs new). Without such a change the behaviour is just a 'bug'. A fix seems like adding that |
|
Agreed, the stale persistent user data is a real usability issue. However, the fix belongs in the net-snmp init script (packages repo), not in luci-app-snmpd — the init script should detect config changes and clear I'd consider that a separate bug/PR against the net-snmp package. This PR only adds the missing algorithm options to the LuCI dropdown, which is correct regardless of the reinit issue. |
Add SHA-256, SHA-384, SHA-512, SHA-224 authentication and AES-192,
AES-256 encryption options to the SNMPv3 user configuration.
net-snmp has supported these algorithms for a while, but the LuCI
dropdown only offered SHA(-1), MD5, AES(-128) and DES. Modern security
standards (e.g. EN 18031 CCK-1) require at least 112-bit security
strength, which rules out SHA-1 (80-bit) and DES (56-bit).
The default authentication type is changed from SHA to SHA-256.
The init script already passes
auth_typeandprivacy_typedirectly tonet-snmp's
createUser, so no backend changes are needed.Tested with net-snmp 5.9.4 on OpenWrt 25.12 (aarch64).