Merged V2.2 to HEAD

19977: (RECORD ONLY) Merged PATCHES/V2.2.7 to V2.2
      19778: (RECORD ONLY) Incremented version label
   19976: Merged PATCHES/V2.2.7 to V2.2
      19776: ALF-2011: Audit doesn't take into account CIFS authentication
         - Now that we've backported the ticket granting auditing, converted the Alfresco CIFS authenticators to use ticket-based authentication, rather than directly manipulating ACEGI
         - Needs thorough testing with password, NTLM, Passthru and Kerberos
      19891: ALF-2011: Audit doesn't take into account CIFS authentication
         Since each child of the CifsAuthenticator is not a Spring configured bean it has no Transaction interceptor. The Transaction wrapping functionality was added into the CifsAuthenticator.setCurrentUser() to fix a Transaction Synchronization issue after successful authentication of the user.
         Several little corrections added into the InMemoryTicketComponentImpl to allow "Null user". "Missing ticket for null" exceptions will be thrown instead of the NullPointerException
      19903: ALF-2011: Minor cleanup/formatting only
   19975: (RECORD ONLY) Merged PATCHES/V2.2.7 to V2.2
      19769: ALF-2011: Backported dependencies
         ALF-2360: Merged V3.1 to PATCHES/V2.2.7
            17314: ETHREEOH-3158: Fix RepoServerMgmt to work with external authentication methods
               - AuthenticationService.getCurrentTicket / getNewTicket now call pre authentication check before issuing a new ticket, thus still allowing ticket enforcement when external authentication is in use.
         ALF-2361: Merged V3.2 to PATCHES/V2.2.7
            17456: Fix for: ETHREEOH-1465: It's impossible to get the login history for a given user (Audit)
               - all authentication routes (SSO and password) can now audit getting a new ticket for a session. SSO does not authenticate via the alfresco AuthenticationService API
               - you can now use auditing to track new sessions for users.
   19834: (RECORD ONLY) Increment version (from 2.2.7 to 2.2.8)
   19833: (RECORD ONLY) Merged PATCHES/V2.2.7 to BRANCHES/V2.2:
      19832: Merged BRANCHES/V3.1 to PATCHES/V2.2.7:
           17255: Fixed ETHREEOH-3180: Error appears when trying to search resources on Manage Task page
   19578: (RECORD ONLY) Merged V3.0 to V2.2
      19574: Merged V3.1 to V3.0
         19573: Merged V3.2 to V3.1
            19539: Merged HEAD to V3.2
               19538: Build fix - fix build speed


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20011 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-04-27 14:14:48 +00:00
parent 7aba799ed8
commit a289049b41
10 changed files with 237 additions and 147 deletions

View File

@@ -21,8 +21,6 @@ package org.alfresco.filesys.auth.ftp;
import javax.transaction.Status;
import javax.transaction.UserTransaction;
import net.sf.acegisecurity.Authentication;
import org.alfresco.filesys.alfresco.AlfrescoClientInfo;
import org.alfresco.jlan.ftp.FTPSrvSession;
import org.alfresco.jlan.server.SrvSession;
@@ -178,12 +176,12 @@ public class AlfrescoFtpAuthenticator extends FTPAuthenticatorBase {
*/
protected void doGuestLogon( AlfrescoClientInfo client, SrvSession sess)
{
// Get a guest authentication token
// Get a guest authentication ticket
getAuthenticationService().authenticateAsGuest();
Authentication authToken = getAuthenticationComponent().getCurrentAuthentication();
String ticket = getAuthenticationService().getCurrentTicket();
client.setAuthenticationToken( authToken);
client.setAuthenticationTicket( ticket);
// Mark the client as being a guest logon

View File

@@ -24,9 +24,6 @@ import java.net.InetAddress;
import javax.transaction.Status;
import javax.transaction.UserTransaction;
import net.sf.acegisecurity.Authentication;
import org.springframework.extensions.config.ConfigElement;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.ExtendedServerConfigurationAccessor;
import org.alfresco.filesys.alfresco.AlfrescoClientInfo;
@@ -45,6 +42,7 @@ import org.alfresco.jlan.util.IPAddress;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.NTLMMode;
import org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator;
import org.springframework.extensions.config.ConfigElement;
/**
* Passthru FTP Authenticator Class
@@ -331,9 +329,9 @@ public class PassthruFtpAuthenticator extends FTPAuthenticatorBase {
// Get a guest authentication token
getAuthenticationService().authenticateAsGuest();
Authentication authToken = getAuthenticationComponent().getCurrentAuthentication();
String ticket = getAuthenticationService().getCurrentTicket();
client.setAuthenticationToken(authToken);
client.setAuthenticationTicket(ticket);
// Mark the client as being a guest logon
@@ -395,7 +393,8 @@ public class PassthruFtpAuthenticator extends FTPAuthenticatorBase {
// Set the current user to be authenticated, save the authentication token
AlfrescoClientInfo alfClient = (AlfrescoClientInfo) client;
alfClient.setAuthenticationToken(getAuthenticationComponent().setCurrentUser(client.getUserName()));
getAuthenticationComponent().setCurrentUser(client.getUserName());
alfClient.setAuthenticationTicket(getAuthenticationService().getCurrentTicket());
// Passwords match, grant access