org.snmp4j.security |
org.snmp4j.security
Provides classes and interfaces for authentication and privacy of SNMP(v3)
messages.
The org.snmp4j.security package contains three groups of
classes and interfaces:
- The authentication protocols group contains interfaces and classes for
authentication of SNMP(v3) messages.
- The privacy protocols group contains interfaces and classes for encryption
and decryption of SNMP(v3) messages.
- The security model group combines authentication and privacy protocols
to provide security services to message processing models.
Authentication as well as privacy protocols are security protocols and
thus both are derived from the common interface SecurityProtocol .
In order to be able to use a security protocol with SNMP4J, the protocol
implementation class has to be registered with the
SecurityProtocols singleton, which provides access to
authentication and privacy protocols.
Authentication Protocols
All SNMP4J authentication protocol implementations have to implement the
AuthenticationProtocol interface. SNMP4J provides implementation
for the following authentication protocols:
- MD5, which is implemented by
AuthMD5 and
- SHA, which is implemented by
AuthSHA .
Privacy Protocols
All SNMP4J privacy protocol implementations have to implement the
PrivacyProtocol interface. SNMP4J provides implementation
for the following privacy protocols:
- DES in CBC mode, which is implemented by
PrivDES and
- AES with 128bit key, which is implemented by
PrivAES128 .
- AES with 192bit key, which is implemented by
PrivAES192 .
- AES with 256bit key, which is implemented by
PrivAES256 . In
order to be able to use 256bit strong encryption, the strong encryption
enhancement package has to be downloaded and installed.
Security Models
All SNMP4J security models have to implement the SecurityModel
interface. Before a security model can be used with SNMP4J, it has to be
registered with the SecurityModels singleton which provides
access to security models. SNMP4J implements a single security model, the
User Based Security Model (USM).
The USM class uses a user name table (which contains
user names) and a user table (which contains localized user information) to
store user information. A time table is used to store time information
about SNMP engines to protect SNMP communication against replay attacks
if the corresponding security level has chosen.
The following UML class diagram shows the most important classes of the
org.snmp4j.security package and their relationships
(relationships to other packages are not shown):
|
Java Source File Name | Type | Comment |
AuthenticationProtocol.java | Interface | The AuthenticationProtocol interface defines a common
interface for all SNMP authentication protocols. |
AuthGeneric.java | Class | The abstract class AuthGeneric implements common operations for
SNMP authentication protocols, such as MD5 and SHA. |
AuthMD5.java | Class | The AuthMD5 class implements the MD5 authentication protocol. |
AuthSHA.java | Class | The SHA class implements the Secure Hash Authentication. |
ByteArrayWindow.java | Class | The ByteArrayWindow provides windowed access to a subarray
of a byte array. |
DecryptParams.java | Class | Parameter class for encrypt and decrypt methods of
SecurityProtocol . |
Priv3DES.java | Class | Privacy protocol class for Triple DES (DESEDE).
This class uses DES-EDE in CBC mode to encrypt the data. |
PrivacyProtocol.java | Interface | The PrivacyProtocol interface defines a common
interface for all SNMP privacy protocols. |
PrivAES.java | Class | Base class for PrivAES128, PrivAES192 and PrivAES256.
This class uses AES in CFB mode to encrypt the data. |
PrivAES128.java | Class | Encryption class for AES 128. |
PrivAES192.java | Class | Encryption class for AES 192. |
PrivAES256.java | Class | Encryption class for AES 256. |
PrivDES.java | Class | Privacy protocol class for DES.
This class uses DES in CBC mode to encrypt the data. |
Salt.java | Class | Class that holds a 64 bit salt value for crypto operations.
This class tries to use the SecureRandom class to initialize
the salt value. |
SecurityLevel.java | Class | The SecurityLevel interface contains enumerated values
for the different security levels. |
SecurityModel.java | Interface | The SecurityModel interface as described in RFC3411 §4.4. |
SecurityModels.java | Class | The SecurityModels class is a collection of all
supported security models of a SNMP entity. |
SecurityParameters.java | Interface | The SecurityParameters interface represents the security
parameters in a SNMPv3 message. |
SecurityProtocol.java | Interface | The SecurityProtocol class defines common methods of
authentication and privacy protocols. |
SecurityProtocols.java | Class | The SecurityProtocols class holds all authentication and
privacy protocols for a SNMP entity.
To register security protocols other than the default, set the system
property
SecurityProtocols.SECURITY_PROTOCOLS_PROPERTIES to a customized version
of the SecurityProtocols.properties file. |
SecurityStateReference.java | Interface | The SecurityStateReference interface is an empty marker
interface for security model dependend state references. |
USM.java | Class | The USM class implements the User Based Security Model (USM)
as defined in RFC3414. |
UsmSecurityParameters.java | Class | |
UsmSecurityStateReference.java | Class | The UsmSecurityStateReference holds cached security data. |
UsmTimeEntry.java | Class | The UsmTimeEntry class represents time synchronization
information associated with an engine ID. |
UsmTimeTable.java | Class | The UsmTimeTable class is a singleton that stores USM user
information as part of the Local Configuration Datastore (LCD). |
UsmUser.java | Class | The UsmUser class represents USM user providing information
to secure SNMPv3 message exchange. |
UsmUserEntry.java | Class | The UsmUserEntry class represents a user in the
Local Configuration Datastore (LCD). |
UsmUserTable.java | Class | The UsmUserTable class stores USM user
information as part of the Local Configuration Datastore (LCD). |