org.alfresco.repo.security.authentication.ntlm
Class NTLMAuthenticationComponentImpl

java.lang.Object
  extended by org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
      extended by 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 Class

Provides authentication using passthru to a Windows server(s)/domain controller(s) using the accounts defined on the passthru server to validate users.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
 
Field Summary
static java.lang.String NTLMAuthorityAdministrator
           
static java.lang.String NTLMAuthorityGuest
           
 
Constructor Summary
NTLMAuthenticationComponentImpl()
          Class constructor
 
Method Summary
 void afterPropertiesSet()
           
 boolean allowsGuest()
          Determine if guest logons are allowed
 net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication auth)
          Authenticate using a token
protected  void authenticateImpl(java.lang.String userName, char[] password)
          Authenticate
 boolean exists(java.lang.String userName)
          Check if the user exists
 java.lang.String getMD4HashedPassword(java.lang.String userName)
          Get the MD4 password hash, as required by NTLM based authentication methods.
 NTLMMode getNTLMMode()
          Get the enum that describes NTLM integration
protected  boolean implementationAllowsGuestLogin()
           
 void setAllowAuthUserAsGuest(java.lang.String auth)
          Allow authenticated users with no alfresco person record to logon with guest access
 void setDomain(java.lang.String domain)
          Set the domain to authenticate against
 void setGuestAccess(java.lang.String guest)
          Allow guest access
 void setJCEProvider(java.lang.String providerClass)
          Set the JCE provider
 void setNullDomainUseAnyServer(java.lang.String nullDomain)
          Allow null domain passthru logons to use the first available passthru server
 void setPassthruServers(org.alfresco.jlan.server.auth.passthru.PassthruServers servers)
          Directly sets the passthru server list.
 void setProtocolOrder(java.lang.String protoOrder)
          Set the protocol order for passthru connections
 void setServers(java.lang.String servers)
          Set the server(s) to authenticate against
 void setSessionTimeout(java.lang.String sessTmo)
          Set the authentication session timeout, in seconds
 void setUseLocalServer(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, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, 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
Constructor Detail

NTLMAuthenticationComponentImpl

public NTLMAuthenticationComponentImpl()
Class constructor

Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.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 by PassthruServerFactory

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.AuthenticationException
Authenticate

Overrides:
authenticateImpl in class AbstractAuthenticationComponent
Parameters:
userName - String
password - 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.AuthenticationException
Authenticate using a token

Specified by:
authenticate in interface NLTMAuthenticator
Parameters:
token - Authentication
Returns:
Authentication
Throws:
org.alfresco.repo.security.authentication.AuthenticationException

getNTLMMode

public NTLMMode getNTLMMode()
Get the enum that describes NTLM integration

Specified by:
getNTLMMode in interface NLTMAuthenticator
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:
getMD4HashedPassword in interface NLTMAuthenticator
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:
implementationAllowsGuestLogin in class AbstractAuthenticationComponent


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.