public class PassthruAuthenticator extends CifsAuthenticator implements SessionListener
Authenticate users accessing the CIFS server by validating the user against a domain controller or other server on the network.
Modifier and Type | Field and Description |
---|---|
static int |
DefaultSessionTmo |
static int |
MaxCheckInterval |
static int |
MaxSessionTmo |
static int |
MinCheckInterval |
static int |
MinSessionTmo |
static long |
PassthruKeepAliveInterval |
GUEST_USERNAME, m_config, m_random
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 and Description |
---|
PassthruAuthenticator()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
authenticateShareConnect(ClientInfo client,
SharedDevice share,
java.lang.String sharePwd,
SrvSession sess)
Authenticate the connection to a particular share, called when the SMB server is in share
security mode
|
int |
authenticateUser(ClientInfo client,
SrvSession sess,
int alg)
Authenticate a session setup by a user
|
void |
closeAuthenticator()
Close the authenticator, perform cleanup
|
void |
generateNegotiateResponse(SMBSrvSession sess,
SMBSrvPacket respPkt,
boolean extendedSecurity)
Generate the CIFS negotiate response packet, the authenticator should add authentication
specific fields to the response.
|
AuthContext |
getAuthContext(SMBSrvSession sess)
Return an authentication context for the new session
|
int |
getServerCapabilities()
Return the server capability flags
|
void |
initialize(ServerConfiguration config,
org.springframework.extensions.config.ConfigElement params)
Initialzie the authenticator
|
void |
processSessionSetup(SMBSrvSession sess,
SMBSrvPacket reqPkt)
Process the CIFS session setup request packet and build the session setup response
|
void |
sessionClosed(SrvSession sess)
SMB server session closed notification
|
void |
sessionCreated(SrvSession sess)
SMB server session created notification
|
void |
sessionLoggedOn(SrvSession sess)
User successfully logged on notification
|
allowGuest, authenticateUserPlainText, convertPassword, doGuestLogon, generateEncryptedPassword, getAccessMode, getCIFSConfig, getEnabledDialects, getEncryptionKeyLength, getEncryptor, getGuestUserName, getsecurityConfig, getSecurityMode, getStatusAsString, getUserDetails, hasDebug, hasExtendedSecurity, hasSessionCleanup, initialize, mapClientAddressToDomain, mapUnknownUserToGuest, setAccessMode, setAllowGuest, setConfig, setCurrentUser, setDebug, setExtendedSecurity, setGuestUserName, setMapToGuest, setSecurityMode, setSessionCleanup, toString, validatePassword
public static final int DefaultSessionTmo
public static final int MinSessionTmo
public static final int MaxSessionTmo
public static final int MinCheckInterval
public static final int MaxCheckInterval
public static final long PassthruKeepAliveInterval
public PassthruAuthenticator()
Default to user mode security with encrypted password support.
public int authenticateShareConnect(ClientInfo client, SharedDevice share, java.lang.String sharePwd, SrvSession sess)
authenticateShareConnect
in interface ICifsAuthenticator
authenticateShareConnect
in class CifsAuthenticator
client
- ClientInfoshare
- SharedDevicesharePwd
- Stringsess
- SrvSessionpublic int authenticateUser(ClientInfo client, SrvSession sess, int alg)
authenticateUser
in interface ICifsAuthenticator
authenticateUser
in class CifsAuthenticator
client
- ClientInfosess
- SrvSessionalg
- intpublic AuthContext getAuthContext(SMBSrvSession sess)
getAuthContext
in class CifsAuthenticator
public void generateNegotiateResponse(SMBSrvSession sess, SMBSrvPacket respPkt, boolean extendedSecurity) throws AuthenticatorException
generateNegotiateResponse
in interface ICifsAuthenticator
generateNegotiateResponse
in class CifsAuthenticator
sess
- SMBSrvSessionrespPkt
- SMBSrvPacketextendedSecurity
- booleanAuthenticatorException
public void processSessionSetup(SMBSrvSession sess, SMBSrvPacket reqPkt) throws SMBSrvException
processSessionSetup
in interface ICifsAuthenticator
processSessionSetup
in class CifsAuthenticator
sess
- SMBSrvSessionreqPkt
- SMBSrvPacketSMBSrvException
public void initialize(ServerConfiguration config, org.springframework.extensions.config.ConfigElement params) throws InvalidConfigurationException
initialize
in class CifsAuthenticator
config
- ServerConfigurationparams
- ConfigElementInvalidConfigurationException
public int getServerCapabilities()
getServerCapabilities
in interface ICifsAuthenticator
getServerCapabilities
in class CifsAuthenticator
public void closeAuthenticator()
closeAuthenticator
in interface ICifsAuthenticator
closeAuthenticator
in class CifsAuthenticator
public void sessionClosed(SrvSession sess)
sessionClosed
in interface SessionListener
sess
- SrvSessionpublic void sessionCreated(SrvSession sess)
sessionCreated
in interface SessionListener
sess
- SrvSessionpublic void sessionLoggedOn(SrvSession sess)
sessionLoggedOn
in interface SessionListener
sess
- SrvSessionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.