public interface ICifsAuthenticator
An authenticator is used by the CIFS server to authenticate users when in user level access mode and authenticate requests to connect to a share when in share level access.
Modifier and Type | Field and Description |
---|---|
static int |
AUTH_ACCDISABLED |
static int |
AUTH_ALLOW |
static int |
AUTH_BADPASSWORD |
static int |
AUTH_BADUSER |
static int |
AUTH_DISALLOW |
static int |
AUTH_GUEST |
static int |
AUTH_PASSEXPIRED |
static int |
LANMAN |
static int |
NoAccess |
static int |
NTLM1 |
static int |
NTLM2 |
static int |
ReadOnly |
static int |
SHARE_MODE |
static int |
STANDARD_CHALLENGE_LEN |
static int |
STANDARD_PASSWORD_LEN |
static int |
USER_MODE |
static int |
Writeable |
Modifier and Type | Method and Description |
---|---|
int |
authenticateShareConnect(ClientInfo client,
SharedDevice share,
String sharePwd,
SrvSession sess)
Authenticate a connection to a share.
|
int |
authenticateUser(ClientInfo client,
SrvSession sess,
int alg)
Authenticate a user.
|
void |
closeAuthenticator()
Close the authenticator, perform any 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.
|
int |
getAccessMode()
Return the access mode of the server, either SHARE_MODE or USER_MODE.
|
int |
getEncryptionKeyLength()
Return the encryption key/challenge length
|
int |
getSecurityMode()
Return the security mode flags
|
int |
getServerCapabilities()
Return the server capability flags
|
boolean |
hasExtendedSecurity()
Determine if extended security methods are available
|
void |
processSessionSetup(SMBSrvSession sess,
SMBSrvPacket reqPkt)
Process the CIFS session setup request packet and build the session setup response
|
void |
setCurrentUser(ClientInfo client)
Set the current authenticated user context for this thread
|
static final int SHARE_MODE
static final int USER_MODE
static final int LANMAN
static final int NTLM1
static final int NTLM2
static final int AUTH_ALLOW
static final int AUTH_GUEST
static final int AUTH_DISALLOW
static final int AUTH_BADPASSWORD
static final int AUTH_BADUSER
static final int AUTH_PASSEXPIRED
static final int AUTH_ACCDISABLED
static final int NoAccess
static final int ReadOnly
static final int Writeable
static final int STANDARD_PASSWORD_LEN
static final int STANDARD_CHALLENGE_LEN
int authenticateShareConnect(ClientInfo client, SharedDevice share, String sharePwd, SrvSession sess)
client
- User/client details from the tree connect request.share
- Shared device the client wants to connect to.sharePwd
- Share password.sess
- Server session.int authenticateUser(ClientInfo client, SrvSession sess, int alg)
client
- User/client details from the session setup request.sess
- Server sessionalg
- Encryption algorithmint getAccessMode()
boolean hasExtendedSecurity()
int getSecurityMode()
void generateNegotiateResponse(SMBSrvSession sess, SMBSrvPacket respPkt, boolean extendedSecurity) throws AuthenticatorException
sess
- SMBSrvSessionrespPkt
- SMBSrvPacketextendedSecurity
- booleanAuthenticatorException
void processSessionSetup(SMBSrvSession sess, SMBSrvPacket reqPkt) throws SMBSrvException
sess
- SMBSrvSessionreqPkt
- SMBSrvPacketSMBSrvException
int getEncryptionKeyLength()
int getServerCapabilities()
void closeAuthenticator()
void setCurrentUser(ClientInfo client)
client
- ClientInfoCopyright © 2005–2017 Alfresco Software. All rights reserved.