Interface MutableVACM

All Superinterfaces:
VACM
All Known Implementing Classes:
VacmMIB

public interface MutableVACM extends VACM
The MutableVACM interface extends the basic VACM by providing methods to change the configuration of the view-based access model.
Version:
3.0
Author:
Frank Fock
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    accessEntryCount(org.snmp4j.smi.OctetString groupName)
    Counts the number of access entries for the provided group name.
    void
    addAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel, int match, org.snmp4j.smi.OctetString readView, org.snmp4j.smi.OctetString writeView, org.snmp4j.smi.OctetString notifyView, int storageType)
    Adds an access entry for the specified group name.
    void
    addGroup(int securityModel, org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString groupName, int storageType)
    Adds a security name to group mapping to the VACM.
    void
    addViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree, org.snmp4j.smi.OctetString mask, int type, int storageType)
    Adds a view tree family to an VACM view.
    boolean
    hasSecurityToGroupMapping(int securityModel, org.snmp4j.smi.OctetString securityName)
    Check if there is a security mapping for the specified security model and security name.
    boolean
    removeAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel)
    Removes an access entry from the VACM.
    boolean
    removeGroup(int securityModel, org.snmp4j.smi.OctetString securityName)
    Removes a security name to group mapping from the VACM.
    boolean
    removeViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree)
    Removes a view tree family from a VACM view.
    int
    viewTreeFamilyEntryCount(org.snmp4j.smi.OctetString viewName)
    Counts the number of view name to tree family mapping entries in this VACM.

    Methods inherited from interface org.snmp4j.agent.security.VACM

    getViewName, hasContext, isAccessAllowed, isAccessAllowed
  • Field Details

  • Method Details

    • addGroup

      void addGroup(int securityModel, org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString groupName, int storageType)
      Adds a security name to group mapping to the VACM.
      Parameters:
      securityModel - the security model the mapping is based on, see SecurityModel for possible values.
      securityName - the security name to map to a group.
      groupName - the name of the group.
      storageType - the storage type to use for the entry. Possible values are defined by StorageType.
    • removeGroup

      boolean removeGroup(int securityModel, org.snmp4j.smi.OctetString securityName)
      Removes a security name to group mapping from the VACM.
      Parameters:
      securityModel - the security model the mapping is based on, see SecurityModel for possible values.
      securityName - the mapped security name.
      Returns:
      true if the entry has been removed, false otherwise (i.e. if such an entry does not exist).
    • hasSecurityToGroupMapping

      boolean hasSecurityToGroupMapping(int securityModel, org.snmp4j.smi.OctetString securityName)
      Check if there is a security mapping for the specified security model and security name.
      Parameters:
      securityModel - the security model the mapping is based on, see SecurityModel for possible values.
      securityName - a security name.
      Returns:
      true if there is a mapping and false otherwise.
    • addAccess

      void addAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel, int match, org.snmp4j.smi.OctetString readView, org.snmp4j.smi.OctetString writeView, org.snmp4j.smi.OctetString notifyView, int storageType)
      Adds an access entry for the specified group name.
      Parameters:
      groupName - the group name for which to create an access entry.
      prefix - if match is VACM_MATCH_PREFIX the context name checked by the VACM must exatcly match this value, otherwise a prefix match is sufficient.
      securityModel - the security model that must be used to gain access on behalf of this entry, see SecurityModel for possible values.
      securityLevel - the minimum security level that must be used to gain access on behalf of this entry, see SecurityLevel for possible values.
      match - specifies the type of context match used by this entry. Possible values are VACM_MATCH_EXACT and VACM_MATCH_PREFIX.
      readView - the MIB view of the SNMP context to which this conceptual row authorizes read access. If the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.
      writeView - the MIB view of the SNMP context to which this conceptual row authorizes write access. If the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.
      notifyView - the MIB view of the SNMP context to which this conceptual row authorizes access for notifications. If the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.
      storageType - the storage type to use for the entry. Possible values are defined by StorageType.
    • removeAccess

      boolean removeAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel)
      Removes an access entry from the VACM.
      Parameters:
      groupName - the group name for which to remove an access entry.
      prefix - the context name or prefix of the access entry.
      securityModel - the security model that must be used to gain access on behalf of this entry, see SecurityModel for possible values.
      securityLevel - the minimum security level that must be used to gain access on behalf of this entry, see SecurityLevel for possible values.
      Returns:
      true if the entry has been removed, false otherwise (i.e. if such an entry does not exists).
    • accessEntryCount

      int accessEntryCount(org.snmp4j.smi.OctetString groupName)
      Counts the number of access entries for the provided group name.
      Parameters:
      groupName - the group name for which access entries should be counted.
      Returns:
      the number of group to view(s) access entries.
      Since:
      3.0
    • addViewTreeFamily

      void addViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree, org.snmp4j.smi.OctetString mask, int type, int storageType)
      Adds a view tree family to an VACM view.
      Parameters:
      viewName - the view name to which a tree family is to be added.
      subtree - the MIB subtree which when combined with the corresponding instance of mask (vacmViewTreeFamilyMask) defines a family of view subtrees.
      mask - The bit mask which, in combination with the corresponding instance of subtree (vacmViewTreeFamilySubtree), defines a family of view subtrees. See RFC 3415 vacmViewTreeFamilySubtree definition for more details on the bit mask.
      type - specifies whether the subtree is included VACM_VIEW_INCLUDED or excluded VACM_VIEW_EXCLUDED from the view.
      storageType - the storage type to use for the entry. Possible values are defined by StorageType.
    • removeViewTreeFamily

      boolean removeViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree)
      Removes a view tree family from a VACM view.
      Parameters:
      viewName - the view name from which a subtree family is to be removed.
      subtree - the MIB subtree associated with this entry.
      Returns:
      true if the entry has been removed, false otherwise (i.e. if such an entry does not exists).
    • viewTreeFamilyEntryCount

      int viewTreeFamilyEntryCount(org.snmp4j.smi.OctetString viewName)
      Counts the number of view name to tree family mapping entries in this VACM.
      Parameters:
      viewName - a VACM view name.
      Returns:
      the number of view tree family entries for this view name.
      Since:
      3.0