Details
-
Clarification
-
Resolution: Not a Bug
-
Major
-
None
-
fuse-7.9-GA
-
None
-
False
-
False
-
%
-
Todo
Description
Hi ,
We are trying to create a small poc for one of the clients , we are using red hat jboss data grid [8.2] and trying to read some value from the cache using camel-infinispan , but somehow we are not able to pass authentication parameters .
--Camel Code -->
<setHeader headerName="CamelInfinispanKey">
<constant>key1</constant>
</setHeader>
<setHeader headerName="CamelInfinispanOperation">
<constant>GET</constant>
</setHeader>
<to uri="infinispan://cachename?hosts=127.0.0.1:11222">
We tried to pass auth parameters in Application.properties file but it didn't take:
infinispan.remote.use-auth=true
infinispan.remote.sasl-mechanism=DIGEST-MD5
infinispan.remote.auth-realm=default
infinispan.remote.auth-server-name=infinispan
infinispan.client.hotrod.auth_username=admin
infinispan.client.hotrod.auth_password=admin
pom.xml --->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.redhat-fuse</groupId>
<artifactId>fuse-springboot-bom</artifactId>
<version>7.9.0.fuse-sb2-790065-redhat-00001</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-infinispan-starter</artifactId>
</dependency>
Error -->
Caused by: org.infinispan.client.hotrod.exceptions.HotRodClientException: java.lang.SecurityException: ISPN006017: Operation 'GET' requires authentication
We also tried to use spring boot to pass the auth -->
Camel code :
<to uri="infinispan://mock?cacheContainer=#remoteCacheContainer" />
JAVA bean :
ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
@Bean
public RemoteCacheManager remoteCacheContainer() {
clientBuilder = new ConfigurationBuilder();
clientBuilder.addServer().host("localhost").port(11222).security().authentication().enable().
username("admin").password("admin").saslMechanism("DIGEST-MD5").realm("default");
RemoteCacheManager rcm = new RemoteCacheManager(clientBuilder.build());
return rcm;
}
Error :
19:43:02.713 [HotRod-client-async-pool-1-23] ERROR o.i.c.h.i.o.RetryOnFailureOperation - ISPN004007: Exception encountered. Retry 10 out of 10
org.infinispan.client.hotrod.exceptions.TransportException: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=72 returned server error (status=0x84): javax.security.sasl.SaslException: ELY05088: digest-uri "hotrod/null" not accepted
Can someone please guide us what we are doing wrong ??