Recently I noted that another vendor’s SNMP agent was emitting a usmStatsUnknownUserNames report instead of an authentication failure response when SNMPv3 was misconfigured. Unfortunately (for me), the manager software wasn’t configured to look for those reports and interpret the data properly. In an effort to simulate the behavior in-house, I turned to my subclassed BasicAgent I use for the integration tests. Sadly, no matter what I do (invalid username, empty username, various permutations of ReportSecurityLevelStrategy set on the agent), I always get a PDU.RESPONSE type back with the error status of SNMP_ERROR_AUTHORIZATION_ERROR and never a PDU.REPORT type.
Is there a secret incantation I am missing to alter the behavior of the Agent to emit those reports? I am using SNMP4J 2.8.0, but moving to a slightly newer version didn’t seem to change anything.