mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
79033: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 78970: Merged DEV to V4.2-BUG-FIX (4.2.4) 78847: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured Fixed audit logging for failed logins. 78848: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured Fixed tests to highlight the issue. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82681 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -108,7 +108,7 @@ public class AuditComponentTest extends TestCase
|
||||
auditModelRegistry = (AuditModelRegistryImpl) ctx.getBean("auditModel.modelRegistry");
|
||||
//MNT-10807 : Auditing does not take into account audit.filter.alfresco-access.transaction.user
|
||||
UserAuditFilter userAuditFilter = new UserAuditFilter();
|
||||
userAuditFilter.setUserFilterPattern("System;.*");
|
||||
userAuditFilter.setUserFilterPattern("~System;~null;.*");
|
||||
userAuditFilter.afterPropertiesSet();
|
||||
auditComponent = (AuditComponent) ctx.getBean("auditComponent");
|
||||
auditComponent.setUserAuditFilter(userAuditFilter);
|
||||
@@ -647,6 +647,7 @@ public class AuditComponentTest extends TestCase
|
||||
{
|
||||
try
|
||||
{
|
||||
AuthenticationUtil.pushAuthentication();
|
||||
authenticationService.authenticate("banana", "****".toCharArray());
|
||||
fail("Invalid authentication attempt should fail");
|
||||
}
|
||||
@@ -654,6 +655,10 @@ public class AuditComponentTest extends TestCase
|
||||
{
|
||||
// Expected
|
||||
}
|
||||
finally
|
||||
{
|
||||
AuthenticationUtil.popAuthentication();
|
||||
}
|
||||
}
|
||||
|
||||
// ALF-3055 : auditing of failures is now asynchronous, so loop up to 60 times with
|
||||
@@ -811,7 +816,7 @@ public class AuditComponentTest extends TestCase
|
||||
*/
|
||||
public void testAuditSubordinateCall() throws Exception
|
||||
{
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
||||
AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
|
||||
|
||||
AuditQueryParameters params = new AuditQueryParameters();
|
||||
params.setForward(true);
|
||||
|
Reference in New Issue
Block a user