From 1e092e9e993c784a80e2b043fc6d2a4b3b07a822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Galder=20Zamarren=CC=83o?= Date: Thu, 20 Apr 2017 14:44:37 +0200 Subject: [PATCH] Remote protostream cache workarounds * Remove protected cache security check. * Add remote query server dependency to the infinispan main module so that caches that use compatibility marshaller CompatibilityProtoStreamMarshaller can be defined --- .../infinispan/server/hotrod/CacheDecodeContext.java | 12 +++--------- .../layers/base/org/infinispan/main/module.xml | 6 ++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/hotrod/src/main/java/org/infinispan/server/hotrod/CacheDecodeContext.java b/server/hotrod/src/main/java/org/infinispan/server/hotrod/CacheDecodeContext.java index cea90d774c65..6c557db870d4 100644 --- a/server/hotrod/src/main/java/org/infinispan/server/hotrod/CacheDecodeContext.java +++ b/server/hotrod/src/main/java/org/infinispan/server/hotrod/CacheDecodeContext.java @@ -111,15 +111,9 @@ void obtainCache(EmbeddedCacheManager cacheManager, boolean loopback) throws Req String.format("Remote requests are not allowed to private caches. Do no send remote requests to cache '%s'", cacheName), header.version, header.messageId); } else if (icr.internalCacheHasFlag(cacheName, InternalCacheRegistry.Flag.PROTECTED)) { - if (!cacheManager.getCacheManagerConfiguration().security().authorization().enabled() && !loopback) { - throw new RequestParsingException( - String.format("Remote requests are allowed to protected caches only over loopback or if authorization is enabled. Do no send remote requests to cache '%s'", cacheName), - header.version, header.messageId); - } else { - // We want to make sure the cache access is checked everytime, so don't store it as a "known" cache. More - // expensive, but these caches should not be accessed frequently - cache = server.getCacheInstance(cacheName, cacheManager, true, false); - } + // We want to make sure the cache access is checked everytime, so don't store it as a "known" cache. More + // expensive, but these caches should not be accessed frequently + cache = server.getCacheInstance(cacheName, cacheManager, true, false); } else if (!cacheName.isEmpty() && !cacheManager.getCacheNames().contains(cacheName)) { throw new CacheNotFoundException( String.format("Cache with name '%s' not found amongst the configured caches", cacheName), diff --git a/server/integration/feature-pack/src/main/resources/modules/system/layers/base/org/infinispan/main/module.xml b/server/integration/feature-pack/src/main/resources/modules/system/layers/base/org/infinispan/main/module.xml index f14abceaea77..50c7c9f98365 100644 --- a/server/integration/feature-pack/src/main/resources/modules/system/layers/base/org/infinispan/main/module.xml +++ b/server/integration/feature-pack/src/main/resources/modules/system/layers/base/org/infinispan/main/module.xml @@ -11,6 +11,12 @@ + + +