- All Known Implementing Classes:
BasicVacmConfigurator
public interface VacmConfigurator
The
VacmConfigurator
defines an easy to use interface for MutableVACM
configuration.
Implementations of this class can provide role/group based VACM security configurations that hide all the
VACM
details. Each implementation of this interface defines a role and their security settings.- Since:
- 3.0
- Author:
- Frank Fock
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddUser
(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role) Add a new user to a group.String[]
Returns the list of roles supported by this configurator.removeRole
(MutableVACM vacm, String role) Remover all users from the specified security group and then remove the group itself.removeUser
(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role) Remove a new user from the specified group.
-
Method Details
-
addUser
VacmConfigurator.VacmConfigResult addUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role) Add a new user to a group. If the referenced group does not exist, it will be created. If the role identified by the group is not supported by this configurator, an error is returned.- Parameters:
vacm
- theMutableVACM
to modifysecurityName
- the user name of the new user.role
- the group (VACM)/role name associated with the user. Only supported groups must ber provided. SeegetSupportedRoles()
.- Returns:
- the operation result.
-
removeUser
VacmConfigurator.VacmConfigResult removeUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role) Remove a new user from the specified group. If the referenced group does not exist, nothing will be changed andVacmConfigurator.VacmConfigResult.userRemovedFromRole
will be returned. If the role identified by the group is not supported by this configurator, an error is returned.- Parameters:
vacm
- theMutableVACM
to modifysecurityName
- the user name of the new user.role
- the group (VACM)/role name associated with the user. Only supported groups must be provided. SeegetSupportedRoles()
.- Returns:
- the operation result.
-
removeRole
Remover all users from the specified security group and then remove the group itself. This operation will only affect theVACM
provided, but not theUSM
.- Parameters:
vacm
- theMutableVACM
to modifyrole
- the group (VACM)/role to be removed from the abovevacm
.- Returns:
- the operation result.
-
getSupportedRoles
String[] getSupportedRoles()Returns the list of roles supported by this configurator.- Returns:
- a non-empty array of roles/groups supported by this configurator.
-