Package com.netscape.cms.authentication
Class HashAuthentication
java.lang.Object
com.netscape.cms.authentication.HashAuthentication
- All Implemented Interfaces:
IExtendedPluginInfo
,AuthManager
Hash uid/pwd directory based authentication manager
- Version:
- $Revision$, $Date$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final long
static org.slf4j.Logger
protected static String[]
static final String
Fields inherited from interface org.dogtagpki.server.authentication.AuthManager
CRED_CERT_SERIAL_TO_REVOKE, CRED_CMC_SELF_SIGNED, CRED_CMC_SIGNING_CERT, CRED_HOST_NAME, CRED_SESSION_ID, CRED_SSL_CLIENT_CERT
Fields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthToken
(String pageID, IAuthToken token) authenticate
(IAuthCredentials authCreds) Authenticates a user based on uid, pwd in the directory.void
createEntry
(String host, String dn, long timeout, String secret, long lastLogin) void
deleteToken
(String pageID) void
getAgentName
(String hostname) getAuthToken
(String key) String[]
Returns a list of configuration parameter names.Gets the configuration substore used by this authentication managergetData()
String[]
This method returns an array of strings.getHosts()
gets the plugin name of this authentication manager.long
getLastLogin
(String hostname) getName()
gets the name of this authentication manager instancelong
String[]
Returns array of required credentials for this authentication manager.long
getTimeout
(String hostname) hashFingerprint
(String host, String pageID, String uid) void
init
(String name, String implName, AuthManagerConfig config) Initialize this authentication manager.boolean
void
setAgentName
(String hostname, String agentName) void
setLastLogin
(String hostname, long lastlogin) void
void
setTimeout
(String hostname, long timeout) void
shutdown()
Prepare this authentication manager for a shutdown.boolean
validFingerprint
(String host, String pageID, String uid, String fingerprint)
-
Field Details
-
logger
public static org.slf4j.Logger logger -
SALT
- See Also:
-
CRED_UID
- See Also:
-
CRED_FINGERPRINT
- See Also:
-
CRED_PAGEID
- See Also:
-
CRED_HOST
- See Also:
-
mRequiredCreds
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT- See Also:
-
-
Constructor Details
-
HashAuthentication
public HashAuthentication()Default constructor, initialization must follow.
-
-
Method Details
-
init
Description copied from interface:AuthManager
Initialize this authentication manager.- Specified by:
init
in interfaceAuthManager
- 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.
-
getAuthToken
-
addAuthToken
-
deleteToken
-
getData
-
createEntry
-
disable
-
getAgentName
-
setAgentName
-
isEnable
-
getTimeout
-
setTimeout
-
getSecret
-
setSecret
-
getLastLogin
-
setLastLogin
-
getPageID
public long getPageID() -
validFingerprint
-
getHosts
-
hashFingerprint
-
shutdown
public void shutdown()Description copied from interface:AuthManager
Prepare this authentication manager for a shutdown. Called when the server is exiting for any cleanup needed.- Specified by:
shutdown
in interfaceAuthManager
-
authenticate
Authenticates a user based on uid, pwd in the directory.- Specified by:
authenticate
in interfaceAuthManager
- Parameters:
authCreds
- The authentication credentials.- Returns:
- The user's ldap entry dn.
- Throws:
EInvalidCredentials
- If the uid and password are not validEBaseException
- If an internal error occurs.
-
getRequiredCreds
Returns array of required credentials for this authentication manager.- Specified by:
getRequiredCreds
in interfaceAuthManager
- Returns:
- Array of required credentials.
-
getConfigStore
Gets the configuration substore used by this authentication manager- Specified by:
getConfigStore
in interfaceAuthManager
- Returns:
- configuration store
-
getName
gets the name of this authentication manager instance- Specified by:
getName
in interfaceAuthManager
- Returns:
- the name of this authentication manager.
-
getImplName
gets the plugin name of this authentication manager.- Specified by:
getImplName
in interfaceAuthManager
- Returns:
- the name of the authentication manager plugin.
-
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 interfaceIExtendedPluginInfo
-
getConfigParams
Returns a list of configuration parameter names. The list is passed to the configuration console so instances of this implementation can be configured through the console.- Specified by:
getConfigParams
in interfaceAuthManager
- Returns:
- String array of configuration parameter names.
-