Class HashAuthentication

java.lang.Object
org.dogtagpki.server.authentication.AuthManager
com.netscape.cms.authentication.HashAuthentication
All Implemented Interfaces:
IExtendedPluginInfo

public class HashAuthentication extends AuthManager implements IExtendedPluginInfo
Hash uid/pwd directory based authentication manager

Version:
$Revision$, $Date$
  • Field Details

  • Constructor Details

    • HashAuthentication

      public HashAuthentication()
      Default constructor, initialization must follow.
  • Method Details

    • init

      public void init(AuthenticationConfig authenticationConfig, String name, String implName, AuthManagerConfig config) throws EBaseException
      Description copied from class: AuthManager
      Initialize this authentication manager.
      Specified by:
      init in class AuthManager
      Parameters:
      name - The name of this authentication manager instance.
      implName - The name of the authentication manager plugin.
      config - The configuration store for this authentication manager.
      Throws:
      EBaseException - If an initialization error occurred.
    • init

      public void init(ConfigStore config) throws EProfileException
      Description copied from class: AuthManager
      Initializes this default policy.
      Specified by:
      init in class AuthManager
      Parameters:
      config - configuration store
      Throws:
      EProfileException - failed to initialize
    • getAuthToken

      public AuthToken getAuthToken(String key)
    • addAuthToken

      public void addAuthToken(String pageID, AuthToken token)
    • deleteToken

      public void deleteToken(String pageID)
    • getData

      public HashAuthData getData()
    • createEntry

      public void createEntry(String host, String dn, long timeout, String secret, long lastLogin)
    • disable

      public void disable(String hostname)
    • getAgentName

      public String getAgentName(String hostname)
    • setAgentName

      public void setAgentName(String hostname, String agentName)
    • isEnable

      public boolean isEnable(String hostname)
    • getTimeout

      public long getTimeout(String hostname)
    • setTimeout

      public void setTimeout(String hostname, long timeout)
    • getSecret

      public String getSecret(String hostname)
    • setSecret

      public void setSecret(String hostname, String secret)
    • getLastLogin

      public long getLastLogin(String hostname)
    • setLastLogin

      public void setLastLogin(String hostname, long lastlogin)
    • getPageID

      public long getPageID()
    • validFingerprint

      public boolean validFingerprint(String host, String pageID, String uid, String fingerprint)
    • getHosts

      public Enumeration<String> getHosts()
    • hashFingerprint

      public String hashFingerprint(String host, String pageID, String uid)
    • shutdown

      public void shutdown()
      Description copied from class: AuthManager
      Prepare this authentication manager for a shutdown. Called when the server is exiting for any cleanup needed.
      Specified by:
      shutdown in class AuthManager
    • authenticate

      public AuthToken authenticate(AuthCredentials authCreds) throws EBaseException
      Authenticates a user based on uid, pwd in the directory.
      Specified by:
      authenticate in class AuthManager
      Parameters:
      authCreds - The authentication credentials.
      Returns:
      The user's ldap entry dn.
      Throws:
      EInvalidCredentials - If the uid and password are not valid
      EBaseException - If an internal error occurs.
    • populate

      public void populate(AuthToken token, Request request) throws EProfileException
      Description copied from class: AuthManager
      Populates authentication specific information into the request for auditing purposes.
      Specified by:
      populate in class AuthManager
      Parameters:
      token - authentication token
      request - request
      Throws:
      EProfileException - failed to populate
    • getRequiredCreds

      public String[] getRequiredCreds()
      Returns array of required credentials for this authentication manager.
      Specified by:
      getRequiredCreds in class AuthManager
      Returns:
      Array of required credentials.
    • getText

      public String getText(Locale locale)
      Description copied from class: AuthManager
      Retrieves the localizable description of this policy.
      Specified by:
      getText in class AuthManager
      Parameters:
      locale - end user locale
      Returns:
      localized authenticator description
    • getValueNames

      public Enumeration<String> getValueNames()
      Description copied from class: AuthManager
      Retrieves a list of names of the property.
      Specified by:
      getValueNames in class AuthManager
      Returns:
      a list of property names
    • getValueDescriptor

      public IDescriptor getValueDescriptor(Locale locale, String name)
      Description copied from class: AuthManager
      Retrieves the descriptor of the given value property by name.
      Specified by:
      getValueDescriptor in class AuthManager
      Parameters:
      locale - user locale
      name - property name
      Returns:
      descriptor of the requested property
    • isValueWriteable

      public boolean isValueWriteable(String name)
      Description copied from class: AuthManager
      Checks if the value of the given property should be serializable into the request. Passsword or other security-related value may not be desirable for storage.
      Specified by:
      isValueWriteable in class AuthManager
      Parameters:
      name - property name
      Returns:
      true if the property is not security related
    • isSSLClientRequired

      public boolean isSSLClientRequired()
      Description copied from class: AuthManager
      Checks if this authenticator requires SSL client authentication.
      Specified by:
      isSSLClientRequired in class AuthManager
      Returns:
      client authentication required or not
    • getExtendedPluginInfo

      public String[] getExtendedPluginInfo()
      Description copied from interface: IExtendedPluginInfo
      This method returns an array of strings. Each element of the array represents a configurable parameter, or some other meta-info (such as help-token) there is an entry indexed on that parameter name Where: type_info is either 'string', 'number', 'boolean', 'password' or 'choice(ch1,ch2,ch3,...)' If the marker 'required' is included after the type_info, the parameter will has some visually distinctive marking in the UI. 'description' is a short sentence describing the parameter 'choice' is rendered as a drop-down list. The first parameter in the list will be activated by default 'boolean' is rendered as a checkbox. The resulting parameter will be either 'true' or 'false' 'string' allows any characters 'number' allows only numbers 'password' is rendered as a password field (the characters are replaced with *'s when being types. This parameter is not passed through to the plugin. It is instead inserted directly into the password cache keyed on the instance name. The value of the parameter 'bindPWPrompt' (see example below) is set to the key. In addition to the configurable parameters, the following magic parameters may be defined: HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin HELP_TEXT;helptext - a general help string describing the plugin For example: "username;string;The username you wish to login as" "bindPWPrompt;password;Enter password to bind as above user with" "algorithm;choice(RSA,DSA);Which algorithm do you want to use" "enable;boolean;Do you want to run this plugin" "port;number;Which port number do you want to use"
      Specified by:
      getExtendedPluginInfo in interface IExtendedPluginInfo