I've deployed OpenNMS through the docker images and have SNMPv3 polling working but haven't been able to get SNMPv3 traps or informs working.
trapd-configuration.xml:
<?xml version="1.0"?>
<trapd-configuration snmp-trap-port="162" new-suspect-on-trap="true">
<snmpv3-user
security-name="trapuser"
security-level="3"
auth-passphrase="authsecret"
auth-protocol="SHA"
privacy-passphrase="privsecret"
privacy-protocol="AES"/>
</trapd-configuration>
If I run the following from another host, which is being polled by OpenNMS via SNMPv3:
snmptrap -Dusm -v 3 -l authPriv -u trapuser -a SHA -A authsecret -x AES -X privsecret <opennms-host-ip> 42 coldStart.0
OpenNMS doesn't generate any event. In the trapd.log I can see the following warning:
2018-04-26 09:26:33,364 WARN [DefaultUDPTransportMapping_0.0.0.0/162] o.s.MessageDispatcherImpl: statusInfo=1.3.6.1.6.3.15.1.1.3.0 = 0, status=1404
From what I can tell this relates to an unknown username.
Likewise informs aren't working either and I get the same warning in the trapd.log file and a similar one at the sender side. If I run tcpdump I can see it retrieve the remote engineID from opennms.
snmpinform -Dusm -v 3 -l authPriv -u trapuser -a SHA -A authsecret -x AES -X privsecret <opennms-host-ip> 42 coldStart.0
registered debug token usm, 1
usm: potentially bootstrapping the USM table from session data
usm: getting user
usm: USM processing has begun (offset 39)
usm: getting user
usm: Failed to find engine data.
usm: USM processing completed.
usm: USM processing begun...
usm: USM processing completed.
usm: potentially bootstrapping the USM table from session data
usm: no flag defined... continuing
usm: user exists? x=(nil)
usm: Building user trapuser...
usm: USM processing has begun (offset 80)
usm: getting user trapuser
usm: match on user trapuser
usm: Encryption successful.
usm: USM processing completed.
usm: USM processing begun...
usm: match on user trapuser
usm: USM processing completed.
snmpinform: Unknown user name
Any ideas on what I'm doing wrong?