com.sun.management.snmp.usm
Interface SnmpUsmLcd

All Superinterfaces:
com.sun.management.internal.snmp.SnmpModelLcd
All Known Implementing Classes:
SnmpUsmPasswordLcd

public interface SnmpUsmLcd
extends com.sun.management.internal.snmp.SnmpModelLcd

An Usm Lcd is handling user configuration needed by the User based Security Model as defined in RFC 2574. It retrieves the initial configuration and allow to add user at runtime.

Since:
Java DMK 5.1

Field Summary
static int NON_VOLATILE
          Means that the data stored is permanent.
static int VOLATILE
          Means that the data stored is volatile.
 
Method Summary
 void addEngine(SnmpEngineId engineId)
          Adds an unknown received engine Id to the Lcd.
 void addUser(SnmpEngineId engineId, String userName, String securityName, String authProtocol, String authPassword, String privProtocol, String privKey, int storage, boolean template)
          Adds a user to the Usm Lcd.
 void addUser(SnmpUsmSecureUser user, boolean notifyMIB)
          Adds a user to the Usm Lcd.
 SnmpUsmSecureUser createNewUser(byte[] engineId, String userName)
          Asks the Usm Lcd to create a new user in the storage space.
 SnmpUsmAlgorithmManager getAlgorithmManager()
          Gets the associated SnmpUsmAlgorithmManager.
 Enumeration getAllUsers()
          Gets an enumeration of all the users SnmpUsmSecureUser located in the Lcd.
 int getStorageType()
          Returns the storage type (PERMANENT or VOLATILE).
 SnmpUsmSecureUser getUser(SnmpEngineId engineId, String userName)
          Gets the SnmpUsmSecureUser for the passed user name and authoritative engine Id.
 SnmpUsmAuthPair getUserAuthPair(SnmpEngineId engineId, String userName)
          Gets the SnmpUsmAuthAlgorithm/Localized key pair associated to a user name and authoritative engine Id.
 SnmpUsmPrivPair getUserPrivPair(SnmpEngineId engineId, String userName)
          Gets the SnmpUsmPrivAlgorithm/Localized key pair associated to a user name and authoritative engine Id.
 void removeUser(SnmpEngineId engineId, String userName, boolean notifyMIB)
          Removes a user form the Lcd.
 void setAlgorithmManager(SnmpUsmAlgorithmManager manager)
          Associates an SnmpUsmAlgorithmManager.
 void setMibTable(SnmpUsmMibTable table)
          Adds an Usm MIB table.
 void setUserAuthKeyChange(SnmpUsmSecureUser user, byte[] keyChange)
          Asks the Lcd to set the key change parameters to the passed user.
 void setUserPrivKeyChange(SnmpUsmSecureUser user, byte[] keyChange)
          Asks the Lcd to set the key change parameters to the passed user.
 void syncDataSource()
          Tells the Lcd to synchronize with its data source.
 

Field Detail

NON_VOLATILE

static final int NON_VOLATILE
Means that the data stored is permanent.

See Also:
Constant Field Values

VOLATILE

static final int VOLATILE
Means that the data stored is volatile.

See Also:
Constant Field Values
Method Detail

getStorageType

int getStorageType()
Returns the storage type (PERMANENT or VOLATILE).

Returns:
The storage type.

createNewUser

SnmpUsmSecureUser createNewUser(byte[] engineId,
                                String userName)
Asks the Usm Lcd to create a new user in the storage space. This is a user factory.

Parameters:
engineId - The authoritative engine Id the user is associated to.
userName - The user name.
Returns:
The newly created user.

removeUser

void removeUser(SnmpEngineId engineId,
                String userName,
                boolean notifyMIB)
Removes a user form the Lcd. It will be removed only if it exists.

Parameters:
engineId - The engine Id to which the user is associated.
userName - The user name.
notifyMIB - True will notify the MIB.

getAllUsers

Enumeration getAllUsers()
Gets an enumeration of all the users SnmpUsmSecureUser located in the Lcd.

Returns:
The enumeration of users.

setMibTable

void setMibTable(SnmpUsmMibTable table)
Adds an Usm MIB table.

Parameters:
table - The MIB table.

addEngine

void addEngine(SnmpEngineId engineId)
Adds an unknown received engine Id to the Lcd. Could be useful from the manager side.

Parameters:
engineId - The unknown engine Id.

getUserAuthPair

SnmpUsmAuthPair getUserAuthPair(SnmpEngineId engineId,
                                String userName)
                                throws SnmpUsmAuthAlgorithmException,
                                       SnmpUsmEngineIdException,
                                       SnmpUsmUserNameException
Gets the SnmpUsmAuthAlgorithm/Localized key pair associated to a user name and authoritative engine Id.

Parameters:
engineId - The authoritative engine Id.
userName - The user name.
Throws:
SnmpUsmAuthAlgorithmException
SnmpUsmEngineIdException
SnmpUsmUserNameException

getUser

SnmpUsmSecureUser getUser(SnmpEngineId engineId,
                          String userName)
                          throws SnmpUsmEngineIdException,
                                 SnmpUsmUserNameException
Gets the SnmpUsmSecureUser for the passed user name and authoritative engine Id.

Parameters:
engineId - The authoritative engine Id.
userName - The user name.
Throws:
SnmpUsmEngineIdException
SnmpUsmUserNameException

getUserPrivPair

SnmpUsmPrivPair getUserPrivPair(SnmpEngineId engineId,
                                String userName)
                                throws SnmpUsmPrivAlgorithmException,
                                       SnmpUsmEngineIdException,
                                       SnmpUsmUserNameException
Gets the SnmpUsmPrivAlgorithm/Localized key pair associated to a user name and authoritative engine Id.

Parameters:
engineId - The authoritative engine Id.
userName - The user name.
Throws:
SnmpUsmPrivAlgorithmException
SnmpUsmEngineIdException
SnmpUsmUserNameException

addUser

void addUser(SnmpEngineId engineId,
             String userName,
             String securityName,
             String authProtocol,
             String authPassword,
             String privProtocol,
             String privKey,
             int storage,
             boolean template)
             throws SnmpUsmException
Adds a user to the Usm Lcd. The key is in a password format. Passwords must be translated in key. In case the passed user exists, it is updated with the new parameters.

Parameters:
engineId - The authoritative engine Id.
userName - The user name.
securityName - The security user name.
authProtocol - The authentication algorithm name.
authPassword - The authentication password.
privProtocol - The privacy algorithm name.
privKey - The privacy key. No password translation. This String must start with 0x.
storage - The storage type (PERMANENT or VOLATILE).
template - True, the user is a template. A template is not registered in the USM MIB.
Throws:
SnmpUsmException

addUser

void addUser(SnmpUsmSecureUser user,
             boolean notifyMIB)
             throws SnmpUsmException
Adds a user to the Usm Lcd.

Parameters:
user - The user to add.
notifyMIB - True will notify the MIB.
Throws:
SnmpUsmException

setAlgorithmManager

void setAlgorithmManager(SnmpUsmAlgorithmManager manager)
Associates an SnmpUsmAlgorithmManager. This manager is used to transform algorithm names in algorithm objects.

Parameters:
manager - The algorithm manager.

getAlgorithmManager

SnmpUsmAlgorithmManager getAlgorithmManager()
Gets the associated SnmpUsmAlgorithmManager. This manager is used to transform algorithm names in algorithm objects.

Returns:
The algorithm manager.

syncDataSource

void syncDataSource()
Tells the Lcd to synchronize with its data source. Must be called at least once in order to read configuration.


setUserAuthKeyChange

void setUserAuthKeyChange(SnmpUsmSecureUser user,
                          byte[] keyChange)
Asks the Lcd to set the key change parameters to the passed user. This is done after a remote configuration authentication key change action.

Parameters:
user - The user that has its key changed.
keyChange - The value to use at key compute time.

setUserPrivKeyChange

void setUserPrivKeyChange(SnmpUsmSecureUser user,
                          byte[] keyChange)
Asks the Lcd to set the key change parameters to the passed user. This is done after a remote configuration privacy key change action.

Parameters:
user - The user that has its key changed.
keyChange - The value to use at key compute time.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.