Class AuthSubsystem
java.lang.Object
com.netscape.certsrv.base.Subsystem
com.netscape.cmscore.authentication.AuthSubsystem
Default authentication subsystem
- Author:
- cfu, lhsiao
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for certificate based authentication manager ID.static final String
Constant for certificate based authentication plugin ID.static final String
static org.slf4j.Logger
protected AuthenticationConfig
static final String
Constant for null authentication manager ID.static final String
Constant for null authentication plugin ID.static final String
Constant for password based authentication manager ID.static final String
Constant for password based authentication plugin ID.static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String name, AuthManager authMgrInst) Add an authentication manager instance.authenticate
(AuthCredentials authCred, String authMgrInstName) Authenticate to the named authentication manager instancevoid
Removes a authentication manager instance.Gets the authentication manager instance of the specified name.getAuthManager
(String name) gets the named authentication managergetAuthManagerPlugin
(String name) Retrieve a single auth manager instanceretrieve a single auth manager plugin by nameEnumerate all registered authentication manager plugins.Enumerate all authentication manager instances.String[]
getConfigParams
(String implName) Gets configuration parameters for the given authentication manager plugin.Returns the root configuration storage of this system.getId()
Retrieves id (name) of this subsystem.Get a hashtable containing all authentication instances.Get a hashtable containing all authentication plugins.String[]
getRequiredCreds
(String authMgrInstName) Gets a list of required authentication credential names of the specified authentication manager.void
init
(ConfigStore config) Initializes the authentication subsystem from the config store.void
void
void
Sets id string to this subsystem.void
shutdown()
shuts down authentication managers one by one.void
startup()
registers the administration servlet with the administration subsystem.Methods inherited from class com.netscape.certsrv.base.Subsystem
getCMSEngine, setCMSEngine
-
Field Details
-
logger
public static org.slf4j.Logger logger -
ID
- See Also:
-
PROP_CLASS
- See Also:
-
PROP_IMPL
- See Also:
-
PROP_PLUGIN
- See Also:
-
PASSWDUSERDB_PLUGIN_ID
Constant for password based authentication plugin ID.- See Also:
-
CERTUSERDB_PLUGIN_ID
Constant for certificate based authentication plugin ID.- See Also:
-
NULL_PLUGIN_ID
Constant for null authentication plugin ID.- See Also:
-
PASSWDUSERDB_AUTHMGR_ID
Constant for password based authentication manager ID.- See Also:
-
CERTUSERDB_AUTHMGR_ID
Constant for certificate based authentication manager ID.- See Also:
-
NULL_AUTHMGR_ID
Constant for null authentication manager ID.- See Also:
-
mAuthMgrPlugins
-
mAuthMgrInsts
-
mConfig
-
-
Constructor Details
-
AuthSubsystem
public AuthSubsystem()
-
-
Method Details
-
loadAuthManagerPlugins
- Throws:
EBaseException
-
loadAuthManagerInstances
- Throws:
EBaseException
-
init
Initializes the authentication subsystem from the config store. Load Authentication manager plugins, create and initialize initialize authentication manager instances. -
authenticate
public AuthToken authenticate(AuthCredentials authCred, String authMgrInstName) throws EMissingCredential, EInvalidCredentials, EAuthMgrNotFound, EBaseException Authenticate to the named authentication manager instance- Parameters:
authCred
- authentication credentials subject to the requirements of each authentication managerauthMgrInstName
- name of the authentication manager instance- Returns:
- authentication token with individualized authenticated information.
- Throws:
EMissingCredential
- If a required credential for the authentication manager is missing.EInvalidCredentials
- If the credentials cannot be authenticatedEAuthMgrNotFound
- The auth manager is not found.EBaseException
- If an internal error occurred.
-
getRequiredCreds
Gets a list of required authentication credential names of the specified authentication manager.- Parameters:
authMgrInstName
- The authentication manager name- Returns:
- a Vector of required credential attribute names.
- Throws:
EAuthMgrNotFound
-
getConfigParams
Gets configuration parameters for the given authentication manager plugin.- Parameters:
implName
- Name of the authentication plugin.- Returns:
- Hashtable of required parameters.
- Throws:
EAuthMgrPluginNotFound
EBaseException
-
add
Add an authentication manager instance.- Parameters:
name
- name of the authentication manager instanceauthMgrInst
- the authentication manager instance to be added
-
delete
Removes a authentication manager instance.- Parameters:
name
- name of the authentication manager
-
get
Gets the authentication manager instance of the specified name.- Parameters:
name
- name of the authentication manager instance- Returns:
- the named authentication manager instance
-
getAuthManagers
Enumerate all authentication manager instances. -
getAuthManagerPlugins
Enumerate all registered authentication manager plugins. -
getAuthManagerPluginImpl
retrieve a single auth manager plugin by name -
getAuthManagerPlugin
Retrieve a single auth manager instance -
getId
Retrieves id (name) of this subsystem. -
setId
Sets id string to this subsystem.Use with caution. Should not do it when sharing with others
- Overrides:
setId
in classSubsystem
- Parameters:
id
- name to be applied to an authentication sybsystem- Throws:
EBaseException
- failed to set id
-
startup
registers the administration servlet with the administration subsystem.- Overrides:
startup
in classSubsystem
- Throws:
EBaseException
- failed to start up
-
shutdown
public void shutdown()shuts down authentication managers one by one. -
getPlugins
Get a hashtable containing all authentication plugins.- Returns:
- all authentication plugins.
-
getInstances
Get a hashtable containing all authentication instances.- Returns:
- all authentication instances.
-
getConfigStore
Returns the root configuration storage of this system.- Overrides:
getConfigStore
in classSubsystem
- Returns:
- configuration store of this subsystem
-
getAuthManager
gets the named authentication manager- Parameters:
name
- of the authentication manager- Returns:
- the named authentication manager
-