Skip to content
Permalink
Browse files

ISPN-7781 Add java deserial white list for client

* Added new option to Hot Rod client that enables a list of regular
  expressions to be plugged that define classes that can be deserialized
  using standard Java serialization.
  • Loading branch information...
galderz authored and wburns committed May 3, 2017
1 parent 5324a7c commit f2989a9b7b5ef2d3be690250d9d1bc7b2fa045d7
Showing with 357 additions and 223 deletions.
  1. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
  2. +5 −0 ...t/src/main/java/org/infinispan/client/hotrod/configuration/AbstractConfigurationChildBuilder.java
  3. +10 −1 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/Configuration.java
  4. +19 −1 .../hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/ConfigurationBuilder.java
  5. +7 −0 ...od-client/src/main/java/org/infinispan/client/hotrod/configuration/ConfigurationChildBuilder.java
  6. +6 −4 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/event/ClientListenerNotifier.java
  7. +1 −0 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java
  8. +2 −1 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/iteration/KeyTracker.java
  9. +2 −1 ...otrod-client/src/main/java/org/infinispan/client/hotrod/impl/iteration/NoOpSegmentKeyTracker.java
  10. +2 −1 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/iteration/ReplKeyTracker.java
  11. +3 −2 ...nt/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/iteration/SegmentKeyTracker.java
  12. +4 −4 ...otrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/AbstractKeyOperation.java
  13. +3 −3 ...-client/src/main/java/org/infinispan/client/hotrod/impl/operations/AbstractKeyValueOperation.java
  14. +4 −4 ...client/src/main/java/org/infinispan/client/hotrod/impl/operations/AddClientListenerOperation.java
  15. +3 −3 ...trod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/AuthMechListOperation.java
  16. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/AuthOperation.java
  17. +4 −4 ...otrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/BulkGetKeysOperation.java
  18. +5 −5 ...nt/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/BulkGetOperation.java
  19. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/ClearOperation.java
  20. +3 −3 ...otrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/ContainsKeyOperation.java
  21. +4 −4 ...nt/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/ExecuteOperation.java
  22. +4 −4 ...client/src/main/java/org/infinispan/client/hotrod/impl/operations/FaultTolerantPingOperation.java
  23. +5 −5 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetAllOperation.java
  24. +4 −4 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetAllParallelOperation.java
  25. +5 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetOperation.java
  26. +3 −3 .../hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetStreamOperation.java
  27. +4 −4 ...d-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetWithMetadataOperation.java
  28. +5 −3 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/GetWithVersionOperation.java
  29. +5 −5 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/HotRodOperation.java
  30. +3 −3 ...trod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/IterationEndOperation.java
  31. +8 −7 ...rod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/IterationNextOperation.java
  32. +3 −3 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/IterationStartOperation.java
  33. +37 −37 ...t/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/OperationsFactory.java
  34. +3 −2 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/ParallelHotRodOperation.java
  35. +5 −5 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PingOperation.java
  36. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PutAllOperation.java
  37. +4 −4 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PutAllParallelOperation.java
  38. +3 −3 ...otrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PutIfAbsentOperation.java
  39. +3 −2 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PutOperation.java
  40. +3 −3 .../hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/PutStreamOperation.java
  41. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/QueryOperation.java
  42. +3 −3 ...ent/src/main/java/org/infinispan/client/hotrod/impl/operations/RemoveClientListenerOperation.java
  43. +3 −2 ...lient/src/main/java/org/infinispan/client/hotrod/impl/operations/RemoveIfUnmodifiedOperation.java
  44. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/RemoveOperation.java
  45. +3 −2 ...ient/src/main/java/org/infinispan/client/hotrod/impl/operations/ReplaceIfUnmodifiedOperation.java
  46. +3 −3 ...nt/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/ReplaceOperation.java
  47. +3 −2 ...od-client/src/main/java/org/infinispan/client/hotrod/impl/operations/RetryOnFailureOperation.java
  48. +3 −3 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/SizeOperation.java
  49. +3 −2 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/StatsOperation.java
  50. +5 −4 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/protocol/Codec.java
  51. +7 −6 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/protocol/Codec10.java
  52. +13 −13 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/protocol/Codec20.java
  53. +7 −6 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/protocol/Codec21.java
  54. +3 −2 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/protocol/CodecUtils.java
  55. +2 −2 ...ent/src/main/java/org/infinispan/client/hotrod/impl/transport/tcp/SaslTransportObjectFactory.java
  56. +1 −1 ...-client/src/main/java/org/infinispan/client/hotrod/impl/transport/tcp/TransportObjectFactory.java
  57. +6 −0 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/logging/Log.java
  58. +55 −7 client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java
  59. +18 −1 client/hotrod-client/src/test/java/org/infinispan/client/hotrod/configuration/ConfigurationTest.java
  60. +1 −1 .../src/test/java/org/infinispan/client/hotrod/impl/iteration/MultiServerDistRemoteIteratorTest.java
  61. +3 −2 client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/ClientListenerRetryTest.java
  62. +2 −2 client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/RetryOnFailureUnitTest.java
  63. +1 −0 ...ompatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
@@ -199,7 +199,7 @@ public void start() {

createExecutorService();

listenerNotifier = ClientListenerNotifier.create(codec, marshaller, transportFactory);
listenerNotifier = ClientListenerNotifier.create(codec, marshaller, transportFactory, configuration.serialWhitelist());
transportFactory.start(codec, configuration, defaultCacheTopologyId, listenerNotifier);

synchronized (cacheName2RemoteCache) {
@@ -321,7 +321,7 @@ private void startRemoteCache(RemoteCacheHolder remoteCacheHolder) {
RemoteCacheImpl<?, ?> remoteCache = remoteCacheHolder.remoteCache;
OperationsFactory operationsFactory = new OperationsFactory(
transportFactory, remoteCache.getName(), remoteCacheHolder.forceReturnValue, codec, listenerNotifier,
asyncExecutorService, configuration.clientIntelligence());
asyncExecutorService, configuration);
remoteCache.init(marshaller, asyncExecutorService, operationsFactory, configuration.keySizeEstimate(), configuration.valueSizeEstimate());
}

@@ -341,7 +341,7 @@ public Marshaller getMarshaller() {
}

public RemoteCacheManagerAdmin administration() {
OperationsFactory operationsFactory = new OperationsFactory(transportFactory, codec, asyncExecutorService, configuration.clientIntelligence());
OperationsFactory operationsFactory = new OperationsFactory(transportFactory, codec, asyncExecutorService, configuration);
return new RemoteCacheManagerAdminImpl(operationsFactory);
}

@@ -165,6 +165,11 @@ public ConfigurationBuilder maxRetries(int retriesPerServer) {
return builder.maxRetries(retriesPerServer);
}

@Override
public ConfigurationBuilder addJavaSerialWhiteList(String... regExs) {
return builder.addJavaSerialWhiteList(regExs);
}

@Override
public ConfigurationBuilder withProperties(Properties properties) {
return builder.withProperties(properties);
@@ -48,13 +48,14 @@
private final int maxRetries;
private final NearCacheConfiguration nearCache;
private final List<ClusterConfiguration> clusters;
private final List<String> serialWhitelist;

Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Class<? extends FailoverRequestBalancingStrategy> balancingStrategyClass, FailoverRequestBalancingStrategy balancingStrategy, ClassLoader classLoader,
ClientIntelligence clientIntelligence, ConnectionPoolConfiguration connectionPool, int connectionTimeout, Class<? extends ConsistentHash>[] consistentHashImpl, boolean forceReturnValues, int keySizeEstimate,
Marshaller marshaller, Class<? extends Marshaller> marshallerClass,
ProtocolVersion protocolVersion, List<ServerConfiguration> servers, int socketTimeout, SecurityConfiguration security, boolean tcpNoDelay, boolean tcpKeepAlive,
Class<? extends TransportFactory> transportFactory, int valueSizeEstimate, int maxRetries, NearCacheConfiguration nearCache,
List<ClusterConfiguration> clusters) {
List<ClusterConfiguration> clusters, List<String> serialWhitelist) {
this.asyncExecutorFactory = asyncExecutorFactory;
this.balancingStrategyClass = balancingStrategyClass;
this.balancingStrategy = balancingStrategy;
@@ -78,6 +79,7 @@
this.valueSizeEstimate = valueSizeEstimate;
this.nearCache = nearCache;
this.clusters = clusters;
this.serialWhitelist = serialWhitelist;
}

public ExecutorFactoryConfiguration asyncExecutorFactory() {
@@ -185,6 +187,10 @@ public int maxRetries() {
return maxRetries;
}

public List<String> serialWhitelist() {
return serialWhitelist;
}

@Override
public String toString() {
return "Configuration [asyncExecutorFactory=" + asyncExecutorFactory + ", balancingStrategyClass=" + balancingStrategyClass + ", balancingStrategy=" + balancingStrategy
@@ -193,6 +199,7 @@ public String toString() {
+ forceReturnValues + ", keySizeEstimate=" + keySizeEstimate + ", marshallerClass=" + marshallerClass + ", marshaller=" + marshaller + ", protocolVersion="
+ protocolVersion + ", servers=" + servers + ", socketTimeout=" + socketTimeout + ", security=" + security + ", tcpNoDelay=" + tcpNoDelay + ", tcpKeepAlive=" + tcpKeepAlive
+ ", transportFactory=" + transportFactory + ", valueSizeEstimate=" + valueSizeEstimate + ", maxRetries=" + maxRetries
+ ", serialWhiteList=" + serialWhitelist
+ "nearCache=" + nearCache + "]";
}

@@ -295,6 +302,8 @@ public Properties properties() {
for (Map.Entry<String, String> entry : security.authentication().saslProperties().entrySet())
properties.setProperty(ConfigurationProperties.SASL_PROPERTIES_PREFIX + '.' + entry.getKey(), entry.getValue());

properties.setProperty(ConfigurationProperties.JAVA_SERIAL_WHITELIST, String.join(",", serialWhitelist));

return properties;
}
}
@@ -2,6 +2,8 @@

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
@@ -68,6 +70,7 @@
private int valueSizeEstimate = ConfigurationProperties.DEFAULT_VALUE_SIZE;
private int maxRetries = ConfigurationProperties.DEFAULT_MAX_RETRIES;
private final NearCacheConfigurationBuilder nearCache;
private final List<String> whiteListRegExs = new ArrayList<>();

private final List<ClusterConfigurationBuilder> clusters = new ArrayList<ClusterConfigurationBuilder>();

@@ -281,6 +284,12 @@ public ConfigurationBuilder maxRetries(int maxRetries) {
return this;
}

@Override
public ConfigurationBuilder addJavaSerialWhiteList(String... regEx) {
this.whiteListRegExs.addAll(Arrays.asList(regEx));
return this;
}

@Override
public ConfigurationBuilder withProperties(Properties properties) {
TypedProperties typed = TypedProperties.toTypedProperties(properties);
@@ -322,6 +331,13 @@ public ConfigurationBuilder withProperties(Properties properties) {
this.maxRetries(typed.getIntProperty(ConfigurationProperties.MAX_RETRIES, maxRetries, true));
this.security.ssl().withProperties(properties);
this.security.authentication().withProperties(properties);

String serialWhitelist = typed.getProperty(ConfigurationProperties.JAVA_SERIAL_WHITELIST);
if (serialWhitelist != null) {
String[] classes = serialWhitelist.split(",");
Collections.addAll(this.whiteListRegExs, classes);
}

return this;
}

@@ -362,7 +378,7 @@ public Configuration create() {

return new Configuration(asyncExecutorFactory.create(), balancingStrategyClass, balancingStrategy, classLoader == null ? null : classLoader.get(), clientIntelligence, connectionPool.create(), connectionTimeout,
consistentHashImpl, forceReturnValues, keySizeEstimate, marshaller, marshallerClass, protocolVersion, servers, socketTimeout, security.create(), tcpNoDelay, tcpKeepAlive, transportFactory,
valueSizeEstimate, maxRetries, nearCache.create(), serverClusterConfigs);
valueSizeEstimate, maxRetries, nearCache.create(), serverClusterConfigs, whiteListRegExs);
}

@Override
@@ -405,6 +421,8 @@ public ConfigurationBuilder read(Configuration template) {
this.valueSizeEstimate = template.valueSizeEstimate();
this.maxRetries = template.maxRetries();
this.nearCache.read(template.nearCache());
this.whiteListRegExs.addAll(template.serialWhitelist());

return this;
}
}
@@ -1,5 +1,6 @@
package org.infinispan.client.hotrod.configuration;

import java.util.List;
import java.util.Properties;

import org.infinispan.client.hotrod.ProtocolVersion;
@@ -182,6 +183,12 @@
*/
ConfigurationBuilder maxRetries(int maxRetries);

/**
* List of regular expressions for classes that can be deserialized using standard Java deserialization
* when reading data that might have been stored with a different endpoint, e.g. REST.
*/
ConfigurationBuilder addJavaSerialWhiteList(String... regEx);

/**
* Configures this builder using the specified properties
*/
@@ -64,19 +64,21 @@
private final TransportFactory transportFactory;

private final Consumer<WrappedByteArray> failoverClientListener = this::failoverClientListener;
private final List<String> whitelist;

protected ClientListenerNotifier(
ExecutorService executor, Codec codec,
Marshaller marshaller, TransportFactory transportFactory) {
Marshaller marshaller, TransportFactory transportFactory, List<String> whitelist) {
this.executor = executor;
this.codec = codec;
this.marshaller = marshaller;
this.transportFactory = transportFactory;
this.whitelist = whitelist;
}

public static ClientListenerNotifier create(Codec codec, Marshaller marshaller, TransportFactory transportFactory) {
public static ClientListenerNotifier create(Codec codec, Marshaller marshaller, TransportFactory transportFactory, List<String> whitelist) {
ExecutorService executor = Executors.newCachedThreadPool(getRestoreThreadNameThreadFactory());
return new ClientListenerNotifier(executor, codec, marshaller, transportFactory);
return new ClientListenerNotifier(executor, codec, marshaller, transportFactory, whitelist);
}

private static ThreadFactory getRestoreThreadNameThreadFactory() {
@@ -277,7 +279,7 @@ public void run() {
while (!Thread.currentThread().isInterrupted()) {
ClientEvent clientEvent = null;
try {
clientEvent = codec.readEvent(transport, op.listenerId, marshaller);
clientEvent = codec.readEvent(transport, op.listenerId, marshaller, whitelist);
invokeClientEvent(clientEvent);
// Nullify event, makes it easier to identify network vs invocation error messages
clientEvent = null;
@@ -61,6 +61,7 @@
public static final String SASL_PROPERTIES_PREFIX = "infinispan.client.hotrod.sasl_properties";
public static final Pattern SASL_PROPERTIES_PREFIX_REGEX =
Pattern.compile('^' + ConfigurationProperties.SASL_PROPERTIES_PREFIX + '.');
public static final String JAVA_SERIAL_WHITELIST = "infinispan.client.hotrod.java_serial_whitelist";

// defaults

@@ -1,5 +1,6 @@
package org.infinispan.client.hotrod.impl.iteration;

import java.util.List;
import java.util.Set;

/**
@@ -8,7 +9,7 @@
*/
public interface KeyTracker {

boolean track(byte[] key, short status);
boolean track(byte[] key, short status, List<String> whitelist);

void segmentsFinished(byte[] finishedSegments);

@@ -1,5 +1,6 @@
package org.infinispan.client.hotrod.impl.iteration;

import java.util.List;
import java.util.Set;

/**
@@ -9,7 +10,7 @@
class NoOpSegmentKeyTracker implements KeyTracker {

@Override
public boolean track(byte[] key, short status) {
public boolean track(byte[] key, short status, List<String> whitelist) {
return true;
}

@@ -1,6 +1,7 @@
package org.infinispan.client.hotrod.impl.iteration;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.infinispan.commons.marshall.WrappedByteArray;
@@ -17,7 +18,7 @@
private Set<WrappedByteArray> keys = new HashSet<>();

@Override
public boolean track(byte[] key, short status) {
public boolean track(byte[] key, short status, List<String> whitelist) {
return keys.add(new WrappedByteArray(key));
}

@@ -2,6 +2,7 @@

import java.util.BitSet;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.stream.IntStream;
@@ -38,9 +39,9 @@ public SegmentKeyTracker(Marshaller marshaller, SegmentConsistentHash segmentCon
segmentStream.forEach(i -> keysPerSegment.set(i, new HashSet<>()));
}

public boolean track(byte[] key, short status) {
public boolean track(byte[] key, short status, List<String> whitelist) {
int segment = HotRodConstants.hasCompatibility(status) ?
segmentConsistentHash.getSegment(MarshallerUtil.bytes2obj(marshaller, key, status)) :
segmentConsistentHash.getSegment(MarshallerUtil.bytes2obj(marshaller, key, status, whitelist)) :
segmentConsistentHash.getSegment(key);
boolean result = keysPerSegment.get(segment).add(new WrappedByteArray(key));
if (log.isTraceEnabled())
@@ -4,7 +4,7 @@
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;

import org.infinispan.client.hotrod.configuration.ClientIntelligence;
import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.impl.VersionedOperationResponse;
import org.infinispan.client.hotrod.impl.protocol.Codec;
import org.infinispan.client.hotrod.impl.protocol.HeaderParams;
@@ -26,8 +26,8 @@
protected final byte[] keyBytes;

protected AbstractKeyOperation(Codec codec, TransportFactory transportFactory,
Object key, byte[] keyBytes, byte[] cacheName, AtomicInteger topologyId, int flags, ClientIntelligence clientIntelligence) {
super(codec, transportFactory, cacheName, topologyId, flags, clientIntelligence);
Object key, byte[] keyBytes, byte[] cacheName, AtomicInteger topologyId, int flags, Configuration cfg) {
super(codec, transportFactory, cacheName, topologyId, flags, cfg);
this.key = key;
this.keyBytes = keyBytes;
}
@@ -52,7 +52,7 @@ protected short sendKeyOperation(byte[] key, Transport transport, byte opCode, b
}

protected T returnPossiblePrevValue(Transport transport, short status) {
return (T) codec.returnPossiblePrevValue(transport, status, flags);
return (T) codec.returnPossiblePrevValue(transport, status, flags, cfg.serialWhitelist());
}

protected VersionedOperationResponse returnVersionedOperationResponse(Transport transport, HeaderParams params) {
@@ -3,7 +3,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

import org.infinispan.client.hotrod.configuration.ClientIntelligence;
import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.impl.protocol.Codec;
import org.infinispan.client.hotrod.impl.protocol.HeaderParams;
import org.infinispan.client.hotrod.impl.transport.Transport;
@@ -31,9 +31,9 @@
protected final TimeUnit maxIdleTimeUnit;

protected AbstractKeyValueOperation(Codec codec, TransportFactory transportFactory, Object key, byte[] keyBytes, byte[] cacheName,
AtomicInteger topologyId, int flags, ClientIntelligence clientIntelligence, byte[] value,
AtomicInteger topologyId, int flags, Configuration cfg, byte[] value,
long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) {
super(codec, transportFactory, key, keyBytes, cacheName, topologyId, flags, clientIntelligence);
super(codec, transportFactory, key, keyBytes, cacheName, topologyId, flags, cfg);
this.value = value;
this.lifespan = lifespan;
this.maxIdle = maxIdle;
@@ -8,7 +8,7 @@

import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.annotation.ClientListener;
import org.infinispan.client.hotrod.configuration.ClientIntelligence;
import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.event.ClientEvent;
import org.infinispan.client.hotrod.event.ClientListenerNotifier;
import org.infinispan.client.hotrod.impl.protocol.Codec;
@@ -44,10 +44,10 @@
public final byte[][] converterFactoryParams;

protected AddClientListenerOperation(Codec codec, TransportFactory transportFactory,
String cacheName, AtomicInteger topologyId, int flags, ClientIntelligence clientIntelligence,
String cacheName, AtomicInteger topologyId, int flags, Configuration cfg,
ClientListenerNotifier listenerNotifier, Object listener,
byte[][] filterFactoryParams, byte[][] converterFactoryParams) {
super(codec, transportFactory, RemoteCacheManager.cacheNameBytes(cacheName), topologyId, flags, clientIntelligence);
super(codec, transportFactory, RemoteCacheManager.cacheNameBytes(cacheName), topologyId, flags, cfg);
this.listenerId = generateListenerId();
this.listenerNotifier = listenerNotifier;
this.listener = listener;
@@ -94,7 +94,7 @@ protected Short executeOperation(Transport transport) {
Either<Short, ClientEvent> either;
do {
// Process state transfer related events or add listener response
either = codec.readHeaderOrEvent(dedicatedTransport, params, listenerId, listenerNotifier.getMarshaller());
either = codec.readHeaderOrEvent(dedicatedTransport, params, listenerId, listenerNotifier.getMarshaller(), cfg.serialWhitelist());
switch(either.type()) {
case LEFT:
if (HotRodConstants.isSuccess(either.left()))
@@ -4,7 +4,7 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import org.infinispan.client.hotrod.configuration.ClientIntelligence;
import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.impl.protocol.Codec;
import org.infinispan.client.hotrod.impl.protocol.HeaderParams;
import org.infinispan.client.hotrod.impl.transport.Transport;
@@ -22,8 +22,8 @@

private final Transport transport;

public AuthMechListOperation(Codec codec, AtomicInteger topologyId, ClientIntelligence clientIntelligence, Transport transport) {
super(codec, 0, clientIntelligence, DEFAULT_CACHE_NAME_BYTES, topologyId);
public AuthMechListOperation(Codec codec, AtomicInteger topologyId, Configuration cfg, Transport transport) {
super(codec, 0, cfg, DEFAULT_CACHE_NAME_BYTES, topologyId);
this.transport = transport;
}

0 comments on commit f2989a9

Please sign in to comment.
You can’t perform that action at this time.