VacmConfigurator
public class BasicVacmConfigurator extends java.lang.Object implements VacmConfigurator
BasicVacmConfigurator
implements the VacmConfigurator
that uses three unrestricted views
for all access types to support two roles admin
and monitor
. The admin
role has unrestricted
access to the agent, whereas monitor
has no write access, but unrestricted read and notification access.Modifier and Type | Class | Description |
---|---|---|
static class |
BasicVacmConfigurator.Roles |
VacmConfigurator.VacmConfigResult
Modifier and Type | Field | Description |
---|---|---|
protected int |
contextMatch |
|
protected org.snmp4j.smi.OctetString |
contextPrefix |
|
protected org.snmp4j.smi.OID |
rootOID |
|
protected org.snmp4j.smi.OctetString |
rootViewName |
|
protected org.snmp4j.security.SecurityLevel |
securityLevel |
|
protected org.snmp4j.security.SecurityModel |
securityModel |
Constructor | Description |
---|---|
BasicVacmConfigurator() |
Modifier and Type | Method | Description |
---|---|---|
VacmConfigurator.VacmConfigResult |
addUser(MutableVACM vacm,
org.snmp4j.smi.OctetString securityName,
java.lang.String role) |
Add a new user to a group.
|
java.lang.String[] |
getSupportedRoles() |
Returns the list of roles supported by this configurator.
|
protected boolean |
isRoleSupported(java.lang.String role) |
|
VacmConfigurator.VacmConfigResult |
removeRole(MutableVACM vacm,
java.lang.String role) |
Remover all users from the specified security group and then remove the group itself.
|
VacmConfigurator.VacmConfigResult |
removeUser(MutableVACM vacm,
org.snmp4j.smi.OctetString securityName,
java.lang.String role) |
Remove a new user from the specified group.
|
protected org.snmp4j.smi.OctetString rootViewName
protected org.snmp4j.smi.OID rootOID
protected org.snmp4j.security.SecurityModel securityModel
protected org.snmp4j.security.SecurityLevel securityLevel
protected org.snmp4j.smi.OctetString contextPrefix
protected int contextMatch
public VacmConfigurator.VacmConfigResult addUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, java.lang.String role)
VacmConfigurator
addUser
in interface VacmConfigurator
vacm
- the MutableVACM
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.
See VacmConfigurator.getSupportedRoles()
.public VacmConfigurator.VacmConfigResult removeUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, java.lang.String role)
VacmConfigurator
VacmConfigurator.VacmConfigResult.userRemovedFromRole
will be returned.
If the role identified
by the group is not supported by this configurator, an error is returned.removeUser
in interface VacmConfigurator
vacm
- the MutableVACM
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.
See VacmConfigurator.getSupportedRoles()
.public VacmConfigurator.VacmConfigResult removeRole(MutableVACM vacm, java.lang.String role)
VacmConfigurator
VACM
provided, but not the USM
.removeRole
in interface VacmConfigurator
vacm
- the MutableVACM
to modifyrole
- the group (VACM)/role to be removed from the above vacm
.public java.lang.String[] getSupportedRoles()
VacmConfigurator
getSupportedRoles
in interface VacmConfigurator
protected boolean isRoleSupported(java.lang.String role)
Copyright © 2018 SNMP4J.org. All rights reserved.