You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/02 16:53:00 UTC

[camel] branch master updated (61bd453 -> 248972f)

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

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


    from 61bd453  CAMEL-15606: camel-core - Simple with bean function should resolve language once
     new 3173b5b  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
     new d51dda9  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
     new 5888a03  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
     new fe344f3  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SASLMechanism option
     new 942714f  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, ServerRealm Option
     new 5159c05  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SecurityServerName option
     new 74a2418  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, regen catalog
     new 248972f  CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, secure is already false by default

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/components/infinispan.json       |  12 +
 .../camel/catalog/docs/infinispan-component.adoc   |  16 +-
 components/camel-infinispan/pom.xml                | 170 ++++++--------
 .../infinispan/InfinispanComponentConfigurer.java  |  24 ++
 .../infinispan/InfinispanEndpointConfigurer.java   |  24 ++
 .../infinispan/InfinispanEndpointUriFactory.java   |   8 +-
 .../camel/component/infinispan/infinispan.json     |  12 +
 .../src/main/docs/infinispan-component.adoc        |  16 +-
 .../infinispan/InfinispanConfiguration.java        |  78 +++++++
 .../component/infinispan/InfinispanManager.java    |  20 ++
 .../infinispan/InfinispanComponentTest.java        |  61 ------
 .../InfinispanTestContainerSupport.java            |  65 ++++++
 .../InfinispanTestContainersProducerTest.java      |  75 +++++++
 .../camel-infinispan/src/test/resources/log4j.xml  |  88 --------
 .../src/test/resources/log4j2.properties           |   4 +-
 .../dsl/InfinispanComponentBuilderFactory.java     |  76 +++++++
 .../dsl/InfinispanEndpointBuilderFactory.java      | 244 +++++++++++++++++++++
 .../modules/ROOT/pages/infinispan-component.adoc   |  16 +-
 pom.xml                                            |   2 +-
 19 files changed, 746 insertions(+), 265 deletions(-)
 delete mode 100644 components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentTest.java
 create mode 100644 components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainerSupport.java
 create mode 100644 components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/testcontainers/InfinispanTestContainersProducerTest.java
 delete mode 100644 components/camel-infinispan/src/test/resources/log4j.xml


[camel] 08/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, secure is already false by default

Posted by ac...@apache.org.
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 248972fa0e84ea398016345168b859f9d5068b57
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 18:41:25 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, secure is already false by default
---
 .../org/apache/camel/component/infinispan/InfinispanConfiguration.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 db5fa60..7671f02 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
@@ -71,7 +71,7 @@ public class InfinispanConfiguration implements Cloneable {
     @UriParam(label = "advanced")
     private BiFunction remappingFunction;
     @UriParam(label = "common", defaultValue = "false")
-    private boolean secure = false;
+    private boolean secure;
     @UriParam(label = "common, security")
     private String username;
     @UriParam(label = "common, security", secret = true)


[camel] 05/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, ServerRealm Option

Posted by ac...@apache.org.
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 942714fca9e0a6449fa168156fbd4afa93e4ce3b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 17:24:16 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, ServerRealm Option
---
 .../camel/catalog/docs/infinispan-component.adoc   |  6 ++--
 .../infinispan/InfinispanComponentConfigurer.java  |  5 ++++
 .../infinispan/InfinispanEndpointConfigurer.java   |  5 ++++
 .../infinispan/InfinispanEndpointUriFactory.java   |  3 +-
 .../camel/component/infinispan/infinispan.json     |  2 ++
 .../src/main/docs/infinispan-component.adoc        |  6 ++--
 .../infinispan/InfinispanConfiguration.java        | 12 ++++++++
 .../component/infinispan/InfinispanManager.java    |  3 ++
 .../InfinispanTestContainersProducerTest.java      |  4 +--
 .../dsl/InfinispanComponentBuilderFactory.java     | 13 ++++++++
 .../dsl/InfinispanEndpointBuilderFactory.java      | 35 ++++++++++++++++++++++
 .../modules/ROOT/pages/infinispan-component.adoc   |  6 ++--
 12 files changed, 91 insertions(+), 9 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 a21ffa9..745dccc 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 27 options, which are listed below.
+The Infinispan component supports 28 options, which are listed below.
 
 
 
@@ -88,6 +88,7 @@ The Infinispan component supports 27 options, which are listed below.
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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
@@ -122,7 +123,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (29 parameters):
+=== Query Parameters (30 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -147,6 +148,7 @@ with the following path and query parameters:
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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
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 d9abfe8..25651be 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
@@ -36,6 +36,7 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         map.put("value", java.lang.Object.class);
         map.put("password", java.lang.String.class);
         map.put("saslMechanism", java.lang.String.class);
+        map.put("securityRealm", 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);
@@ -99,6 +100,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         case "saslmechanism":
         case "saslMechanism": getOrCreateConfiguration(target).setSaslMechanism(property(camelContext, java.lang.String.class, value)); return true;
         case "secure": getOrCreateConfiguration(target).setSecure(property(camelContext, boolean.class, value)); return true;
+        case "securityrealm":
+        case "securityRealm": getOrCreateConfiguration(target).setSecurityRealm(property(camelContext, java.lang.String.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;
@@ -155,6 +158,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         case "saslmechanism":
         case "saslMechanism": return getOrCreateConfiguration(target).getSaslMechanism();
         case "secure": return getOrCreateConfiguration(target).isSecure();
+        case "securityrealm":
+        case "securityRealm": return getOrCreateConfiguration(target).getSecurityRealm();
         case "sync": return getOrCreateConfiguration(target).isSync();
         case "username": return getOrCreateConfiguration(target).getUsername();
         case "value": return getOrCreateConfiguration(target).getValue();
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 3257822..deed934 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
@@ -38,6 +38,7 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         map.put("value", java.lang.Object.class);
         map.put("password", java.lang.String.class);
         map.put("saslMechanism", java.lang.String.class);
+        map.put("securityRealm", 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);
@@ -98,6 +99,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         case "saslmechanism":
         case "saslMechanism": target.getConfiguration().setSaslMechanism(property(camelContext, java.lang.String.class, value)); return true;
         case "secure": target.getConfiguration().setSecure(property(camelContext, boolean.class, value)); return true;
+        case "securityrealm":
+        case "securityRealm": target.getConfiguration().setSecurityRealm(property(camelContext, java.lang.String.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;
@@ -158,6 +161,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         case "saslmechanism":
         case "saslMechanism": return target.getConfiguration().getSaslMechanism();
         case "secure": return target.getConfiguration().isSecure();
+        case "securityrealm":
+        case "securityRealm": return target.getConfiguration().getSecurityRealm();
         case "sync": return target.getConfiguration().isSync();
         case "synchronous": return target.isSynchronous();
         case "username": return target.getConfiguration().getUsername();
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 e70d3ae..9d84845 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,7 +18,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
 
     private static final Set<String> PROPERTY_NAMES;
     static {
-        Set<String> set = new HashSet<>(30);
+        Set<String> set = new HashSet<>(31);
         set.add("cacheName");
         set.add("hosts");
         set.add("queryBuilder");
@@ -39,6 +39,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
         set.add("value");
         set.add("password");
         set.add("saslMechanism");
+        set.add("securityRealm");
         set.add("username");
         set.add("basicPropertyBinding");
         set.add("cacheContainer");
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 381ab9b..f4c0cca4 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
@@ -40,6 +40,7 @@
     "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" },
     "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
+    "securityRealm": { "kind": "property", "displayName": "Security Realm", "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 security realm 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" },
@@ -71,6 +72,7 @@
     "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" },
     "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
+    "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "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 security realm 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" },
diff --git a/components/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index a21ffa9..745dccc 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 27 options, which are listed below.
+The Infinispan component supports 28 options, which are listed below.
 
 
 
@@ -88,6 +88,7 @@ The Infinispan component supports 27 options, which are listed below.
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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
@@ -122,7 +123,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (29 parameters):
+=== Query Parameters (30 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -147,6 +148,7 @@ with the following path and query parameters:
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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
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 876eb5b..21bd1c8 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
@@ -78,6 +78,8 @@ public class InfinispanConfiguration implements Cloneable {
     private String password;
     @UriParam(label = "common, security")
     private String saslMechanism;
+    @UriParam(label = "common, security")
+    private String securityRealm;
 
     public String getCommand() {
         return operation.toString();
@@ -407,4 +409,14 @@ public class InfinispanConfiguration implements Cloneable {
         this.saslMechanism = saslMechanism;
     }
 
+    public String getSecurityRealm() {
+        return securityRealm;
+    }
+
+    /**
+     * Define the security realm to access the infinispan instance
+     */
+    public void setSecurityRealm(String securityRealm) {
+        this.securityRealm = securityRealm;
+    }
 }
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 b379370..4bc7e06 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
@@ -110,6 +110,9 @@ public class InfinispanManager extends ServiceSupport {
                     if (ObjectHelper.isNotEmpty(configuration.getSaslMechanism())) {
                         builder.security().authentication().saslMechanism(configuration.getSaslMechanism());
                     }
+                    if (ObjectHelper.isNotEmpty(configuration.getSecurityRealm())) {
+                        builder.security().authentication().realm(configuration.getSecurityRealm());
+                    }
                 }
 
                 Properties properties = new Properties();
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
index 8b52002..bd96154 100644
--- 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
@@ -65,10 +65,10 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
             public void configure() {
                 from("direct:put")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=PUT&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)");
+                            + "&operation=PUT&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default");
                 from("direct:get")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=GET&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)");
+                            + "&operation=GET&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default");
             }
         };
     }
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 ffaece0..8de54aa 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
@@ -291,6 +291,18 @@ public interface InfinispanComponentBuilderFactory {
             return this;
         }
         /**
+         * Define the security realm to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanComponentBuilder securityRealm(
+                java.lang.String securityRealm) {
+            doSetProperty("securityRealm", securityRealm);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -455,6 +467,7 @@ public interface InfinispanComponentBuilderFactory {
             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 "saslMechanism": getOrCreateConfiguration((InfinispanComponent) component).setSaslMechanism((java.lang.String) value); return true;
+            case "securityRealm": getOrCreateConfiguration((InfinispanComponent) component).setSecurityRealm((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;
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 f150885..ca5d778 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
@@ -295,6 +295,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security realm to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointConsumerBuilder securityRealm(
+                String securityRealm) {
+            doSetProperty("securityRealm", securityRealm);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -869,6 +881,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security realm to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointProducerBuilder securityRealm(
+                String securityRealm) {
+            doSetProperty("securityRealm", securityRealm);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1225,6 +1249,17 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security realm to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointBuilder securityRealm(String securityRealm) {
+            doSetProperty("securityRealm", securityRealm);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
diff --git a/docs/components/modules/ROOT/pages/infinispan-component.adoc b/docs/components/modules/ROOT/pages/infinispan-component.adoc
index 7134025..41584f4 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 27 options, which are listed below.
+The Infinispan component supports 28 options, which are listed below.
 
 
 
@@ -90,6 +90,7 @@ The Infinispan component supports 27 options, which are listed below.
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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
@@ -124,7 +125,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (29 parameters):
+=== Query Parameters (30 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -149,6 +150,7 @@ with the following path and query parameters:
 | *value* (producer) | Set a specific value for producer operations |  | Object
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
+| *securityRealm* ( security) | Define the security realm 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


[camel] 01/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options

Posted by ac...@apache.org.
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 <an...@gmail.com>
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


[camel] 04/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SASLMechanism option

Posted by ac...@apache.org.
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 fe344f3b155ba81339fca24f951a0d370f9098c5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 17:20:45 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SASLMechanism option
---
 .../camel/catalog/docs/infinispan-component.adoc   |  6 ++--
 .../infinispan/InfinispanComponentConfigurer.java  |  5 ++++
 .../infinispan/InfinispanEndpointConfigurer.java   |  5 ++++
 .../infinispan/InfinispanEndpointUriFactory.java   |  3 +-
 .../camel/component/infinispan/infinispan.json     |  2 ++
 .../src/main/docs/infinispan-component.adoc        |  6 ++--
 .../infinispan/InfinispanConfiguration.java        | 14 +++++++++
 .../component/infinispan/InfinispanManager.java    |  3 ++
 .../InfinispanTestContainersProducerTest.java      |  4 +--
 .../dsl/InfinispanComponentBuilderFactory.java     | 13 ++++++++
 .../dsl/InfinispanEndpointBuilderFactory.java      | 35 ++++++++++++++++++++++
 .../modules/ROOT/pages/infinispan-component.adoc   |  6 ++--
 12 files changed, 93 insertions(+), 9 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 991d779..a21ffa9 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 26 options, which are listed below.
+The Infinispan component supports 27 options, which are listed below.
 
 
 
@@ -87,6 +87,7 @@ The Infinispan component supports 26 options, which are listed below.
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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
@@ -121,7 +122,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (28 parameters):
+=== Query Parameters (29 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -145,6 +146,7 @@ with the following path and query parameters:
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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
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 e9597fe..d9abfe8 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
@@ -35,6 +35,7 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         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("saslMechanism", 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);
@@ -95,6 +96,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         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 "saslmechanism":
+        case "saslMechanism": getOrCreateConfiguration(target).setSaslMechanism(property(camelContext, java.lang.String.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;
@@ -149,6 +152,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         case "remappingFunction": return getOrCreateConfiguration(target).getRemappingFunction();
         case "resultheader":
         case "resultHeader": return getOrCreateConfiguration(target).getResultHeader();
+        case "saslmechanism":
+        case "saslMechanism": return getOrCreateConfiguration(target).getSaslMechanism();
         case "secure": return getOrCreateConfiguration(target).isSecure();
         case "sync": return getOrCreateConfiguration(target).isSync();
         case "username": return getOrCreateConfiguration(target).getUsername();
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 96e8cb9..3257822 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
@@ -37,6 +37,7 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         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("saslMechanism", 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);
@@ -94,6 +95,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         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 "saslmechanism":
+        case "saslMechanism": target.getConfiguration().setSaslMechanism(property(camelContext, java.lang.String.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;
@@ -152,6 +155,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         case "remappingFunction": return target.getConfiguration().getRemappingFunction();
         case "resultheader":
         case "resultHeader": return target.getConfiguration().getResultHeader();
+        case "saslmechanism":
+        case "saslMechanism": return target.getConfiguration().getSaslMechanism();
         case "secure": return target.getConfiguration().isSecure();
         case "sync": return target.getConfiguration().isSync();
         case "synchronous": return target.isSynchronous();
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 8f06638..e70d3ae 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,7 +18,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
 
     private static final Set<String> PROPERTY_NAMES;
     static {
-        Set<String> set = new HashSet<>(29);
+        Set<String> set = new HashSet<>(30);
         set.add("cacheName");
         set.add("hosts");
         set.add("queryBuilder");
@@ -38,6 +38,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
         set.add("operation");
         set.add("value");
         set.add("password");
+        set.add("saslMechanism");
         set.add("username");
         set.add("basicPropertyBinding");
         set.add("cacheContainer");
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 f67b20e..381ab9b 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
@@ -39,6 +39,7 @@
     "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" },
+    "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "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 SASL Mechanism 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" },
@@ -69,6 +70,7 @@
     "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" },
+    "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "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 SASL Mechanism 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" },
diff --git a/components/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index 991d779..a21ffa9 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 26 options, which are listed below.
+The Infinispan component supports 27 options, which are listed below.
 
 
 
@@ -87,6 +87,7 @@ The Infinispan component supports 26 options, which are listed below.
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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
@@ -121,7 +122,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (28 parameters):
+=== Query Parameters (29 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -145,6 +146,7 @@ with the following path and query parameters:
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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
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 18b4cab..876eb5b 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
@@ -76,6 +76,8 @@ public class InfinispanConfiguration implements Cloneable {
     private String username;
     @UriParam(label = "common, security", secret = true)
     private String password;
+    @UriParam(label = "common, security")
+    private String saslMechanism;
 
     public String getCommand() {
         return operation.toString();
@@ -393,4 +395,16 @@ public class InfinispanConfiguration implements Cloneable {
     public void setPassword(String password) {
         this.password = password;
     }
+
+    public String getSaslMechanism() {
+        return saslMechanism;
+    }
+
+    /**
+     * Define the SASL Mechanism to access the infinispan instance
+     */
+    public void setSaslMechanism(String saslMechanism) {
+        this.saslMechanism = saslMechanism;
+    }
+
 }
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 a072cb8..b379370 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
@@ -107,6 +107,9 @@ public class InfinispanManager extends ServiceSupport {
                         throw new IllegalArgumentException(
                                 "If the Infinispan instance is secured, username and password are needed");
                     }
+                    if (ObjectHelper.isNotEmpty(configuration.getSaslMechanism())) {
+                        builder.security().authentication().saslMechanism(configuration.getSaslMechanism());
+                    }
                 }
 
                 Properties properties = new Properties();
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
index f45aed28..8b52002 100644
--- 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
@@ -65,10 +65,10 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
             public void configure() {
                 from("direct:put")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=PUT&username=admin&password=password&secure=true");
+                            + "&operation=PUT&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)");
                 from("direct:get")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=GET&username=admin&password=password&secure=true");
+                            + "&operation=GET&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)");
             }
         };
     }
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 7b2f8cc..ffaece0 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
@@ -279,6 +279,18 @@ public interface InfinispanComponentBuilderFactory {
             return this;
         }
         /**
+         * Define the SASL Mechanism to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanComponentBuilder saslMechanism(
+                java.lang.String saslMechanism) {
+            doSetProperty("saslMechanism", saslMechanism);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -442,6 +454,7 @@ public interface InfinispanComponentBuilderFactory {
             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 "saslMechanism": getOrCreateConfiguration((InfinispanComponent) component).setSaslMechanism((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;
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 f974c1b..f150885 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
@@ -283,6 +283,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the SASL Mechanism to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointConsumerBuilder saslMechanism(
+                String saslMechanism) {
+            doSetProperty("saslMechanism", saslMechanism);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -845,6 +857,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the SASL Mechanism to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointProducerBuilder saslMechanism(
+                String saslMechanism) {
+            doSetProperty("saslMechanism", saslMechanism);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1190,6 +1214,17 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the SASL Mechanism to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointBuilder saslMechanism(String saslMechanism) {
+            doSetProperty("saslMechanism", saslMechanism);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
diff --git a/docs/components/modules/ROOT/pages/infinispan-component.adoc b/docs/components/modules/ROOT/pages/infinispan-component.adoc
index 138a463..7134025 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 26 options, which are listed below.
+The Infinispan component supports 27 options, which are listed below.
 
 
 
@@ -89,6 +89,7 @@ The Infinispan component supports 26 options, which are listed below.
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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
@@ -123,7 +124,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (28 parameters):
+=== Query Parameters (29 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -147,6 +148,7 @@ with the following path and query parameters:
 | *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
+| *saslMechanism* ( security) | Define the SASL Mechanism 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


[camel] 06/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SecurityServerName option

Posted by ac...@apache.org.
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 5159c05a55c999090e0d799332c4da39ced5710d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 17:27:51 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, SecurityServerName option
---
 .../camel/catalog/docs/infinispan-component.adoc   |  6 ++--
 .../infinispan/InfinispanComponentConfigurer.java  |  5 +++
 .../infinispan/InfinispanEndpointConfigurer.java   |  5 +++
 .../infinispan/InfinispanEndpointUriFactory.java   |  3 +-
 .../camel/component/infinispan/infinispan.json     |  2 ++
 .../src/main/docs/infinispan-component.adoc        |  6 ++--
 .../infinispan/InfinispanConfiguration.java        | 14 +++++++++
 .../component/infinispan/InfinispanManager.java    |  3 ++
 .../InfinispanTestContainersProducerTest.java      |  4 +--
 .../dsl/InfinispanComponentBuilderFactory.java     | 13 ++++++++
 .../dsl/InfinispanEndpointBuilderFactory.java      | 36 ++++++++++++++++++++++
 .../modules/ROOT/pages/infinispan-component.adoc   |  6 ++--
 12 files changed, 94 insertions(+), 9 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 745dccc..4614eff 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 28 options, which are listed below.
+The Infinispan component supports 29 options, which are listed below.
 
 
 
@@ -89,6 +89,7 @@ The Infinispan component supports 28 options, which are listed below.
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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
@@ -123,7 +124,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (30 parameters):
+=== Query Parameters (31 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -149,6 +150,7 @@ with the following path and query parameters:
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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
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 25651be..c1eee92 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
@@ -37,6 +37,7 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         map.put("password", java.lang.String.class);
         map.put("saslMechanism", java.lang.String.class);
         map.put("securityRealm", java.lang.String.class);
+        map.put("securityServerName", 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);
@@ -102,6 +103,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         case "secure": getOrCreateConfiguration(target).setSecure(property(camelContext, boolean.class, value)); return true;
         case "securityrealm":
         case "securityRealm": getOrCreateConfiguration(target).setSecurityRealm(property(camelContext, java.lang.String.class, value)); return true;
+        case "securityservername":
+        case "securityServerName": getOrCreateConfiguration(target).setSecurityServerName(property(camelContext, java.lang.String.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;
@@ -160,6 +163,8 @@ public class InfinispanComponentConfigurer extends PropertyConfigurerSupport imp
         case "secure": return getOrCreateConfiguration(target).isSecure();
         case "securityrealm":
         case "securityRealm": return getOrCreateConfiguration(target).getSecurityRealm();
+        case "securityservername":
+        case "securityServerName": return getOrCreateConfiguration(target).getSecurityServerName();
         case "sync": return getOrCreateConfiguration(target).isSync();
         case "username": return getOrCreateConfiguration(target).getUsername();
         case "value": return getOrCreateConfiguration(target).getValue();
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 deed934..ee98d37 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
@@ -39,6 +39,7 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         map.put("password", java.lang.String.class);
         map.put("saslMechanism", java.lang.String.class);
         map.put("securityRealm", java.lang.String.class);
+        map.put("securityServerName", 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);
@@ -101,6 +102,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         case "secure": target.getConfiguration().setSecure(property(camelContext, boolean.class, value)); return true;
         case "securityrealm":
         case "securityRealm": target.getConfiguration().setSecurityRealm(property(camelContext, java.lang.String.class, value)); return true;
+        case "securityservername":
+        case "securityServerName": target.getConfiguration().setSecurityServerName(property(camelContext, java.lang.String.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;
@@ -163,6 +166,8 @@ public class InfinispanEndpointConfigurer extends PropertyConfigurerSupport impl
         case "secure": return target.getConfiguration().isSecure();
         case "securityrealm":
         case "securityRealm": return target.getConfiguration().getSecurityRealm();
+        case "securityservername":
+        case "securityServerName": return target.getConfiguration().getSecurityServerName();
         case "sync": return target.getConfiguration().isSync();
         case "synchronous": return target.isSynchronous();
         case "username": return target.getConfiguration().getUsername();
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 9d84845..7c3272b 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,7 +18,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
 
     private static final Set<String> PROPERTY_NAMES;
     static {
-        Set<String> set = new HashSet<>(31);
+        Set<String> set = new HashSet<>(32);
         set.add("cacheName");
         set.add("hosts");
         set.add("queryBuilder");
@@ -40,6 +40,7 @@ public class InfinispanEndpointUriFactory extends org.apache.camel.support.compo
         set.add("password");
         set.add("saslMechanism");
         set.add("securityRealm");
+        set.add("securityServerName");
         set.add("username");
         set.add("basicPropertyBinding");
         set.add("cacheContainer");
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 f4c0cca4..b071eb0 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
@@ -41,6 +41,7 @@
     "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" },
     "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
     "securityRealm": { "kind": "property", "displayName": "Security Realm", "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 security realm to access the infinispan instance" },
+    "securityServerName": { "kind": "property", "displayName": "Security Server Name", "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 security server name 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" },
@@ -73,6 +74,7 @@
     "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" },
     "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
     "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "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 security realm to access the infinispan instance" },
+    "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "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 security server name 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" },
diff --git a/components/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index 745dccc..4614eff 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 28 options, which are listed below.
+The Infinispan component supports 29 options, which are listed below.
 
 
 
@@ -89,6 +89,7 @@ The Infinispan component supports 28 options, which are listed below.
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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
@@ -123,7 +124,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (30 parameters):
+=== Query Parameters (31 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -149,6 +150,7 @@ with the following path and query parameters:
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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
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 21bd1c8..db5fa60 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
@@ -80,6 +80,8 @@ public class InfinispanConfiguration implements Cloneable {
     private String saslMechanism;
     @UriParam(label = "common, security")
     private String securityRealm;
+    @UriParam(label = "common, security")
+    private String securityServerName;
 
     public String getCommand() {
         return operation.toString();
@@ -419,4 +421,16 @@ public class InfinispanConfiguration implements Cloneable {
     public void setSecurityRealm(String securityRealm) {
         this.securityRealm = securityRealm;
     }
+
+    public String getSecurityServerName() {
+        return securityServerName;
+    }
+
+    /**
+     * Define the security server name to access the infinispan instance
+     */
+    public void setSecurityServerName(String securityServerName) {
+        this.securityServerName = securityServerName;
+    }
+
 }
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 4bc7e06..8b4231b 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
@@ -113,6 +113,9 @@ public class InfinispanManager extends ServiceSupport {
                     if (ObjectHelper.isNotEmpty(configuration.getSecurityRealm())) {
                         builder.security().authentication().realm(configuration.getSecurityRealm());
                     }
+                    if (ObjectHelper.isNotEmpty(configuration.getSecurityServerName())) {
+                        builder.security().authentication().serverName(configuration.getSecurityServerName());
+                    }
                 }
 
                 Properties properties = new Properties();
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
index bd96154..ca35282 100644
--- 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
@@ -65,10 +65,10 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
             public void configure() {
                 from("direct:put")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=PUT&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default");
+                            + "&operation=PUT&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default&securityServerName=infinispan");
                 from("direct:get")
                         .to("infinispan:mycache?hosts=" + getInfispanUrl()
-                            + "&operation=GET&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default");
+                            + "&operation=GET&username=admin&password=password&secure=true&saslMechanism=RAW(DIGEST-MD5)&securityRealm=default&securityServerName=infinispan");
             }
         };
     }
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 8de54aa..c4962ad 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
@@ -303,6 +303,18 @@ public interface InfinispanComponentBuilderFactory {
             return this;
         }
         /**
+         * Define the security server name to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanComponentBuilder securityServerName(
+                java.lang.String securityServerName) {
+            doSetProperty("securityServerName", securityServerName);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -468,6 +480,7 @@ public interface InfinispanComponentBuilderFactory {
             case "password": getOrCreateConfiguration((InfinispanComponent) component).setPassword((java.lang.String) value); return true;
             case "saslMechanism": getOrCreateConfiguration((InfinispanComponent) component).setSaslMechanism((java.lang.String) value); return true;
             case "securityRealm": getOrCreateConfiguration((InfinispanComponent) component).setSecurityRealm((java.lang.String) value); return true;
+            case "securityServerName": getOrCreateConfiguration((InfinispanComponent) component).setSecurityServerName((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;
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 ca5d778..6ce41b4 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
@@ -307,6 +307,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security server name to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointConsumerBuilder securityServerName(
+                String securityServerName) {
+            doSetProperty("securityServerName", securityServerName);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -893,6 +905,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security server name to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointProducerBuilder securityServerName(
+                String securityServerName) {
+            doSetProperty("securityServerName", securityServerName);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1260,6 +1284,18 @@ public interface InfinispanEndpointBuilderFactory {
             return this;
         }
         /**
+         * Define the security server name to access the infinispan instance.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group:  security
+         */
+        default InfinispanEndpointBuilder securityServerName(
+                String securityServerName) {
+            doSetProperty("securityServerName", securityServerName);
+            return this;
+        }
+        /**
          * Define the username to access the infinispan instance.
          * 
          * The option is a: <code>java.lang.String</code> type.
diff --git a/docs/components/modules/ROOT/pages/infinispan-component.adoc b/docs/components/modules/ROOT/pages/infinispan-component.adoc
index 41584f4..e582a77 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 28 options, which are listed below.
+The Infinispan component supports 29 options, which are listed below.
 
 
 
@@ -91,6 +91,7 @@ The Infinispan component supports 28 options, which are listed below.
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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
@@ -125,7 +126,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (30 parameters):
+=== Query Parameters (31 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -151,6 +152,7 @@ with the following path and query parameters:
 | *password* ( security) | Define the password to access the infinispan instance |  | String
 | *saslMechanism* ( security) | Define the SASL Mechanism to access the infinispan instance |  | String
 | *securityRealm* ( security) | Define the security realm to access the infinispan instance |  | String
+| *securityServerName* ( security) | Define the security server name 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


[camel] 02/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options

Posted by ac...@apache.org.
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 d51dda994ba1b5717e82b80716f15f639ab572a3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 16:36:46 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
---
 components/camel-infinispan/pom.xml                | 20 -----
 .../infinispan/InfinispanComponentTest.java        | 61 ---------------
 .../InfinispanTestContainerSupport.java            | 14 ++--
 .../InfinispanTestContainersProducerTest.java      | 20 ++---
 .../camel-infinispan/src/test/resources/log4j.xml  | 88 ----------------------
 pom.xml                                            |  2 +-
 6 files changed, 19 insertions(+), 186 deletions(-)

diff --git a/components/camel-infinispan/pom.xml b/components/camel-infinispan/pom.xml
index b3f1681..f60c061 100644
--- a/components/camel-infinispan/pom.xml
+++ b/components/camel-infinispan/pom.xml
@@ -70,11 +70,6 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-junit5</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
             <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
@@ -121,21 +116,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-jcl</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-testcontainers-junit5</artifactId>
             <scope>test</scope>
diff --git a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentTest.java b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentTest.java
deleted file mode 100644
index 9750b17..0000000
--- a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.jupiter.api.Test;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-
-public class InfinispanComponentTest extends InfinispanTestSupport {
-    private final String cacheName = "default";
-
-    @Test
-    public void consumerReceivedEntryCreatedEventNotifications() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMinimumMessageCount(2);
-
-        namedCache(cacheName).put(KEY_ONE, VALUE_ONE);
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void producerPublishesKeyAndValue() throws Exception {
-        fluentTemplate()
-                .to("direct:start")
-                .withHeader(InfinispanConstants.KEY, KEY_ONE)
-                .withHeader(InfinispanConstants.VALUE, VALUE_ONE)
-                .send();
-
-        assertThat(namedCache(cacheName).get(KEY_ONE).toString(), is(VALUE_ONE));
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() {
-                fromF("infinispan:%s?cacheContainer=#cacheContainer&eventTypes=CACHE_ENTRY_CREATED", cacheName)
-                        .to("mock:result");
-                from("direct:start")
-                        .toF("infinispan:%s?cacheContainer=#cacheContainer", cacheName);
-            }
-        };
-    }
-}
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
index c875dd1..39128a1 100644
--- 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
@@ -18,6 +18,7 @@ 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.DefaultTemplate;
 import org.infinispan.client.hotrod.RemoteCache;
 import org.infinispan.client.hotrod.RemoteCacheManager;
 import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
@@ -39,7 +40,7 @@ public class InfinispanTestContainerSupport extends ContainerAwareTestSupport {
         return new GenericContainer(CONTAINER_IMAGE)
                 .withNetworkAliases(CONTAINER_NAME)
                 .withEnv("USER", "admin")
-                .withEnv("PASSWORD", "password")
+                .withEnv("PASS", "password")
                 .withExposedPorts(11222)
                 .waitingFor(Wait.forListeningPort())
                 .waitingFor(Wait.forLogMessageContaining("Infinispan Server 11.0.3.Final started", 1));
@@ -52,13 +53,14 @@ public class InfinispanTestContainerSupport extends ContainerAwareTestSupport {
                 getContainerPort(CONTAINER_NAME, 11222));
     }
 
-    public RemoteCache<Object, Object> getDefaultCache() {
+    public RemoteCacheManager createAndGetDefaultCache() {
         ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
-        clientBuilder.addServer().host(getContainerHost(CONTAINER_NAME)).port(11222)
-                .security().authentication().username("user").password("password");
+        clientBuilder.addServer().host(getContainerHost(CONTAINER_NAME)).port(getContainerPort(CONTAINER_NAME, 11222))
+                .security().authentication().username("admin").password("password").serverName("infinispan")
+                .saslMechanism("DIGEST-MD5").realm("default").remoteCache("mycache").templateName(DefaultTemplate.DIST_SYNC);
 
         RemoteCacheManager remoteCacheManager = new RemoteCacheManager(clientBuilder.build());
-        RemoteCache<Object, Object> cache = remoteCacheManager.getCache("default");
-        return cache;
+        remoteCacheManager.getCache("mycache");
+        return remoteCacheManager;
     }
 }
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
index 3affdb3..f45aed28 100644
--- 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
@@ -20,8 +20,8 @@ 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.infinispan.client.hotrod.RemoteCacheManager;
+import org.junit.Before;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -30,11 +30,11 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
 
     private static final String COMMAND_VALUE = "commandValue";
     private static final String COMMAND_KEY = "commandKey1";
-    private RemoteCache<Object, Object> cache;
+    private RemoteCacheManager remoteCacheManager;
 
-    @BeforeAll
-    public void init() {
-        cache = getDefaultCache();
+    @Before
+    public void doPreSetup() {
+        remoteCacheManager = createAndGetDefaultCache();
     }
 
     @Test
@@ -46,8 +46,6 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
                 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() {
@@ -66,9 +64,11 @@ public class InfinispanTestContainersProducerTest extends InfinispanTestContaine
             @Override
             public void configure() {
                 from("direct:put")
-                        .to("infinispan:default?cacheContainer=#cacheContainer&operation=PUT&user=admin&password=password&secure=true");
+                        .to("infinispan:mycache?hosts=" + getInfispanUrl()
+                            + "&operation=PUT&username=admin&password=password&secure=true");
                 from("direct:get")
-                        .to("infinispan:default?cacheContainer=#cacheContainer&operation=GET&user=admin&password=password&secure=true");
+                        .to("infinispan:mycache?hosts=" + getInfispanUrl()
+                            + "&operation=GET&username=admin&password=password&secure=true");
             }
         };
     }
diff --git a/components/camel-infinispan/src/test/resources/log4j.xml b/components/camel-infinispan/src/test/resources/log4j.xml
deleted file mode 100644
index e4081f2..0000000
--- a/components/camel-infinispan/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    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.
-
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-    <appender name="FILE" class="org.apache.log4j.FileAppender">
-        <param name="File" value="target/camel-infinispan-test.log" />
-        <param name="Append" value="true" />
-        <param name="Threshold" value="INFO" />
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d [%-15.15t] %-5p %-30.30c{1} - %m%n" />
-        </layout>
-    </appender>
-
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <param name="Threshold" value="INFO" />
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%30.30t] %-30.30c{1} %-5p %m%n" />
-        </layout>
-    </appender>
-
-    <!-- ================ -->
-    <!-- Limit categories -->
-    <!-- ================ -->
-    <category name="org.jboss.arquillian">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.infinispan.arquillian.core.WithRunningServerObserver">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.infinispan.server.test.util.TestsuiteListener">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.apache.http">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.infinispan">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.jgroups">
-        <priority value="INFO" />
-    </category>
-
-    <category name="org.apache.commons.httpclient.auth">
-        <priority value="INFO"/>
-    </category>
-
-    <category name="org.apache.auth">
-        <priority value="INFO"/>
-    </category>
-    
-    <category name="org.apache.directory">
-        <priority value="WARN"/>
-    </category>
-
-    <!-- ======================= -->
-    <!-- Setup the Root category -->
-    <!-- ======================= -->
-
-    <root>
-        <priority value="INFO" />
-        <appender-ref ref="FILE" />
-    </root>
-
-</log4j:configuration>
diff --git a/pom.xml b/pom.xml
index 8c810a3..689b57e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,7 +113,7 @@
 
         <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
         <maven-javadoc-plugin-version>3.2.0</maven-javadoc-plugin-version>
-        <maven-surefire-plugin-version>3.0.0-M4</maven-surefire-plugin-version>
+        <maven-surefire-plugin-version>3.0.0-M5</maven-surefire-plugin-version>
         <!-- we need to override the version inherited from Apache POM for modules that use this POM as parent -->
         <surefire.version>${maven-surefire-plugin-version}</surefire.version>
         <formatter-maven-plugin.version>2.12.1</formatter-maven-plugin.version>


[camel] 07/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, regen catalog

Posted by ac...@apache.org.
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 74a24181d0b011ffd18767d81375e256166d4dbd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 18:10:05 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options, regen catalog
---
 .../org/apache/camel/catalog/components/infinispan.json      | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json
index e7d0613..b071eb0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/infinispan.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/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,11 @@
     "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" },
+    "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
+    "securityRealm": { "kind": "property", "displayName": "Security Realm", "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 security realm to access the infinispan instance" },
+    "securityServerName": { "kind": "property", "displayName": "Security Server Name", "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 security server name 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 +56,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 +71,11 @@
     "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" },
+    "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "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 SASL Mechanism to access the infinispan instance" },
+    "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "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 security realm to access the infinispan instance" },
+    "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "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 security server name 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 [...]


[camel] 03/08: CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options

Posted by ac...@apache.org.
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 5888a03ee9e05ff9d8c265df4ab7e22e36490d92
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 2 16:48:26 2020 +0200

    CAMEL-15603 - Camel-Infinispan: Support Authentication through URI options
---
 .../apache/camel/component/infinispan/InfinispanManager.java   | 10 ++++++++--
 .../testcontainers/InfinispanTestContainerSupport.java         |  1 -
 2 files changed, 8 insertions(+), 3 deletions(-)

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 2ccea72..a072cb8 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
@@ -99,8 +99,14 @@ public class InfinispanManager extends ServiceSupport {
                 }
 
                 if (configuration.isSecure()) {
-                    builder.security().authentication().username(configuration.getUsername())
-                            .password(configuration.getPassword());
+                    if (ObjectHelper.isNotEmpty(configuration.getUsername())
+                            && ObjectHelper.isNotEmpty(configuration.getPassword())) {
+                        builder.security().authentication().username(configuration.getUsername())
+                                .password(configuration.getPassword());
+                    } else {
+                        throw new IllegalArgumentException(
+                                "If the Infinispan instance is secured, username and password are needed");
+                    }
                 }
 
                 Properties properties = new Properties();
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
index 39128a1..3be8eee 100644
--- 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
@@ -19,7 +19,6 @@ 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.DefaultTemplate;
-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;