Interface VacmConfigurator

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
  • 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 - the MutableVACM to modify
      securityName - the user name of the new user.
      role - the group (VACM)/role name associated with the user. Only supported groups must ber provided. See getSupportedRoles().
      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 and VacmConfigurator.VacmConfigResult.userRemovedFromRole will be returned. If the role identified by the group is not supported by this configurator, an error is returned.
      Parameters:
      vacm - the MutableVACM to modify
      securityName - the user name of the new user.
      role - the group (VACM)/role name associated with the user. Only supported groups must be provided. See getSupportedRoles().
      Returns:
      the operation result.
    • removeRole

      Remover all users from the specified security group and then remove the group itself. This operation will only affect the VACM provided, but not the USM.
      Parameters:
      vacm - the MutableVACM to modify
      role - the group (VACM)/role to be removed from the above vacm.
      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.