diff --git a/pom.xml b/pom.xml
index 8335d551c6..98421083dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
11
- 8.50.10
+ 8.50.11
7.31
6.2
diff --git a/src/main/resources/alfresco/authentication-services-context.xml b/src/main/resources/alfresco/authentication-services-context.xml
index 6e39b09fe5..6aeaa86987 100644
--- a/src/main/resources/alfresco/authentication-services-context.xml
+++ b/src/main/resources/alfresco/authentication-services-context.xml
@@ -598,6 +598,9 @@
+
+
+
diff --git a/src/main/resources/alfresco/cache-context.xml b/src/main/resources/alfresco/cache-context.xml
index cea342ff55..091fb721c4 100644
--- a/src/main/resources/alfresco/cache-context.xml
+++ b/src/main/resources/alfresco/cache-context.xml
@@ -280,6 +280,10 @@
+
+
+
+
diff --git a/src/main/resources/alfresco/caches.properties b/src/main/resources/alfresco/caches.properties
index 6d4a682776..0b68415ccc 100644
--- a/src/main/resources/alfresco/caches.properties
+++ b/src/main/resources/alfresco/caches.properties
@@ -333,6 +333,15 @@ cache.ticketsCache.eviction-policy=LRU
cache.ticketsCache.merge-policy=com.hazelcast.map.merge.PutIfAbsentMapMergePolicy
cache.ticketsCache.readBackupData=false
+cache.usernameKeyCache.maxItems=1000
+cache.usernameKeyCache.timeToLiveSeconds=0
+cache.usernameKeyCache.maxIdleSeconds=0
+cache.usernameKeyCache.cluster.type=fully-distributed
+cache.usernameKeyCache.backup-count=1
+cache.usernameKeyCache.eviction-policy=LRU
+cache.usernameKeyCache.merge-policy=com.hazelcast.map.merge.PutIfAbsentMapMergePolicy
+cache.usernameKeyCache.readBackupData=false
+
cache.authorityEntitySharedCache.tx.maxItems=50000
cache.authorityEntitySharedCache.tx.statsEnabled=${caches.tx.statsEnabled}
diff --git a/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java b/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
index d082dbf09b..0125ddcd54 100644
--- a/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
+++ b/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java
@@ -103,6 +103,7 @@ public class AuthenticationTest extends TestCase
private AuthenticationManager authenticationManager;
private TicketComponent ticketComponent;
private SimpleCache ticketsCache;
+ private SimpleCache usernameKey;
private MutableAuthenticationService authenticationService;
private MutableAuthenticationService pubAuthenticationService;
private AuthenticationComponent authenticationComponent;
@@ -173,6 +174,7 @@ public class AuthenticationTest extends TestCase
// permissionServiceSPI = (PermissionServiceSPI)
// ctx.getBean("permissionService");
ticketsCache = (SimpleCache) ctx.getBean("ticketsCache");
+ usernameKey = (SimpleCache) ctx.getBean("usernameKeyCache");
ChildApplicationContextFactory sysAdminSubsystem = (ChildApplicationContextFactory) ctx.getBean("sysAdmin");
assertNotNull("sysAdminSubsystem", sysAdminSubsystem);
@@ -845,6 +847,7 @@ public class AuthenticationTest extends TestCase
tc.setTicketsExpire(false);
tc.setValidDuration("P0D");
tc.setTicketsCache(ticketsCache);
+ tc.setUsernameKey(usernameKey);
dao.createUser("Andy", "ticket".toCharArray());
@@ -871,6 +874,7 @@ public class AuthenticationTest extends TestCase
tc.setTicketsExpire(false);
tc.setValidDuration("P0D");
tc.setTicketsCache(ticketsCache);
+ tc.setUsernameKey(usernameKey);
dao.createUser("Andy", "ticket".toCharArray());
@@ -900,12 +904,14 @@ public class AuthenticationTest extends TestCase
public void testTicketExpiryMode()
{
ticketsCache.clear();
+ usernameKey.clear();
InMemoryTicketComponentImpl tc = new InMemoryTicketComponentImpl();
tc.setOneOff(false);
tc.setTicketsExpire(true);
tc.setValidDuration("P5S");
tc.setTicketsCache(ticketsCache);
+ tc.setUsernameKey(usernameKey);
tc.setExpiryMode(ExpiryMode.AFTER_FIXED_TIME.toString());
dao.createUser("Andy", "ticket".toCharArray());
@@ -1043,11 +1049,13 @@ public class AuthenticationTest extends TestCase
public void testTicketExpires()
{
ticketsCache.clear();
+ usernameKey.clear();
InMemoryTicketComponentImpl tc = new InMemoryTicketComponentImpl();
tc.setOneOff(false);
tc.setTicketsExpire(true);
tc.setValidDuration("P5S");
tc.setTicketsCache(ticketsCache);
+ tc.setUsernameKey(usernameKey);
dao.createUser("Andy", "ticket".toCharArray());
@@ -1141,6 +1149,7 @@ public class AuthenticationTest extends TestCase
tc.setTicketsExpire(true);
tc.setValidDuration("P1D");
tc.setTicketsCache(ticketsCache);
+ tc.setUsernameKey(usernameKey);
dao.createUser("Andy", "ticket".toCharArray());