Bump ehcache 2.8.3 → 2.10.6 62/77262/1
authorStephen Kitt <skitt@redhat.com>
Wed, 24 Oct 2018 16:14:53 +0000 (18:14 +0200)
committerStephen Kitt <skitt@redhat.com>
Wed, 24 Oct 2018 16:14:53 +0000 (18:14 +0200)
Release notes:
https://jira.terracotta.org/jira/browse/EHC/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel

This fixes a number of security vulnerabilities (which might not
affect us anyway, but we might as well upgrade).

Change-Id: I3a5eadadf3541ab7b31822dae54fb9bfaa76ef88
Signed-off-by: Stephen Kitt <skitt@redhat.com>
aaa-cli/src/main/java/org/opendaylight/aaa/cli/SessionsManager.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/H2TokenStore.java
parent/pom.xml

index 94a6e027d151fe9976d4627ad76f8c1fc45af2e6..57d524520e0f2528eb3b47923d3334e1f830ff96 100644 (file)
@@ -13,6 +13,8 @@ import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
 import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.Configuration;
+import net.sf.ehcache.config.ConfigurationFactory;
 import org.opendaylight.aaa.api.model.User;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,8 +44,9 @@ public final class SessionsManager implements AutoCloseable {
         // When we restart, the cache manager and CLI cache are already there
         CacheManager cm = CacheManager.getCacheManager(CLI_CACHE_MANAGER);
         if (cm == null) {
+            Configuration configuration = ConfigurationFactory.parseConfiguration();
+            configuration.setName(CLI_CACHE_MANAGER);
             cm = CacheManager.newInstance();
-            cm.setName(CLI_CACHE_MANAGER);
         }
         Cache existingCache = cm.getCache(CLI_CACHE);
         if (existingCache != null) {
index 39b2cb92d4993404e02a9d8c5b96aa2b243c3850..e3866cbc8fe1a24f607438b3a0f0bc7ffa7c3d68 100644 (file)
@@ -11,6 +11,8 @@ import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
 import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.Configuration;
+import net.sf.ehcache.config.ConfigurationFactory;
 import org.opendaylight.aaa.api.Authentication;
 import org.opendaylight.aaa.api.TokenStore;
 import org.slf4j.Logger;
@@ -31,8 +33,9 @@ public class H2TokenStore implements AutoCloseable, TokenStore {
         // When we restart, the cache manager and token cache are already there
         CacheManager cm = CacheManager.getCacheManager(TOKEN_CACHE_MANAGER);
         if (cm == null) {
-            cm = CacheManager.newInstance();
-            cm.setName(TOKEN_CACHE_MANAGER);
+            Configuration configuration = ConfigurationFactory.parseConfiguration();
+            configuration.setName(TOKEN_CACHE_MANAGER);
+            cm = CacheManager.newInstance(configuration);
         }
         Cache existingCache = cm.getCache(TOKEN_CACHE);
         if (existingCache != null) {
index 393bd2abca5a159c82b66d55fb6ffa2acd3a0ea0..4987e1ec7ee6a5b3e81a3feefde98dcfb8dc516d 100644 (file)
@@ -51,7 +51,7 @@
       <dependency>
         <groupId>net.sf.ehcache</groupId>
         <artifactId>ehcache</artifactId>
-        <version>2.8.3</version>
+        <version>2.10.6</version>
       </dependency>
       <dependency>
         <groupId>org.apache.oltu.oauth2</groupId>