Upgrade Generated Agent to SNMPv3

Hi,

I wasn’t sure whether to put this question here or in the AgenPro forum. It kinda fits both.

So we are using a fully generated SNMP agent based on a MiB. That has been working very well (it is usable with SNMPv1 or SNMPv2). The lib’s version is snmp4j-agent 2.7.2.

Now we want to “make it” SNMPv3 by adding SHA hashing and AES encryption. Somehow I can’t figure out what is the way to do this. Should we:

  1. re-generate the Agent.java with AgenPro? (I didn’t find any options saying v3)
  2. modify AgentConfig.properties (if so - how? I have no clue how to edit this file correctly)
  3. modify the generated Agent.java ourselves (again - how?)

I didn’t find answers to these questions in FAQ or how to articles. So any help or hints are greatly appreciated.

Thanks,
Axel

You do not need to regenerate the code (that will not change anything).
Option 2 or 3 from your list would be the way to go.

Option 2: If you are already using the sample AgentConfig.properties file, then SNMPv3 is already active. The format of the file is documented in the header comment and the JavaDoc of PropertyMOInput (SNMP4J-Agent 3.6.0)

Option 3 would result in adding code that programmatically modifies the USM and VACM MIBs.