Package org.alfresco.filesys.auth.cifs
Class PassthruCifsAuthenticator
- java.lang.Object
-
- org.alfresco.jlan.server.auth.CifsAuthenticator
-
- org.alfresco.filesys.auth.cifs.CifsAuthenticatorBase
-
- org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator
-
- All Implemented Interfaces:
org.alfresco.jlan.server.auth.ICifsAuthenticator,org.alfresco.jlan.server.SessionListener,ActivateableBean,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class PassthruCifsAuthenticator extends CifsAuthenticatorBase implements org.alfresco.jlan.server.SessionListener
Passthru Authenticator ClassAuthenticate users accessing the CIFS server by validating the user against a domain controller or other server on the network.
- Author:
- GKSpencer
-
-
Field Summary
Fields Modifier and Type Field Description static intDefaultSessionTmostatic intMaxCheckIntervalstatic intMaxSessionTmostatic intMinCheckIntervalstatic intMinSessionTmostatic longPassthruKeepAliveInterval-
Fields inherited from class org.alfresco.filesys.auth.cifs.CifsAuthenticatorBase
m_md4Encoder
-
Fields inherited from class org.alfresco.jlan.server.auth.CifsAuthenticator
GUEST_USERNAME, m_config, m_random
-
Fields inherited from interface org.alfresco.jlan.server.auth.ICifsAuthenticator
AUTH_ACCDISABLED, AUTH_ALLOW, AUTH_BADPASSWORD, AUTH_BADUSER, AUTH_DISALLOW, AUTH_GUEST, AUTH_PASSEXPIRED, LANMAN, NoAccess, NTLM1, NTLM2, ReadOnly, SHARE_MODE, STANDARD_CHALLENGE_LEN, STANDARD_PASSWORD_LEN, USER_MODE, Writeable
-
-
Constructor Summary
Constructors Constructor Description PassthruCifsAuthenticator()Passthru Authenticator Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intauthenticateShareConnect(org.alfresco.jlan.server.auth.ClientInfo client, org.alfresco.jlan.server.core.SharedDevice share, String sharePwd, org.alfresco.jlan.server.SrvSession sess)Authenticate the connection to a particular share, called when the SMB server is in share security modeintauthenticateUser(org.alfresco.jlan.server.auth.ClientInfo client, org.alfresco.jlan.server.SrvSession sess, int alg)Authenticate a session setup by a uservoidcloseAuthenticator()Close the authenticator, perform cleanupvoidgenerateNegotiateResponse(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket respPkt, boolean extendedSecurity)Generate the CIFS negotiate response packet, the authenticator should add authentication specific fields to the response.org.alfresco.jlan.server.auth.AuthContextgetAuthContext(org.alfresco.jlan.smb.server.SMBSrvSession sess)Return an authentication context for the new sessionintgetServerCapabilities()Return the server capability flagsHashtable<String,org.alfresco.jlan.server.auth.passthru.PassthruDetails>getSessions()voidinitialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)Initialize the authenticator via the config servicevoidprocessAlfrescoSessionSetup(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket reqPkt)Process the CIFS session setup request packet and build the session setup responsevoidprocessSessionSetup(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket reqPkt)Process the CIFS session setup request packet and build the session setup response.voidsessionClosed(org.alfresco.jlan.server.SrvSession sess)SMB server session closed notificationvoidsessionCreated(org.alfresco.jlan.server.SrvSession sess)SMB server session created notificationvoidsessionLoggedOn(org.alfresco.jlan.server.SrvSession sess)User successfully logged on notificationvoidsetPassthruServers(org.alfresco.jlan.server.auth.passthru.PassthruServers servers)protected booleanvalidateAuthenticationMode()Validate that the authentication component supports the required mode.-
Methods inherited from class org.alfresco.filesys.auth.cifs.CifsAuthenticatorBase
afterPropertiesSet, checkForAdminUserName, destroy, doGuestLogon, doInTransaction, getAuthenticationComponent, getAuthenticationService, getAuthorityService, getHomeFolderForUser, getNodeService, getNTLMAuthenticator, getPersonService, initialize, isActive, mapUserNameToPerson, setActive, setAuthenticationComponent, setAuthenticationService, setAuthorityService, setCurrentUser, setDiskInterface, setNodeService, setPersonService, setTransactionService
-
Methods inherited from class org.alfresco.jlan.server.auth.CifsAuthenticator
allowGuest, authenticateUserPlainText, convertPassword, generateEncryptedPassword, getAccessMode, getCIFSConfig, getEnabledDialects, getEncryptionKeyLength, getEncryptor, getGuestUserName, getsecurityConfig, getSecurityMode, getStatusAsString, getUserDetails, hasDebug, hasExtendedSecurity, hasSessionCleanup, mapClientAddressToDomain, mapUnknownUserToGuest, setAccessMode, setAllowGuest, setConfig, setDebug, setExtendedSecurity, setGuestUserName, setMapToGuest, setSecurityMode, setSessionCleanup, toString, validatePassword
-
-
-
-
Field Detail
-
DefaultSessionTmo
public static final int DefaultSessionTmo
- See Also:
- Constant Field Values
-
MinSessionTmo
public static final int MinSessionTmo
- See Also:
- Constant Field Values
-
MaxSessionTmo
public static final int MaxSessionTmo
- See Also:
- Constant Field Values
-
MinCheckInterval
public static final int MinCheckInterval
- See Also:
- Constant Field Values
-
MaxCheckInterval
public static final int MaxCheckInterval
- See Also:
- Constant Field Values
-
PassthruKeepAliveInterval
public static final long PassthruKeepAliveInterval
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSessions
public Hashtable<String,org.alfresco.jlan.server.auth.passthru.PassthruDetails> getSessions()
-
setPassthruServers
public void setPassthruServers(org.alfresco.jlan.server.auth.passthru.PassthruServers servers)
-
authenticateShareConnect
public int authenticateShareConnect(org.alfresco.jlan.server.auth.ClientInfo client, org.alfresco.jlan.server.core.SharedDevice share, String sharePwd, org.alfresco.jlan.server.SrvSession sess)Authenticate the connection to a particular share, called when the SMB server is in share security mode- Specified by:
authenticateShareConnectin interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
authenticateShareConnectin classorg.alfresco.jlan.server.auth.CifsAuthenticator- Parameters:
client- ClientInfoshare- SharedDevicesharePwd- Stringsess- SrvSession- Returns:
- int
-
authenticateUser
public int authenticateUser(org.alfresco.jlan.server.auth.ClientInfo client, org.alfresco.jlan.server.SrvSession sess, int alg)Authenticate a session setup by a user- Specified by:
authenticateUserin interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
authenticateUserin classorg.alfresco.jlan.server.auth.CifsAuthenticator- Parameters:
client- ClientInfosess- SrvSessionalg- int- Returns:
- int
-
getAuthContext
public org.alfresco.jlan.server.auth.AuthContext getAuthContext(org.alfresco.jlan.smb.server.SMBSrvSession sess)
Return an authentication context for the new session- Overrides:
getAuthContextin classorg.alfresco.jlan.server.auth.CifsAuthenticator- Returns:
- AuthContext
-
generateNegotiateResponse
public void generateNegotiateResponse(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket respPkt, boolean extendedSecurity) throws org.alfresco.jlan.server.auth.AuthenticatorExceptionGenerate the CIFS negotiate response packet, the authenticator should add authentication specific fields to the response.- Specified by:
generateNegotiateResponsein interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
generateNegotiateResponsein classorg.alfresco.jlan.server.auth.CifsAuthenticator- Parameters:
sess- SMBSrvSessionrespPkt- SMBSrvPacketextendedSecurity- boolean- Throws:
org.alfresco.jlan.server.auth.AuthenticatorException
-
processSessionSetup
public void processSessionSetup(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket reqPkt) throws org.alfresco.jlan.smb.server.SMBSrvExceptionProcess the CIFS session setup request packet and build the session setup response.This is the boundary between alfresco and JLAN. So is responsible for logging and ensuring that the exceptions are correct for JLAN.
- Specified by:
processSessionSetupin interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
processSessionSetupin classorg.alfresco.jlan.server.auth.CifsAuthenticator- Parameters:
sess- SMBSrvSessionreqPkt- SMBSrvPacket- Throws:
org.alfresco.jlan.smb.server.SMBSrvException
-
processAlfrescoSessionSetup
public void processAlfrescoSessionSetup(org.alfresco.jlan.smb.server.SMBSrvSession sess, org.alfresco.jlan.smb.server.SMBSrvPacket reqPkt) throws org.alfresco.jlan.smb.server.SMBSrvExceptionProcess the CIFS session setup request packet and build the session setup response- Parameters:
sess- SMBSrvSessionreqPkt- SMBSrvPacket- Throws:
org.alfresco.jlan.smb.server.SMBSrvException
-
validateAuthenticationMode
protected boolean validateAuthenticationMode()
Description copied from class:CifsAuthenticatorBaseValidate that the authentication component supports the required mode.- Overrides:
validateAuthenticationModein classCifsAuthenticatorBase- Returns:
- boolean
-
initialize
public void initialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params) throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionInitialize the authenticator via the config service- Overrides:
initializein classCifsAuthenticatorBase- Parameters:
config- ServerConfigurationparams- ConfigElement- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
getServerCapabilities
public int getServerCapabilities()
Return the server capability flags- Specified by:
getServerCapabilitiesin interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
getServerCapabilitiesin classorg.alfresco.jlan.server.auth.CifsAuthenticator- Returns:
- int
-
closeAuthenticator
public void closeAuthenticator()
Close the authenticator, perform cleanup- Specified by:
closeAuthenticatorin interfaceorg.alfresco.jlan.server.auth.ICifsAuthenticator- Overrides:
closeAuthenticatorin classorg.alfresco.jlan.server.auth.CifsAuthenticator
-
sessionClosed
public void sessionClosed(org.alfresco.jlan.server.SrvSession sess)
SMB server session closed notification- Specified by:
sessionClosedin interfaceorg.alfresco.jlan.server.SessionListener- Parameters:
sess- SrvSession
-
sessionCreated
public void sessionCreated(org.alfresco.jlan.server.SrvSession sess)
SMB server session created notification- Specified by:
sessionCreatedin interfaceorg.alfresco.jlan.server.SessionListener- Parameters:
sess- SrvSession
-
sessionLoggedOn
public void sessionLoggedOn(org.alfresco.jlan.server.SrvSession sess)
User successfully logged on notification- Specified by:
sessionLoggedOnin interfaceorg.alfresco.jlan.server.SessionListener- Parameters:
sess- SrvSession
-
-