Package com.netscape.cms.authentication
Class UidPwdDirAuthentication
- java.lang.Object
-
- com.netscape.cms.authentication.DirBasedAuthentication
-
- com.netscape.cms.authentication.UidPwdDirAuthentication
-
- All Implemented Interfaces:
IExtendedPluginInfo
,ProfileAuthenticator
,AuthManager
public class UidPwdDirAuthentication extends DirBasedAuthentication implements ProfileAuthenticator
uid/pwd directory based authentication manager- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CRED_PWD
static java.lang.String
CRED_UID
static org.slf4j.Logger
logger
protected static java.lang.String[]
mConfigParams
protected static java.lang.String[]
mRequiredCreds
-
Fields inherited from class com.netscape.cms.authentication.DirBasedAuthentication
DEFAULT_DNPATTERN, mBaseDN, mBoundConnEnable, mConfig, mConnFactory, mExtendedPluginInfo, mGroupObjectClass, mGroups, mGroupsBaseDN, mGroupsEnable, mGroupUserIDName, mImplName, mLdapAttrs, mLdapByteAttrs, mLdapConfig, mLdapStringAttrs, mName, mPattern, mSearchGroupUserByUserdn, mTag, mUserIDName, PROP_DNPATTERN, PROP_GROUP_OBJECT_CLASS, PROP_GROUP_USERID_NAME, PROP_GROUPS, PROP_GROUPS_BASEDN, PROP_GROUPS_ENABLE, PROP_LDAP_BOUND_CONN, PROP_LDAPBYTEATTRS, PROP_LDAPSTRINGATTRS, PROP_SEARCH_GROUP_USER_BY_USERDN, PROP_USERID_NAME, USER_DN
-
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
-
Fields inherited from interface com.netscape.cms.profile.ProfileAuthenticator
AUTHENTICATED_NAME
-
-
Constructor Summary
Constructors Constructor Description UidPwdDirAuthentication()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
authenticate(netscape.ldap.LDAPConnection conn, com.netscape.certsrv.authentication.IAuthCredentials authCreds, AuthToken token)
Authenticates a user based on uid, pwd in the directory.java.lang.String[]
getConfigParams()
Returns a list of configuration parameter names.java.lang.String
getName(java.util.Locale locale)
Retrieves the localizable name of this policy.java.lang.String[]
getRequiredCreds()
Returns array of required credentials for this authentication manager.java.lang.String
getText(java.util.Locale locale)
Retrieves the localizable description of this policy.com.netscape.certsrv.property.IDescriptor
getValueDescriptor(java.util.Locale locale, java.lang.String name)
Retrieves the descriptor of the given value parameter by name.java.util.Enumeration<java.lang.String>
getValueNames()
Retrieves a list of names of the value parameter.void
init(Profile profile, IConfigStore config)
Initializes this default policy.boolean
isSSLClientRequired()
Checks if this authenticator requires SSL client authentication.boolean
isValueWriteable(java.lang.String name)
Checks if the value of the given property should be serializable into the request.void
populate(com.netscape.certsrv.authentication.IAuthToken token, com.netscape.certsrv.request.IRequest request)
Populates authentication specific information into the request for auditing purposes.-
Methods inherited from class com.netscape.cms.authentication.DirBasedAuthentication
authenticate, formCertInfo, formSubjectName, getConfigStore, getExtendedPluginInfo, getImplName, getLdapAttrs, getLdapByteAttrs, getName, init, init, setAuthTokenByteValue, setAuthTokenStringValue, setAuthTokenValues, shutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dogtagpki.server.authentication.AuthManager
authenticate, getImplName, getName, init, shutdown
-
Methods inherited from interface com.netscape.cms.profile.ProfileAuthenticator
getConfigStore
-
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
CRED_UID
public static final java.lang.String CRED_UID
- See Also:
- Constant Field Values
-
CRED_PWD
public static final java.lang.String CRED_PWD
- See Also:
- Constant Field Values
-
mRequiredCreds
protected static java.lang.String[] mRequiredCreds
-
mConfigParams
protected static java.lang.String[] mConfigParams
-
-
Method Detail
-
authenticate
protected java.lang.String authenticate(netscape.ldap.LDAPConnection conn, com.netscape.certsrv.authentication.IAuthCredentials authCreds, AuthToken token) throws EBaseException
Authenticates a user based on uid, pwd in the directory.- Specified by:
authenticate
in classDirBasedAuthentication
- Parameters:
authCreds
- The authentication credentials.- Returns:
- The user's ldap entry dn.
- Throws:
com.netscape.certsrv.authentication.EInvalidCredentials
- If the uid and password are not validEBaseException
- If an internal error occurs.
-
getConfigParams
public java.lang.String[] 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
- Specified by:
getConfigParams
in classDirBasedAuthentication
- Returns:
- String array of configuration parameter names.
-
getRequiredCreds
public java.lang.String[] getRequiredCreds()
Returns array of required credentials for this authentication manager.- Specified by:
getRequiredCreds
in interfaceAuthManager
- Specified by:
getRequiredCreds
in classDirBasedAuthentication
- Returns:
- Array of required credentials.
-
init
public void init(Profile profile, IConfigStore config) throws com.netscape.certsrv.profile.EProfileException
Description copied from interface:ProfileAuthenticator
Initializes this default policy.- Specified by:
init
in interfaceProfileAuthenticator
- Parameters:
profile
- owner of this authenticatorconfig
- configuration store- Throws:
com.netscape.certsrv.profile.EProfileException
- failed to initialize
-
getName
public java.lang.String getName(java.util.Locale locale)
Retrieves the localizable name of this policy.- Specified by:
getName
in interfaceProfileAuthenticator
- Parameters:
locale
- end user locale- Returns:
- localized authenticator name
-
getText
public java.lang.String getText(java.util.Locale locale)
Retrieves the localizable description of this policy.- Specified by:
getText
in interfaceProfileAuthenticator
- Parameters:
locale
- end user locale- Returns:
- localized authenticator description
-
getValueNames
public java.util.Enumeration<java.lang.String> getValueNames()
Retrieves a list of names of the value parameter.- Specified by:
getValueNames
in interfaceProfileAuthenticator
- Returns:
- a list of property names
-
isValueWriteable
public boolean isValueWriteable(java.lang.String name)
Description copied from interface:ProfileAuthenticator
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 interfaceProfileAuthenticator
- Parameters:
name
- property name- Returns:
- true if the property is not security related
-
getValueDescriptor
public com.netscape.certsrv.property.IDescriptor getValueDescriptor(java.util.Locale locale, java.lang.String name)
Retrieves the descriptor of the given value parameter by name.- Specified by:
getValueDescriptor
in interfaceProfileAuthenticator
- Parameters:
locale
- user localename
- property name- Returns:
- descriptor of the requested property
-
populate
public void populate(com.netscape.certsrv.authentication.IAuthToken token, com.netscape.certsrv.request.IRequest request) throws com.netscape.certsrv.profile.EProfileException
Description copied from interface:ProfileAuthenticator
Populates authentication specific information into the request for auditing purposes.- Specified by:
populate
in interfaceProfileAuthenticator
- Parameters:
token
- authentication tokenrequest
- request- Throws:
com.netscape.certsrv.profile.EProfileException
- failed to populate
-
isSSLClientRequired
public boolean isSSLClientRequired()
Description copied from interface:ProfileAuthenticator
Checks if this authenticator requires SSL client authentication.- Specified by:
isSSLClientRequired
in interfaceProfileAuthenticator
- Returns:
- client authentication required or not
-
-