Class DHKickstartParametersImpl

  • All Implemented Interfaces:
    DHKickstartParameters


    public class DHKickstartParametersImpl
    extends Object
    implements DHKickstartParameters
    The DHKickstartParametersImpl provides the kickstart public parameters needed to initialize Diffie Hellman key exchange. These parameters have to exchanged out-of-band as defined by RFC 2786. This implementation of the DHKickstartParameters interface provides a static method to create kickstart parameters from a set of properties of the following form:
    
     dh.publicKey.<securityName>=<publicKeyHexFormattedWithoutSeparator>
     dh.authProtocol.<securityName>=<OID>
     dh.privProtocol.<securityName>=<OID>
     dh.vacm.role.<securityName>=<vacmRole>
     dh.reset.<securityName>=true|false
     
     
    Since:
    3.0
    Author:
    Frank Fock
    • Constructor Summary

      Constructors 
      Constructor Description
      DHKickstartParametersImpl​(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey)
      Create a Diffie Hellman kickstart parameter set with default authentication (MD5) and privacy (DES) protocols.
      DHKickstartParametersImpl​(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey, org.snmp4j.smi.OID authenticationProtocol, org.snmp4j.smi.OID privacyProtocol, String vacmRole, boolean resetRequested)
      Create a Diffie Hellman kickstart parameter set with the provided authentication and privacy protocols.
    • Constructor Detail

      • DHKickstartParametersImpl

        public DHKickstartParametersImpl​(org.snmp4j.smi.OctetString securityName,
                                         org.snmp4j.smi.OctetString publicKey,
                                         org.snmp4j.smi.OID authenticationProtocol,
                                         org.snmp4j.smi.OID privacyProtocol,
                                         String vacmRole,
                                         boolean resetRequested)
        Create a Diffie Hellman kickstart parameter set with the provided authentication and privacy protocols.
        Parameters:
        securityName - the security name of the provisioned user.
        publicKey - the Diffie Hellman public key as defined by RFC 2786.
        authenticationProtocol - the OID of the authentication protocol to be used by this user.
        privacyProtocol - the OID of the privacy protocol to be used by this user.
        vacmRole - the agent implementation specific VACM role that defines the access rights associated with the user.
        resetRequested - if true, existing nonVolatile or permanent USM user with the same security name will be replaced by this new kickstart user.
      • DHKickstartParametersImpl

        public DHKickstartParametersImpl​(org.snmp4j.smi.OctetString securityName,
                                         org.snmp4j.smi.OctetString publicKey)
        Create a Diffie Hellman kickstart parameter set with default authentication (MD5) and privacy (DES) protocols.
        Parameters:
        securityName - the security name of the provisioned user.
        publicKey - the Diffie Hellman public key as defined by RFC 2786.
    • Method Detail

      • getSecurityName

        public org.snmp4j.smi.OctetString getSecurityName​()
        Description copied from interface: DHKickstartParameters
        Gets the security name associated with the kickstart parameters.
        Specified by:
        getSecurityName in interface DHKickstartParameters
        Returns:
        a SNMPv3 security name.
      • getPublicKey

        public org.snmp4j.smi.OctetString getPublicKey​()
        Description copied from interface: DHKickstartParameters
        Gets the public Diffie Hellman public key for this security name (from the command generator).
        Specified by:
        getPublicKey in interface DHKickstartParameters
        Returns:
        an octet string.
      • getAuthenticationProtocol

        public org.snmp4j.smi.OID getAuthenticationProtocol​()
        Description copied from interface: DHKickstartParameters
        As extension for RFC 2786 this parameter allows to select the authentication protocol to use for the kickstart operation. Default is usmHMACMD5AuthProtocol, if null is returned.
        Specified by:
        getAuthenticationProtocol in interface DHKickstartParameters
        Returns:
        the OID of the authentication protocol or null if the default (usmHMACMD5AuthProtocol) should be used.
      • getPrivacyProtocol

        public org.snmp4j.smi.OID getPrivacyProtocol​()
        Description copied from interface: DHKickstartParameters
        As extension for RFC 2786 this parameter allows to select the privacy protocol to use for the kickstart operation. Default is usmDESPrivProtocol, if null is returned.
        Specified by:
        getPrivacyProtocol in interface DHKickstartParameters
        Returns:
        the OID of the privacy protocol or null if the default (usmDESPrivProtocol) should be used.
      • getVacmRole

        public String getVacmRole​()
        Description copied from interface: DHKickstartParameters
        Returns the (optional) role associated with the security name. The actual access rights of the role is implementation dependent but should offer at least the following roles:
             admin - unlimited access
             monitor - read-only access
         
        Specified by:
        getVacmRole in interface DHKickstartParameters
        Returns:
        the VACM role that defines the VACM access rights (implementation specific). If no role is provided, the agent will implementation specific select appropriate access rights.
      • isResetRequested

        public boolean isResetRequested​()
        Indicates whether an existing user with StorageType nonVolatile or permanent should be replaced by this kickstart user or not.
        Specified by:
        isResetRequested in interface DHKickstartParameters
        Returns:
        true if a reset of an existing user is requested, false otherwise.
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class Object