This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3173b5b1ce5a671eb2cad39a1ce134e7165fb5a3
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Oct 2 12:11:07 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
---
 .../camel/catalog/docs/infinispan-component.adoc   |  10 +-
 components/camel-infinispan/pom.xml                | 156 +++++++++------------
 .../infinispan/InfinispanComponentConfigurer.java  |   9 ++
 .../infinispan/InfinispanEndpointConfigurer.java   |   9 ++
 .../infinispan/InfinispanEndpointUriFactory.java   |   5 +-
 .../camel/component/infinispan/infinispan.json     |   6 +
 .../src/main/docs/infinispan-component.adoc        |  10 +-
 .../infinispan/InfinispanConfiguration.java        |  38 +++++
 .../component/infinispan/InfinispanManager.java    |   5 +
 .../InfinispanTestContainerSupport.java            |  64 +++++++++
 .../InfinispanTestContainersProducerTest.java      |  75 ++++++++++
 .../src/test/resources/log4j2.properties           |   4 +-
 .../dsl/InfinispanComponentBuilderFactory.java     |  37 +++++
 .../dsl/InfinispanEndpointBuilderFactory.java      | 138 ++++++++++++++++++
 .../modules/ROOT/pages/infinispan-component.adoc   |  10 +-
 15 files changed, 478 insertions(+), 98 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
index 32f9729..991d779 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/infinispan-component.adoc
@@ -63,7 +63,7 @@ If no cache configuration is provided, embedded 
cacheContainer is created direct
 
 
 // component options: START
-The Infinispan component supports 23 options, which are listed below.
+The Infinispan component supports 26 options, which are listed below.
 
 
 
@@ -73,6 +73,7 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *configuration* (common) | Component configuration |  | 
InfinispanConfiguration
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -85,6 +86,8 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | *Deprecated* Whether the component 
should use basic property binding (Camel 2.x) or the newer property binding 
with additional capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object
@@ -118,7 +121,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (25 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -126,6 +129,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -140,6 +144,8 @@ with the following path and query parameters:
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object
diff --git a/components/camel-infinispan/pom.xml 
b/components/camel-infinispan/pom.xml
index e8c666f..b3f1681 100644
--- a/components/camel-infinispan/pom.xml
+++ b/components/camel-infinispan/pom.xml
@@ -135,112 +135,90 @@
             <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-testcontainers-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
+    <profiles>
+        <profile>
+            <id>infinispan-skip-tests</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <skipTests>true</skipTests>
                     <systemProperties>
                         <property>
                             <name>infinispan.test.jgroups.protocol</name>
                             <value>tcp</value>
                         </property>
                     </systemProperties>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
 
-    <profiles>
+        <!-- activate test if the docker socket file is accessible -->
         <profile>
-            <id>infinispan-itests</id>
+            <id>infinispan-tests-docker-file</id>
             <activation>
-                <activeByDefault>false</activeByDefault>
+                <file>
+                    <exists>/var/run/docker.sock</exists>
+                </file>
             </activation>
-            <properties>
-                
<server.dir.parent>${project.build.directory}</server.dir.parent>
-                
<server.dir.name>infinispan-server-${infinispan-version}</server.dir.name>
-                
<server.dir>${server.dir.parent}/${server.dir.name}</server.dir>
-            </properties>
             <build>
                 <plugins>
                     <plugin>
-                        <groupId>com.googlecode.maven-download-plugin</groupId>
-                        <artifactId>download-maven-plugin</artifactId>
-                        <version>1.4.2</version>
-                        <executions>
-                            <execution>
-                                <id>download-infinispan-server</id>
-                                <phase>pre-integration-test</phase>
-                                <goals>
-                                    <goal>wget</goal>
-                                </goals>
-                                <configuration>
-                                    
<url>http://downloads.jboss.org/infinispan/${infinispan-version}/infinispan-server-${infinispan-version}.zip</url>
-                                    <unpack>true</unpack>
-                                    
<outputDirectory>${server.dir.parent}</outputDirectory>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-dependency-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>deploy-converter-factory</id>
-                                <phase>generate-test-resources</phase>
-                                <goals>
-                                    <goal>copy</goal>
-                                </goals>
-                                <configuration>
-                                    <artifactItems>
-                                        <artifactItem>
-                                            <groupId>org.infinispan</groupId>
-                                            
<artifactId>infinispan-server-runtime</artifactId>
-                                            
<version>${infinispan-version}</version>
-                                            
<outputDirectory>${server.dir}/standalone/deployments</outputDirectory>
-                                        </artifactItem>
-                                    </artifactItems>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>com.bazaarvoice.maven.plugins</groupId>
-                        <artifactId>process-exec-maven-plugin</artifactId>
-                        <version>0.9</version>
-                        <executions>
-                            <!-- Start process -->
-                            <execution>
-                                <id>infinispan-server</id>
-                                <phase>pre-integration-test</phase>
-                                <goals>
-                                    <goal>start</goal>
-                                </goals>
-                                <configuration>
-                                    <name>infinispan-server</name>
-                                    <workingDir>${server.dir}/bin/</workingDir>
-                                    <arguments>
-                                        <argument>./server.sh</argument>
-                                    </arguments>
-                                </configuration>
-                            </execution>
-                        </executions>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <skipTests>${skipTests}</skipTests>
+                            <systemPropertyVariables>
+                                
<visibleassertions.silence>true</visibleassertions.silence>
+                            </systemPropertyVariables>
+                    <systemProperties>
+                        <property>
+                            <name>infinispan.test.jgroups.protocol</name>
+                            <value>tcp</value>
+                        </property>
+                    </systemProperties>
+                        </configuration>
                     </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <!-- activate test if the DOCKER_HOST env var is set -->
+        <profile>
+            <id>infinispan-tests-docker-env</id>
+            <activation>
+                <property>
+                    <name>env.DOCKER_HOST</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
                     <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                </goals>
-                            </execution>
-                        </executions>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <skipTests>${skipTests}</skipTests>
+                            <systemPropertyVariables>
+                                
<visibleassertions.silence>true</visibleassertions.silence>
+                            </systemPropertyVariables>
+                    <systemProperties>
+                        <property>
+                            <name>infinispan.test.jgroups.protocol</name>
+                            <value>tcp</value>
+                        </property>
+                    </systemProperties>
+                        </configuration>
                     </plugin>
                 </plugins>
             </build>
diff --git 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
index 85eca9a..e9597fe 100644
--- 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
+++ 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurer.java
@@ -21,6 +21,7 @@ public class InfinispanComponentConfigurer extends 
PropertyConfigurerSupport imp
         map.put("configuration", 
org.apache.camel.component.infinispan.InfinispanConfiguration.class);
         map.put("hosts", java.lang.String.class);
         map.put("queryBuilder", 
org.apache.camel.component.infinispan.InfinispanQueryBuilder.class);
+        map.put("secure", boolean.class);
         map.put("bridgeErrorHandler", boolean.class);
         map.put("clusteredListener", boolean.class);
         map.put("command", java.lang.String.class);
@@ -33,6 +34,8 @@ public class InfinispanComponentConfigurer extends 
PropertyConfigurerSupport imp
         map.put("oldValue", java.lang.Object.class);
         map.put("operation", 
org.apache.camel.component.infinispan.InfinispanOperation.class);
         map.put("value", java.lang.Object.class);
+        map.put("password", java.lang.String.class);
+        map.put("username", java.lang.String.class);
         map.put("basicPropertyBinding", boolean.class);
         map.put("cacheContainer", 
org.infinispan.commons.api.BasicCacheContainer.class);
         map.put("cacheContainerConfiguration", java.lang.Object.class);
@@ -85,13 +88,16 @@ public class InfinispanComponentConfigurer extends 
PropertyConfigurerSupport imp
         case "oldvalue":
         case "oldValue": 
getOrCreateConfiguration(target).setOldValue(property(camelContext, 
java.lang.Object.class, value)); return true;
         case "operation": 
getOrCreateConfiguration(target).setOperation(property(camelContext, 
org.apache.camel.component.infinispan.InfinispanOperation.class, value)); 
return true;
+        case "password": 
getOrCreateConfiguration(target).setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "querybuilder":
         case "queryBuilder": 
getOrCreateConfiguration(target).setQueryBuilder(property(camelContext, 
org.apache.camel.component.infinispan.InfinispanQueryBuilder.class, value)); 
return true;
         case "remappingfunction":
         case "remappingFunction": 
getOrCreateConfiguration(target).setRemappingFunction(property(camelContext, 
java.util.function.BiFunction.class, value)); return true;
         case "resultheader":
         case "resultHeader": 
getOrCreateConfiguration(target).setResultHeader(property(camelContext, 
java.lang.Object.class, value)); return true;
+        case "secure": 
getOrCreateConfiguration(target).setSecure(property(camelContext, 
boolean.class, value)); return true;
         case "sync": 
getOrCreateConfiguration(target).setSync(property(camelContext, boolean.class, 
value)); return true;
+        case "username": 
getOrCreateConfiguration(target).setUsername(property(camelContext, 
java.lang.String.class, value)); return true;
         case "value": 
getOrCreateConfiguration(target).setValue(property(camelContext, 
java.lang.Object.class, value)); return true;
         default: return false;
         }
@@ -136,13 +142,16 @@ public class InfinispanComponentConfigurer extends 
PropertyConfigurerSupport imp
         case "oldvalue":
         case "oldValue": return getOrCreateConfiguration(target).getOldValue();
         case "operation": return 
getOrCreateConfiguration(target).getOperation();
+        case "password": return getOrCreateConfiguration(target).getPassword();
         case "querybuilder":
         case "queryBuilder": return 
getOrCreateConfiguration(target).getQueryBuilder();
         case "remappingfunction":
         case "remappingFunction": return 
getOrCreateConfiguration(target).getRemappingFunction();
         case "resultheader":
         case "resultHeader": return 
getOrCreateConfiguration(target).getResultHeader();
+        case "secure": return getOrCreateConfiguration(target).isSecure();
         case "sync": return getOrCreateConfiguration(target).isSync();
+        case "username": return getOrCreateConfiguration(target).getUsername();
         case "value": return getOrCreateConfiguration(target).getValue();
         default: return null;
         }
diff --git 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
index a86afa0..96e8cb9 100644
--- 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
+++ 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointConfigurer.java
@@ -21,6 +21,7 @@ public class InfinispanEndpointConfigurer extends 
PropertyConfigurerSupport impl
         map.put("cacheName", java.lang.String.class);
         map.put("hosts", java.lang.String.class);
         map.put("queryBuilder", 
org.apache.camel.component.infinispan.InfinispanQueryBuilder.class);
+        map.put("secure", boolean.class);
         map.put("bridgeErrorHandler", boolean.class);
         map.put("clusteredListener", boolean.class);
         map.put("command", java.lang.String.class);
@@ -35,6 +36,8 @@ public class InfinispanEndpointConfigurer extends 
PropertyConfigurerSupport impl
         map.put("oldValue", java.lang.Object.class);
         map.put("operation", 
org.apache.camel.component.infinispan.InfinispanOperation.class);
         map.put("value", java.lang.Object.class);
+        map.put("password", java.lang.String.class);
+        map.put("username", java.lang.String.class);
         map.put("basicPropertyBinding", boolean.class);
         map.put("cacheContainer", 
org.infinispan.commons.api.BasicCacheContainer.class);
         map.put("cacheContainerConfiguration", java.lang.Object.class);
@@ -84,14 +87,17 @@ public class InfinispanEndpointConfigurer extends 
PropertyConfigurerSupport impl
         case "oldvalue":
         case "oldValue": 
target.getConfiguration().setOldValue(property(camelContext, 
java.lang.Object.class, value)); return true;
         case "operation": 
target.getConfiguration().setOperation(property(camelContext, 
org.apache.camel.component.infinispan.InfinispanOperation.class, value)); 
return true;
+        case "password": 
target.getConfiguration().setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "querybuilder":
         case "queryBuilder": 
target.getConfiguration().setQueryBuilder(property(camelContext, 
org.apache.camel.component.infinispan.InfinispanQueryBuilder.class, value)); 
return true;
         case "remappingfunction":
         case "remappingFunction": 
target.getConfiguration().setRemappingFunction(property(camelContext, 
java.util.function.BiFunction.class, value)); return true;
         case "resultheader":
         case "resultHeader": 
target.getConfiguration().setResultHeader(property(camelContext, 
java.lang.Object.class, value)); return true;
+        case "secure": 
target.getConfiguration().setSecure(property(camelContext, boolean.class, 
value)); return true;
         case "sync": target.getConfiguration().setSync(property(camelContext, 
boolean.class, value)); return true;
         case "synchronous": target.setSynchronous(property(camelContext, 
boolean.class, value)); return true;
+        case "username": 
target.getConfiguration().setUsername(property(camelContext, 
java.lang.String.class, value)); return true;
         case "value": 
target.getConfiguration().setValue(property(camelContext, 
java.lang.Object.class, value)); return true;
         default: return false;
         }
@@ -139,14 +145,17 @@ public class InfinispanEndpointConfigurer extends 
PropertyConfigurerSupport impl
         case "oldvalue":
         case "oldValue": return target.getConfiguration().getOldValue();
         case "operation": return target.getConfiguration().getOperation();
+        case "password": return target.getConfiguration().getPassword();
         case "querybuilder":
         case "queryBuilder": return 
target.getConfiguration().getQueryBuilder();
         case "remappingfunction":
         case "remappingFunction": return 
target.getConfiguration().getRemappingFunction();
         case "resultheader":
         case "resultHeader": return 
target.getConfiguration().getResultHeader();
+        case "secure": return target.getConfiguration().isSecure();
         case "sync": return target.getConfiguration().isSync();
         case "synchronous": return target.isSynchronous();
+        case "username": return target.getConfiguration().getUsername();
         case "value": return target.getConfiguration().getValue();
         default: return null;
         }
diff --git 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointUriFactory.java
 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointUriFactory.java
index 8ea5c26..8f06638 100644
--- 
a/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointUriFactory.java
+++ 
b/components/camel-infinispan/src/generated/java/org/apache/camel/component/infinispan/InfinispanEndpointUriFactory.java
@@ -18,10 +18,11 @@ public class InfinispanEndpointUriFactory extends 
org.apache.camel.support.compo
 
     private static final Set<String> PROPERTY_NAMES;
     static {
-        Set<String> set = new HashSet<>(26);
+        Set<String> set = new HashSet<>(29);
         set.add("cacheName");
         set.add("hosts");
         set.add("queryBuilder");
+        set.add("secure");
         set.add("bridgeErrorHandler");
         set.add("clusteredListener");
         set.add("command");
@@ -36,6 +37,8 @@ public class InfinispanEndpointUriFactory extends 
org.apache.camel.support.compo
         set.add("oldValue");
         set.add("operation");
         set.add("value");
+        set.add("password");
+        set.add("username");
         set.add("basicPropertyBinding");
         set.add("cacheContainer");
         set.add("cacheContainerConfiguration");
diff --git 
a/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
 
b/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
index e7d0613..f67b20e 100644
--- 
a/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
+++ 
b/components/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/infinispan.json
@@ -25,6 +25,7 @@
     "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.infinispan.InfinispanConfiguration", 
"deprecated": false, "secret": false, "description": "Component configuration" 
},
     "hosts": { "kind": "property", "displayName": "Hosts", "group": "common", 
"label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the host of 
the cache on Infinispan instance" },
     "queryBuilder": { "kind": "property", "displayName": "Query Builder", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", 
"deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the query 
builder." },
+    "secure": { "kind": "property", "displayName": "Secure", "group": 
"common", "label": "common", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "secret": false, "defaultValue": "false", 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define if we are 
connecting to a secured Infinispan instance" },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by [...]
     "clusteredListener": { "kind": "property", "displayName": "Clustered 
Listener", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": "false", "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "If true, the listener 
will be installed for the entire cluster" },
     "command": { "kind": "property", "displayName": "Command", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "secret": false, 
"defaultValue": "PUT", "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "The operation to 
perform." },
@@ -37,6 +38,8 @@
     "oldValue": { "kind": "property", "displayName": "Old Value", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "java.lang.Object", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Set a specific old value 
for some producer operations" },
     "operation": { "kind": "property", "displayName": "Operation", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.infinispan.InfinispanOperation", 
"enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", 
"PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", 
"REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", 
"CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], [...]
     "value": { "kind": "property", "displayName": "Value", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "java.lang.Object", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Set a specific value for 
producer operations" },
+    "password": { "kind": "property", "displayName": "Password", "group": " 
security", "label": "common, security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": true, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define the password to 
access the infinispan instance" },
+    "username": { "kind": "property", "displayName": "Username", "group": " 
security", "label": "common, security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define the username to 
access the infinispan instance" },
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic 
Property Binding", "group": "advanced", "label": "advanced", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": true, "secret": false, 
"defaultValue": false, "description": "Whether the component should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities" },
     "cacheContainer": { "kind": "property", "displayName": "Cache Container", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the cache 
Container to connect" },
     "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache 
Container Configuration", "group": "advanced", "label": "advanced", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "The CacheContainer 
configuration. Uses if the cacheContainer is not defined. Must be the followi 
[...]
@@ -50,6 +53,7 @@
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": 
"common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "secret": 
false, "description": "The name of the cache to use. Use current to use the 
existing cache name from the currently configured cached manager. Or use 
default for the default cache manager name." },
     "hosts": { "kind": "parameter", "displayName": "Hosts", "group": "common", 
"label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the host of 
the cache on Infinispan instance" },
     "queryBuilder": { "kind": "parameter", "displayName": "Query Builder", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", 
"deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the query 
builder." },
+    "secure": { "kind": "parameter", "displayName": "Secure", "group": 
"common", "label": "common", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "secret": false, "defaultValue": "false", 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define if we are 
connecting to a secured Infinispan instance" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled b [...]
     "clusteredListener": { "kind": "parameter", "displayName": "Clustered 
Listener", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": "false", "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "If true, the listener 
will be installed for the entire cluster" },
     "command": { "kind": "parameter", "displayName": "Command", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "secret": false, 
"defaultValue": "PUT", "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "The operation to 
perform." },
@@ -64,6 +68,8 @@
     "oldValue": { "kind": "parameter", "displayName": "Old Value", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "java.lang.Object", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Set a specific old value 
for some producer operations" },
     "operation": { "kind": "parameter", "displayName": "Operation", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.infinispan.InfinispanOperation", 
"enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", 
"PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", 
"REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", 
"CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ] [...]
     "value": { "kind": "parameter", "displayName": "Value", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "java.lang.Object", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Set a specific value for 
producer operations" },
+    "password": { "kind": "parameter", "displayName": "Password", "group": " 
security", "label": "common, security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": true, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define the password to 
access the infinispan instance" },
+    "username": { "kind": "parameter", "displayName": "Username", "group": " 
security", "label": "common, security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Define the username to 
access the infinispan instance" },
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic 
Property Binding", "group": "advanced", "label": "advanced", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": false, "description": "Whether the endpoint should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities" },
     "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "Specifies the cache 
Container to connect" },
     "cacheContainerConfiguration": { "kind": "parameter", "displayName": 
"Cache Container Configuration", "group": "advanced", "label": "advanced", 
"required": false, "type": "object", "javaType": "java.lang.Object", 
"deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.infinispan.InfinispanConfiguration", 
"configurationField": "configuration", "description": "The CacheContainer 
configuration. Uses if the cacheContainer is not defined. Must be the follow 
[...]
diff --git 
a/components/camel-infinispan/src/main/docs/infinispan-component.adoc 
b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index 32f9729..991d779 100644
--- a/components/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -63,7 +63,7 @@ If no cache configuration is provided, embedded 
cacheContainer is created direct
 
 
 // component options: START
-The Infinispan component supports 23 options, which are listed below.
+The Infinispan component supports 26 options, which are listed below.
 
 
 
@@ -73,6 +73,7 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *configuration* (common) | Component configuration |  | 
InfinispanConfiguration
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -85,6 +86,8 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | *Deprecated* Whether the component 
should use basic property binding (Camel 2.x) or the newer property binding 
with additional capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object
@@ -118,7 +121,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (25 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -126,6 +129,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -140,6 +144,8 @@ with the following path and query parameters:
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object
diff --git 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
index 5c6a634..18b4cab 100644
--- 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
+++ 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
@@ -70,6 +70,12 @@ public class InfinispanConfiguration implements Cloneable {
     private Object resultHeader;
     @UriParam(label = "advanced")
     private BiFunction remappingFunction;
+    @UriParam(label = "common", defaultValue = "false")
+    private boolean secure = false;
+    @UriParam(label = "common, security")
+    private String username;
+    @UriParam(label = "common, security", secret = true)
+    private String password;
 
     public String getCommand() {
         return operation.toString();
@@ -355,4 +361,36 @@ public class InfinispanConfiguration implements Cloneable {
         this.defaultValue = defaultValue;
     }
 
+    public boolean isSecure() {
+        return secure;
+    }
+
+    /**
+     * Define if we are connecting to a secured Infinispan instance
+     */
+    public void setSecure(boolean secure) {
+        this.secure = secure;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    /**
+     * Define the username to access the infinispan instance
+     */
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    /**
+     * Define the password to access the infinispan instance
+     */
+    public void setPassword(String password) {
+        this.password = password;
+    }
 }
diff --git 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanManager.java
 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanManager.java
index 8b241d3..2ccea72 100644
--- 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanManager.java
+++ 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanManager.java
@@ -98,6 +98,11 @@ public class InfinispanManager extends ServiceSupport {
                     
builder.classLoader(Thread.currentThread().getContextClassLoader());
                 }
 
+                if (configuration.isSecure()) {
+                    
builder.security().authentication().username(configuration.getUsername())
+                            .password(configuration.getPassword());
+                }
+
                 Properties properties = new Properties();
 
                 // Properties can be set either via a properties file or via
diff --git 
a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainerSupport.java
 
b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainerSupport.java
new file mode 100644
index 0000000..c875dd1
--- /dev/null
+++ 
b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainerSupport.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.infinispan.testcontainers;
+
+import org.apache.camel.test.testcontainers.junit5.ContainerAwareTestSupport;
+import org.apache.camel.test.testcontainers.junit5.Wait;
+import org.infinispan.client.hotrod.RemoteCache;
+import org.infinispan.client.hotrod.RemoteCacheManager;
+import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
+import org.junit.jupiter.api.TestInstance;
+import org.testcontainers.containers.GenericContainer;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+public class InfinispanTestContainerSupport extends ContainerAwareTestSupport {
+
+    public static final String CONTAINER_IMAGE = 
"infinispan/server:11.0.3.Final";
+    public static final String CONTAINER_NAME = "infinispan";
+
+    @Override
+    protected GenericContainer<?> createContainer() {
+        return localstackContainer();
+    }
+
+    public static GenericContainer localstackContainer() {
+        return new GenericContainer(CONTAINER_IMAGE)
+                .withNetworkAliases(CONTAINER_NAME)
+                .withEnv("USER", "admin")
+                .withEnv("PASSWORD", "password")
+                .withExposedPorts(11222)
+                .waitingFor(Wait.forListeningPort())
+                .waitingFor(Wait.forLogMessageContaining("Infinispan Server 
11.0.3.Final started", 1));
+    }
+
+    public String getInfispanUrl() {
+        return String.format(
+                "%s:%d",
+                getContainerHost(CONTAINER_NAME),
+                getContainerPort(CONTAINER_NAME, 11222));
+    }
+
+    public RemoteCache<Object, Object> getDefaultCache() {
+        ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
+        
clientBuilder.addServer().host(getContainerHost(CONTAINER_NAME)).port(11222)
+                
.security().authentication().username("user").password("password");
+
+        RemoteCacheManager remoteCacheManager = new 
RemoteCacheManager(clientBuilder.build());
+        RemoteCache<Object, Object> cache = 
remoteCacheManager.getCache("default");
+        return cache;
+    }
+}
diff --git 
a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainersProducerTest.java
 
b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainersProducerTest.java
new file mode 100644
index 0000000..3affdb3
--- /dev/null
+++ 
b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainersProducerTest.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.infinispan.testcontainers;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.infinispan.InfinispanConstants;
+import org.infinispan.client.hotrod.RemoteCache;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class InfinispanTestContainersProducerTest extends 
InfinispanTestContainerSupport {
+
+    private static final String COMMAND_VALUE = "commandValue";
+    private static final String COMMAND_KEY = "commandKey1";
+    private RemoteCache<Object, Object> cache;
+
+    @BeforeAll
+    public void init() {
+        cache = getDefaultCache();
+    }
+
+    @Test
+    public void testUriCommandOption() throws Exception {
+        template.send("direct:put", new Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(InfinispanConstants.KEY, 
COMMAND_KEY);
+                exchange.getIn().setHeader(InfinispanConstants.VALUE, 
COMMAND_VALUE);
+            }
+        });
+        String result = (String) cache.get(COMMAND_KEY);
+        assertEquals(COMMAND_VALUE, result);
+
+        Exchange exchange;
+        exchange = template.send("direct:get", new Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(InfinispanConstants.KEY, 
COMMAND_KEY);
+            }
+        });
+        String resultGet = exchange.getIn().getBody(String.class);
+        assertEquals(COMMAND_VALUE, resultGet);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct:put")
+                        
.to("infinispan:default?cacheContainer=#cacheContainer&operation=PUT&user=admin&password=password&secure=true");
+                from("direct:get")
+                        
.to("infinispan:default?cacheContainer=#cacheContainer&operation=GET&user=admin&password=password&secure=true");
+            }
+        };
+    }
+}
diff --git a/components/camel-infinispan/src/test/resources/log4j2.properties 
b/components/camel-infinispan/src/test/resources/log4j2.properties
index 222588b..7805985 100644
--- a/components/camel-infinispan/src/test/resources/log4j2.properties
+++ b/components/camel-infinispan/src/test/resources/log4j2.properties
@@ -31,6 +31,6 @@ rootLogger.appenderRef.file.ref = file
 logger.infinispan-camel.name = org.apache.camel.component.infinispan
 logger.infinispan-camel.level = INFO
 logger.infinispan.name = org.infinispan
-logger.infinispan.level = TRACE
+logger.infinispan.level = INFO
 logger.jgroups.name = org.jgroups
-logger.jgroups.level = TRACE
+logger.jgroups.level = INFO
diff --git 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/InfinispanComponentBuilderFactory.java
 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/InfinispanComponentBuilderFactory.java
index ab00d26..7b2f8cc 100644
--- 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/InfinispanComponentBuilderFactory.java
+++ 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/InfinispanComponentBuilderFactory.java
@@ -87,6 +87,18 @@ public interface InfinispanComponentBuilderFactory {
             return this;
         }
         /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanComponentBuilder secure(boolean secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions occurred while the consumer is trying to
          * pickup incoming messages, or the likes, will now be processed as a
@@ -256,6 +268,28 @@ public interface InfinispanComponentBuilderFactory {
             return this;
         }
         /**
+         * Define the password to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanComponentBuilder password(java.lang.String password) 
{
+            doSetProperty("password", password);
+            return this;
+        }
+        /**
+         * Define the username to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanComponentBuilder username(java.lang.String username) 
{
+            doSetProperty("username", username);
+            return this;
+        }
+        /**
          * Whether the component should use basic property binding (Camel 2.x)
          * or the newer property binding with additional capabilities.
          * 
@@ -394,6 +428,7 @@ public interface InfinispanComponentBuilderFactory {
             case "configuration": ((InfinispanComponent) 
component).setConfiguration((org.apache.camel.component.infinispan.InfinispanConfiguration)
 value); return true;
             case "hosts": getOrCreateConfiguration((InfinispanComponent) 
component).setHosts((java.lang.String) value); return true;
             case "queryBuilder": 
getOrCreateConfiguration((InfinispanComponent) 
component).setQueryBuilder((org.apache.camel.component.infinispan.InfinispanQueryBuilder)
 value); return true;
+            case "secure": getOrCreateConfiguration((InfinispanComponent) 
component).setSecure((boolean) value); return true;
             case "bridgeErrorHandler": ((InfinispanComponent) 
component).setBridgeErrorHandler((boolean) value); return true;
             case "clusteredListener": 
getOrCreateConfiguration((InfinispanComponent) 
component).setClusteredListener((boolean) value); return true;
             case "command": getOrCreateConfiguration((InfinispanComponent) 
component).setCommand((java.lang.String) value); return true;
@@ -406,6 +441,8 @@ public interface InfinispanComponentBuilderFactory {
             case "oldValue": getOrCreateConfiguration((InfinispanComponent) 
component).setOldValue((java.lang.Object) value); return true;
             case "operation": getOrCreateConfiguration((InfinispanComponent) 
component).setOperation((org.apache.camel.component.infinispan.InfinispanOperation)
 value); return true;
             case "value": getOrCreateConfiguration((InfinispanComponent) 
component).setValue((java.lang.Object) value); return true;
+            case "password": getOrCreateConfiguration((InfinispanComponent) 
component).setPassword((java.lang.String) value); return true;
+            case "username": getOrCreateConfiguration((InfinispanComponent) 
component).setUsername((java.lang.String) value); return true;
             case "basicPropertyBinding": ((InfinispanComponent) 
component).setBasicPropertyBinding((boolean) value); return true;
             case "cacheContainer": 
getOrCreateConfiguration((InfinispanComponent) 
component).setCacheContainer((org.infinispan.commons.api.BasicCacheContainer) 
value); return true;
             case "cacheContainerConfiguration": 
getOrCreateConfiguration((InfinispanComponent) 
component).setCacheContainerConfiguration((java.lang.Object) value); return 
true;
diff --git 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfinispanEndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfinispanEndpointBuilderFactory.java
index 3f82286..f974c1b 100644
--- 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfinispanEndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfinispanEndpointBuilderFactory.java
@@ -82,6 +82,30 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointConsumerBuilder secure(boolean secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointConsumerBuilder secure(String secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions occurred while the consumer is trying to
          * pickup incoming messages, or the likes, will now be processed as a
@@ -247,6 +271,28 @@ public interface InfinispanEndpointBuilderFactory {
             doSetProperty("sync", sync);
             return this;
         }
+        /**
+         * Define the password to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointConsumerBuilder password(String password) {
+            doSetProperty("password", password);
+            return this;
+        }
+        /**
+         * Define the username to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointConsumerBuilder username(String username) {
+            doSetProperty("username", username);
+            return this;
+        }
     }
 
     /**
@@ -605,6 +651,30 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointProducerBuilder secure(boolean secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointProducerBuilder secure(String secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
          * Set a specific default value for some producer operations.
          * 
          * The option is a: <code>java.lang.Object</code> type.
@@ -763,6 +833,28 @@ public interface InfinispanEndpointBuilderFactory {
             doSetProperty("value", value);
             return this;
         }
+        /**
+         * Define the password to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointProducerBuilder password(String password) {
+            doSetProperty("password", password);
+            return this;
+        }
+        /**
+         * Define the username to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointProducerBuilder username(String username) {
+            doSetProperty("username", username);
+            return this;
+        }
     }
 
     /**
@@ -1062,6 +1154,52 @@ public interface InfinispanEndpointBuilderFactory {
             doSetProperty("queryBuilder", queryBuilder);
             return this;
         }
+        /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointBuilder secure(boolean secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
+         * Define if we are connecting to a secured Infinispan instance.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default InfinispanEndpointBuilder secure(String secure) {
+            doSetProperty("secure", secure);
+            return this;
+        }
+        /**
+         * Define the password to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointBuilder password(String password) {
+            doSetProperty("password", password);
+            return this;
+        }
+        /**
+         * Define the username to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointBuilder username(String username) {
+            doSetProperty("username", username);
+            return this;
+        }
     }
 
     /**
diff --git a/docs/components/modules/ROOT/pages/infinispan-component.adoc 
b/docs/components/modules/ROOT/pages/infinispan-component.adoc
index 7d81001..138a463 100644
--- a/docs/components/modules/ROOT/pages/infinispan-component.adoc
+++ b/docs/components/modules/ROOT/pages/infinispan-component.adoc
@@ -65,7 +65,7 @@ If no cache configuration is provided, embedded 
cacheContainer is created direct
 
 
 // component options: START
-The Infinispan component supports 23 options, which are listed below.
+The Infinispan component supports 26 options, which are listed below.
 
 
 
@@ -75,6 +75,7 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *configuration* (common) | Component configuration |  | 
InfinispanConfiguration
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -87,6 +88,8 @@ The Infinispan component supports 23 options, which are 
listed below.
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | *Deprecated* Whether the component 
should use basic property binding (Camel 2.x) or the newer property binding 
with additional capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object
@@ -120,7 +123,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (25 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -128,6 +131,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *hosts* (common) | Specifies the host of the cache on Infinispan instance |  
| String
 | *queryBuilder* (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
+| *secure* (common) | Define if we are connecting to a secured Infinispan 
instance | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *clusteredListener* (consumer) | If true, the listener will be installed for 
the entire cluster | false | boolean
 | *command* (consumer) | *Deprecated* The operation to perform. | PUT | String
@@ -142,6 +146,8 @@ with the following path and query parameters:
 | *oldValue* (producer) | Set a specific old value for some producer 
operations |  | Object
 | *operation* (producer) | The operation to perform. There are 21 enums and 
the value can be one of: PUT, PUTASYNC, PUTALL, PUTALLASYNC, PUTIFABSENT, 
PUTIFABSENTASYNC, GET, GETORDEFAULT, CONTAINSKEY, CONTAINSVALUE, REMOVE, 
REMOVEASYNC, REPLACE, REPLACEASYNC, SIZE, CLEAR, CLEARASYNC, QUERY, STATS, 
COMPUTE, COMPUTEASYNC | PUT | InfinispanOperation
 | *value* (producer) | Set a specific value for producer operations |  | Object
+| *password* ( security) | Define the password to access the infinispan 
instance |  | String
+| *username* ( security) | Define the username to access the infinispan 
instance |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
 | *cacheContainer* (advanced) | Specifies the cache Container to connect |  | 
BasicCacheContainer
 | *cacheContainerConfiguration* (advanced) | The CacheContainer configuration. 
Uses if the cacheContainer is not defined. Must be the following types: 
org.infinispan.client.hotrod.configuration.Configuration - for remote cache 
interaction configuration; org.infinispan.configuration.cache.Configuration - 
for embedded cache interaction configuration; |  | Object

Reply via email to