Class AuthSubsystem
java.lang.Object
com.netscape.certsrv.base.Subsystem
com.netscape.cmscore.authentication.AuthSubsystem
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for certificate based authentication manager ID.static final StringConstant for certificate based authentication plugin ID.static final Stringstatic org.slf4j.Loggerprotected AuthenticationConfigstatic final StringConstant for null authentication manager ID.static final StringConstant for null authentication plugin ID.static final StringConstant for password based authentication manager ID.static final StringConstant for password based authentication plugin ID.static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String name, AuthManager authMgrInst) Add an authentication manager instance.authenticate(AuthCredentials authCred, String authMgrInstName) Authenticate to the named authentication manager instancevoidRemoves 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.voidinit(ConfigStore config) Initializes the authentication subsystem from the config store.voidvoidvoidSets id string to this subsystem.voidshutdown()shuts down authentication managers one by one.voidstartup()registers the administration servlet with the administration subsystem.Methods inherited from class 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
-
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
-
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:
EAuthMgrPluginNotFoundEBaseException
-
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
-
setId
Sets id string to this subsystem.Use with caution. Should not do it when sharing with others
- Overrides:
setIdin 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:
startupin classSubsystem- Throws:
EBaseException- failed to start up
-
shutdown
-
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:
getConfigStorein classSubsystem- Returns:
- configuration store of this subsystem
-
getAuthManager
gets the named authentication manager- Parameters:
name- of the authentication manager- Returns:
- the named authentication manager
-