|
Architecture - Targets and Credentials
It is not a trivial task to setup SNMP agent credentials.
It is different for SNMPv1, SNMPv2 or SNMPv3. It requires many lines of code
and / or many properties definition even for basic v2 / public
credentials.
Old SNMP4J example org.snmp4j.agent.test.TestAgent
requires ~300 lines of code to setup agent credentials.
The new org.snmp4j.agent.AgentConfigManager relies
on bulky and complex properties file.
FriendlySNMP drops default SNMP4J credentials setup and replaces
it with a simple family of target classes
These classes are instantiated and registered with the agent by
FriendlySNMP API.
This process is triggered by agent configuration.
For example, the following configuration property is required
for a basic v2 / public credentials:
This configuration property triggers the class
org.friendlysnmp.target.TargetV2
instantiation and registering with the agent.
This target has many defaults which are usually sufficient.
The fine tuning of the target could be achieved with configuration parameters
snmp.oidroot.notify-view
snmp.oidroot.read-view
snmp.oidroot.write-view
snmp.storage.community
snmp.storage.notify
snmp.storage.vacm.group
snmp.storage.vacm.access
snmp.storage.vacm.viewtree
Advanced tuning might require extending this class and overriding
some functionality.
SNMPv3 credentials setup example is very simple:
snmp.v3.user=friend
snmp.v3.protocol.auth=SHA
snmp.v3.protocol.priv=DES
#snmp.v3.password.key=friendly <-- optional obfuscation key
snmp.v3.password.auth=TumNjJ34uUA8XapXe3SYOQ==
snmp.v3.password.priv=/M3o0zp3Q+0g/BgRRoetGQ==
|
Passcodes are obfuscated with
FriendlyPro tool.
The actual passcode values in example above are
SHAAuthPassword and DESPrivPassword.
In rare circumstances the target object could be created with a custom
code in a class extended from a
org.friendlysnmp.target.TargetBase class.
The agent requires at least one registered target object.
Multiple targets are allowed.
|