mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-22 code enhance (#989)
* ACS-22: changed naming in ticket related cache components * ACS-22: dev release acs-22-1 * [maven-release-plugin][skip ci] prepare release alfresco-repository-acs-22-1 * [maven-release-plugin][skip ci] prepare for next development iteration * Revert "ACS-22: dev release acs-22-1" This reverts commit 4122bf56 * bump alfresco-data-model to 8.113 Co-authored-by: Travis CI User <build@alfresco.com>
This commit is contained in:
committed by
GitHub
parent
0d2ee98502
commit
cc9e78f152
2
pom.xml
2
pom.xml
@@ -36,7 +36,7 @@
|
||||
|
||||
<maven.build.sourceVersion>11</maven.build.sourceVersion>
|
||||
|
||||
<dependency.alfresco-data-model.version>8.112</dependency.alfresco-data-model.version>
|
||||
<dependency.alfresco-data-model.version>8.113</dependency.alfresco-data-model.version>
|
||||
<dependency.alfresco-core.version>8.33</dependency.alfresco-core.version>
|
||||
|
||||
<dependency.alfresco-legacy-lucene.version>6.2</dependency.alfresco-legacy-lucene.version>
|
||||
|
@@ -598,8 +598,8 @@
|
||||
<property name="ticketsCache">
|
||||
<ref bean="ticketsCache" />
|
||||
</property>
|
||||
<property name="usernameKey">
|
||||
<ref bean="usernameKeyCache" />
|
||||
<property name="usernameToTicketIdCache">
|
||||
<ref bean="usernameToTicketIdCache" />
|
||||
</property>
|
||||
<!-- The period for which tickets are valid in XML duration format. -->
|
||||
<!-- The default is PT1H for one hour. -->
|
||||
|
@@ -281,8 +281,8 @@
|
||||
<constructor-arg value="cache.ticketsCache"/>
|
||||
</bean>
|
||||
|
||||
<bean name="usernameKeyCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.usernameKeyCache"/>
|
||||
<bean name="usernameToTicketIdCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.usernameToTicketIdCache"/>
|
||||
</bean>
|
||||
|
||||
<!-- ===================================== -->
|
||||
|
@@ -333,14 +333,14 @@ 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.usernameToTicketIdCache.maxItems=1000
|
||||
cache.usernameToTicketIdCache.timeToLiveSeconds=0
|
||||
cache.usernameToTicketIdCache.maxIdleSeconds=0
|
||||
cache.usernameToTicketIdCache.cluster.type=fully-distributed
|
||||
cache.usernameToTicketIdCache.backup-count=1
|
||||
cache.usernameToTicketIdCache.eviction-policy=LRU
|
||||
cache.usernameToTicketIdCache.merge-policy=com.hazelcast.map.merge.PutIfAbsentMapMergePolicy
|
||||
cache.usernameToTicketIdCache.readBackupData=false
|
||||
|
||||
cache.authorityEntitySharedCache.tx.maxItems=50000
|
||||
cache.authorityEntitySharedCache.tx.statsEnabled=${caches.tx.statsEnabled}
|
||||
|
@@ -54,7 +54,6 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.admin.SysAdminParamsImpl;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.domain.dialect.Dialect;
|
||||
import org.alfresco.repo.domain.dialect.PostgreSQLDialect;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextManager;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
@@ -103,7 +102,7 @@ public class AuthenticationTest extends TestCase
|
||||
private AuthenticationManager authenticationManager;
|
||||
private TicketComponent ticketComponent;
|
||||
private SimpleCache<String, Ticket> ticketsCache;
|
||||
private SimpleCache<String, String> usernameKey;
|
||||
private SimpleCache<String, String> usernameToTicketIdCache;
|
||||
private MutableAuthenticationService authenticationService;
|
||||
private MutableAuthenticationService pubAuthenticationService;
|
||||
private AuthenticationComponent authenticationComponent;
|
||||
@@ -174,7 +173,7 @@ public class AuthenticationTest extends TestCase
|
||||
// permissionServiceSPI = (PermissionServiceSPI)
|
||||
// ctx.getBean("permissionService");
|
||||
ticketsCache = (SimpleCache<String, Ticket>) ctx.getBean("ticketsCache");
|
||||
usernameKey = (SimpleCache<String, String>) ctx.getBean("usernameKeyCache");
|
||||
usernameToTicketIdCache = (SimpleCache<String, String>) ctx.getBean("usernameToTicketIdCache");
|
||||
|
||||
ChildApplicationContextFactory sysAdminSubsystem = (ChildApplicationContextFactory) ctx.getBean("sysAdmin");
|
||||
assertNotNull("sysAdminSubsystem", sysAdminSubsystem);
|
||||
@@ -831,7 +830,7 @@ public class AuthenticationTest extends TestCase
|
||||
tc.setTicketsExpire(false);
|
||||
tc.setValidDuration("P0D");
|
||||
tc.setTicketsCache(ticketsCache);
|
||||
tc.setUsernameKey(usernameKey);
|
||||
tc.setUsernameToTicketIdCache(usernameToTicketIdCache);
|
||||
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
|
||||
@@ -858,7 +857,7 @@ public class AuthenticationTest extends TestCase
|
||||
tc.setTicketsExpire(false);
|
||||
tc.setValidDuration("P0D");
|
||||
tc.setTicketsCache(ticketsCache);
|
||||
tc.setUsernameKey(usernameKey);
|
||||
tc.setUsernameToTicketIdCache(usernameToTicketIdCache);
|
||||
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
|
||||
@@ -888,14 +887,14 @@ public class AuthenticationTest extends TestCase
|
||||
public void testTicketExpiryMode()
|
||||
{
|
||||
ticketsCache.clear();
|
||||
usernameKey.clear();
|
||||
usernameToTicketIdCache.clear();
|
||||
|
||||
InMemoryTicketComponentImpl tc = new InMemoryTicketComponentImpl();
|
||||
tc.setOneOff(false);
|
||||
tc.setTicketsExpire(true);
|
||||
tc.setValidDuration("P5S");
|
||||
tc.setTicketsCache(ticketsCache);
|
||||
tc.setUsernameKey(usernameKey);
|
||||
tc.setUsernameToTicketIdCache(usernameToTicketIdCache);
|
||||
tc.setExpiryMode(ExpiryMode.AFTER_FIXED_TIME.toString());
|
||||
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
@@ -1033,13 +1032,13 @@ public class AuthenticationTest extends TestCase
|
||||
public void testTicketExpires()
|
||||
{
|
||||
ticketsCache.clear();
|
||||
usernameKey.clear();
|
||||
usernameToTicketIdCache.clear();
|
||||
InMemoryTicketComponentImpl tc = new InMemoryTicketComponentImpl();
|
||||
tc.setOneOff(false);
|
||||
tc.setTicketsExpire(true);
|
||||
tc.setValidDuration("P5S");
|
||||
tc.setTicketsCache(ticketsCache);
|
||||
tc.setUsernameKey(usernameKey);
|
||||
tc.setUsernameToTicketIdCache(usernameToTicketIdCache);
|
||||
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
|
||||
@@ -1133,7 +1132,7 @@ public class AuthenticationTest extends TestCase
|
||||
tc.setTicketsExpire(true);
|
||||
tc.setValidDuration("P1D");
|
||||
tc.setTicketsCache(ticketsCache);
|
||||
tc.setUsernameKey(usernameKey);
|
||||
tc.setUsernameToTicketIdCache(usernameToTicketIdCache);
|
||||
|
||||
dao.createUser("Andy", "ticket".toCharArray());
|
||||
|
||||
|
Reference in New Issue
Block a user