Class DHKickstartParametersImpl

  • All Implemented Interfaces:
    DHKickstartParameters

    public class DHKickstartParametersImpl
    extends java.lang.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 implement 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, java.lang.String vacmRole, boolean resetRequested)
      Create a Diffie Hellman kickstart parameter set with the provided authentication and privacy protocols.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      org.snmp4j.smi.OID getAuthenticationProtocol()
      As extension for RFC 2786 this parameter allows to select the authentication protocol to use for the kickstart operation.
      org.snmp4j.smi.OID getPrivacyProtocol()
      As extension for RFC 2786 this parameter allows to select the privacy protocol to use for the kickstart operation.
      org.snmp4j.smi.OctetString getPublicKey()
      Gets the public Diffie Hellman public key for this security name (from the command generator).
      org.snmp4j.smi.OctetString getSecurityName()
      Gets the security name associated with the kickstart parameters.
      java.lang.String getVacmRole()
      Returns the (optional) role associated with the security name.
      int hashCode()  
      boolean isResetRequested()
      Indicates whether an existing user with StorageType nonVolatile or permanent should be replaced by this kickstart user or not.
      static java.util.List<DHKickstartParameters> readFromProperties​(java.lang.String propertyPrefix, java.util.Properties properties)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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,
                                         java.lang.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 nonVoltile 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 java.lang.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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • readFromProperties

        public static java.util.List<DHKickstartParameters> readFromProperties​(java.lang.String propertyPrefix,
                                                                               java.util.Properties properties)