org.snmp4j.agent.security
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:
1.0
Author:
Frank Fock

Field Summary
static int VACM_MATCH_EXACT
           
static int VACM_MATCH_PREFIX
           
static int VACM_VIEW_EXCLUDED
           
static int VACM_VIEW_INCLUDED
           
 
Fields inherited from interface org.snmp4j.agent.security.VACM
VACM_NO_ACCESS_ENTRY, VACM_NO_GROUP_NAME, VACM_NO_SUCH_CONTEXT, VACM_NO_SUCH_VIEW, VACM_NOT_IN_VIEW, VACM_OK, VACM_OTHER_ERROR, VIEW_NOTIFY, VIEW_READ, VIEW_WRITE
 
Method Summary
 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 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.
 
Methods inherited from interface org.snmp4j.agent.security.VACM
getViewName, isAccessAllowed, isAccessAllowed
 

Field Detail

VACM_MATCH_EXACT

static final int VACM_MATCH_EXACT
See Also:
Constant Field Values

VACM_MATCH_PREFIX

static final int VACM_MATCH_PREFIX
See Also:
Constant Field Values

VACM_VIEW_INCLUDED

static final int VACM_VIEW_INCLUDED
See Also:
Constant Field Values

VACM_VIEW_EXCLUDED

static final int VACM_VIEW_EXCLUDED
See Also:
Constant Field Values
Method Detail

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 exists).

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).

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).

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.