Redesign of the CIFS authentication code to support NTLMv1/NTLMv2, SPNEGO and NTLMSSP

authentication methods via the session setup.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2760 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-05-04 15:29:26 +00:00
parent fe5257a3a2
commit d021b46d07
29 changed files with 4719 additions and 2124 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
* Copyright (C) 2005-2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
@@ -23,6 +23,7 @@ import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.server.auth.AuthContext;
import org.alfresco.filesys.server.auth.ClientInfo;
import org.alfresco.filesys.server.core.SharedDevice;
import org.alfresco.filesys.server.core.SharedDeviceList;
@@ -60,10 +61,6 @@ public abstract class SrvSession
private ClientInfo m_clientInfo;
// Challenge key used for this session
private byte[] m_challenge;
// Debug flags for this session
private int m_debug;
@@ -85,6 +82,10 @@ public abstract class SrvSession
private Object m_authToken;
// Authentication context, used during the initial session setup phase
private AuthContext m_authContext;
// List of dynamic/temporary shares created for this session
private SharedDeviceList m_dynamicShares;
@@ -154,26 +155,6 @@ public abstract class SrvSession
return m_authToken != null ? true : false;
}
/**
* Return the session challenge key
*
* @return byte[]
*/
public final byte[] getChallengeKey()
{
return m_challenge;
}
/**
* Determine if the challenge key has been set for this session
*
* @return boolean
*/
public final boolean hasChallengeKey()
{
return m_challenge != null ? true : false;
}
/**
* Return the process id
*
@@ -231,6 +212,26 @@ public abstract class SrvSession
return m_clientInfo;
}
/**
* Check if the session has an authentication context
*
* @return boolean
*/
public final boolean hasAuthenticationContext()
{
return m_authContext != null ? true : false;
}
/**
* Return the authentication context for this sesion
*
* @return AuthContext
*/
public final AuthContext getAuthenticationContext()
{
return m_authContext;
}
/**
* Determine if the session has any dynamic shares
*
@@ -342,6 +343,16 @@ public abstract class SrvSession
m_authToken = authToken;
}
/**
* Set the authentication context, used during the initial session setup phase
*
* @param ctx AuthContext
*/
public final void setAuthenticationContext( AuthContext ctx)
{
m_authContext = ctx;
}
/**
* Set the client information
*
@@ -352,16 +363,6 @@ public abstract class SrvSession
m_clientInfo = client;
}
/**
* Set the session challenge key
*
* @param key byte[]
*/
public final void setChallengeKey(byte[] key)
{
m_challenge = key;
}
/**
* Set the debug output interface.
*