Class NTLMAuthenticationComponentImpl
- java.lang.Object
-
- org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
-
- org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl
-
- All Implemented Interfaces:
AuthenticationComponent,AuthenticationContext,NLTMAuthenticator,org.springframework.beans.factory.InitializingBean
public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationComponent implements NLTMAuthenticator, org.springframework.beans.factory.InitializingBean
NTLM Authentication Component ClassProvides authentication using passthru to a Windows server(s)/domain controller(s) using the accounts defined on the passthru server to validate users.
- Author:
- GKSpencer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNTLMAuthorityAdministratorstatic java.lang.StringNTLMAuthorityGuest
-
Constructor Summary
Constructors Constructor Description NTLMAuthenticationComponentImpl()Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()booleanallowsGuest()Determine if guest logons are allowednet.sf.acegisecurity.Authenticationauthenticate(net.sf.acegisecurity.Authentication auth)Authenticate using a tokenprotected voidauthenticateImpl(java.lang.String userName, char[] password)Authenticatebooleanexists(java.lang.String userName)Check if the user existsjava.lang.StringgetMD4HashedPassword(java.lang.String userName)Get the MD4 password hash, as required by NTLM based authentication methods.NTLMModegetNTLMMode()Get the enum that describes NTLM integrationprotected booleanimplementationAllowsGuestLogin()voidsetAllowAuthUserAsGuest(java.lang.String auth)Allow authenticated users with no alfresco person record to logon with guest accessvoidsetDomain(java.lang.String domain)Set the domain to authenticate againstvoidsetGuestAccess(java.lang.String guest)Allow guest accessvoidsetJCEProvider(java.lang.String providerClass)Set the JCE providervoidsetNullDomainUseAnyServer(java.lang.String nullDomain)Allow null domain passthru logons to use the first available passthru servervoidsetPassthruServers(org.alfresco.jlan.server.auth.passthru.PassthruServers servers)Directly sets the passthru server list.voidsetProtocolOrder(java.lang.String protoOrder)Set the protocol order for passthru connectionsvoidsetServers(java.lang.String servers)Set the server(s) to authenticate againstvoidsetSessionTimeout(java.lang.String sessTmo)Set the authentication session timeout, in secondsvoidsetUseLocalServer(java.lang.String useLocal)Use the local server as the authentication server-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultAdministratorUserNames, getDefaultGuestUserNames, getGuestUserName, getGuestUserName, getNodeService, getNumberFailedAuthentications, getNumberSuccessfulAuthentications, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, onAuthenticate, onFail, setAllowGuestLogin, setAuthenticationContext, setCurrentAuthentication, setCurrentUser, setCurrentUser, setDefaultAdministratorUserNameList, setDefaultAdministratorUserNames, setDefaultGuestUserNameList, setDefaultGuestUserNames, setGuestUserAsCurrentUser, setNodeService, setPersonService, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setTransactionService, setUserDetails, setUserRegistrySynchronizer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
authenticate, getDefaultAdministratorUserNames, getDefaultGuestUserNames, guestUserAuthenticationAllowed, setCurrentUser, setCurrentUser, setGuestUserAsCurrentUser
-
Methods inherited from interface org.alfresco.repo.security.authentication.AuthenticationContext
clearCurrentSecurityContext, getCurrentAuthentication, getCurrentUserName, getGuestUserName, getGuestUserName, getSystemUserName, getSystemUserName, getUserDomain, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, setCurrentAuthentication, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setUserDetails
-
-
-
-
Field Detail
-
NTLMAuthorityGuest
public static final java.lang.String NTLMAuthorityGuest
- See Also:
- Constant Field Values
-
NTLMAuthorityAdministrator
public static final java.lang.String NTLMAuthorityAdministrator
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
allowsGuest
public final boolean allowsGuest()
Determine if guest logons are allowed- Returns:
- boolean
-
setPassthruServers
public void setPassthruServers(org.alfresco.jlan.server.auth.passthru.PassthruServers servers)
Directly sets the passthru server list.- Parameters:
servers- a passthru server list, usually created byPassthruServerFactory
-
setDomain
public void setDomain(java.lang.String domain)
Set the domain to authenticate against- Parameters:
domain- String
-
setServers
public void setServers(java.lang.String servers)
Set the server(s) to authenticate against- Parameters:
servers- String
-
setUseLocalServer
public void setUseLocalServer(java.lang.String useLocal)
Use the local server as the authentication server- Parameters:
useLocal- String
-
setGuestAccess
public void setGuestAccess(java.lang.String guest)
Allow guest access- Parameters:
guest- String
-
setAllowAuthUserAsGuest
public void setAllowAuthUserAsGuest(java.lang.String auth)
Allow authenticated users with no alfresco person record to logon with guest access- Parameters:
auth- String
-
setNullDomainUseAnyServer
public void setNullDomainUseAnyServer(java.lang.String nullDomain)
Allow null domain passthru logons to use the first available passthru server- Parameters:
nullDomain- String
-
setJCEProvider
public void setJCEProvider(java.lang.String providerClass)
Set the JCE provider- Parameters:
providerClass- String
-
setSessionTimeout
public void setSessionTimeout(java.lang.String sessTmo)
Set the authentication session timeout, in seconds- Parameters:
sessTmo- String
-
setProtocolOrder
public void setProtocolOrder(java.lang.String protoOrder)
Set the protocol order for passthru connections- Parameters:
protoOrder- String
-
authenticateImpl
protected void authenticateImpl(java.lang.String userName, char[] password) throws org.alfresco.repo.security.authentication.AuthenticationExceptionAuthenticate- Overrides:
authenticateImplin classAbstractAuthenticationComponent- Parameters:
userName- Stringpassword- char[]- Throws:
org.alfresco.repo.security.authentication.AuthenticationException
-
authenticate
public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication auth) throws org.alfresco.repo.security.authentication.AuthenticationExceptionAuthenticate using a token- Specified by:
authenticatein interfaceNLTMAuthenticator- Parameters:
auth- Authentication- Returns:
- Authentication
- Throws:
org.alfresco.repo.security.authentication.AuthenticationException
-
getNTLMMode
public NTLMMode getNTLMMode()
Get the enum that describes NTLM integration- Specified by:
getNTLMModein interfaceNLTMAuthenticator- Returns:
- NTLMMode
-
getMD4HashedPassword
public java.lang.String getMD4HashedPassword(java.lang.String userName)
Get the MD4 password hash, as required by NTLM based authentication methods.- Specified by:
getMD4HashedPasswordin interfaceNLTMAuthenticator- Parameters:
userName- String- Returns:
- String
-
exists
public boolean exists(java.lang.String userName)
Check if the user exists- Parameters:
userName- String- Returns:
- boolean
-
implementationAllowsGuestLogin
protected boolean implementationAllowsGuestLogin()
- Specified by:
implementationAllowsGuestLoginin classAbstractAuthenticationComponent
-
-