You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/02/29 08:52:51 UTC

[camel] branch master updated: CAMEL-14568 - Fixed camel-aws2-msk

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e8f3d9c  CAMEL-14568 - Fixed camel-aws2-msk
e8f3d9c is described below

commit e8f3d9cda218ffe2030cf8223dca7467ab6ef6d8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Feb 29 09:52:04 2020 +0100

    CAMEL-14568 - Fixed camel-aws2-msk
---
 .../aws2/msk/MSK2ComponentConfigurer.java          | 11 +++--
 .../component/aws2/msk/MSK2EndpointConfigurer.java |  8 ++--
 .../apache/camel/component/aws2/msk/aws2-msk.json  | 28 ++++++------
 .../src/main/docs/aws2-msk-component.adoc          | 10 ++---
 .../camel/component/aws2/msk/MSK2Component.java    | 46 +------------------
 .../component/aws2/msk/MSK2Configuration.java      | 12 ++---
 .../aws2/msk/MSKComponentConfigurationTest.java    | 16 +++----
 .../dsl/Aws2MskComponentBuilderFactory.java        | 52 +++++++++++-----------
 8 files changed, 70 insertions(+), 113 deletions(-)

diff --git a/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2ComponentConfigurer.java b/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2ComponentConfigurer.java
index 32c6e59..69b882a 100644
--- a/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2ComponentConfigurer.java
+++ b/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2ComponentConfigurer.java
@@ -22,8 +22,7 @@ public class MSK2ComponentConfigurer extends PropertyConfigurerSupport implement
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         MSK2Component target = (MSK2Component) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.msk.MSK2Configuration.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "mskclient":
@@ -35,13 +34,13 @@ public class MSK2ComponentConfigurer extends PropertyConfigurerSupport implement
         case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
         case "proxyprotocol":
         case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
-        case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
         case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
-        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.msk.MSK2Configuration.class, value)); return true;
+        case "accesskey":
+        case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git a/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2EndpointConfigurer.java b/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2EndpointConfigurer.java
index 34095f9..06e302c 100644
--- a/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2EndpointConfigurer.java
+++ b/components/camel-aws2-msk/src/generated/java/org/apache/camel/component/aws2/msk/MSK2EndpointConfigurer.java
@@ -15,8 +15,6 @@ public class MSK2EndpointConfigurer extends PropertyConfigurerSupport implements
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         MSK2Endpoint target = (MSK2Endpoint) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "mskclient":
@@ -29,11 +27,13 @@ public class MSK2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "proxyprotocol":
         case "proxyProtocol": target.getConfiguration().setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
         case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
+        case "accesskey":
+        case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git a/components/camel-aws2-msk/src/generated/resources/org/apache/camel/component/aws2/msk/aws2-msk.json b/components/camel-aws2-msk/src/generated/resources/org/apache/camel/component/aws2/msk/aws2-msk.json
index 603082e..8c2f80c 100644
--- a/components/camel-aws2-msk/src/generated/resources/org/apache/camel/component/aws2/msk/aws2-msk.json
+++ b/components/camel-aws2-msk/src/generated/resources/org/apache/camel/component/aws2/msk/aws2-msk.json
@@ -19,30 +19,30 @@
     "version": "3.2.0-SNAPSHOT"
   },
   "componentProperties": {
-    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
+    "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
-    "mskClient": { "kind": "property", "displayName": "Msk Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kafka.KafkaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS MSK as client" },
-    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Operations", "enum": [ "listClusters", "createCluster", "deleteCluster", "describeCluster" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The o [...]
-    "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MSK client" },
-    "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MSK client" },
+    "mskClient": { "kind": "property", "displayName": "Msk Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kafka.KafkaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS MSK as client" },
+    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Operations", "enum": [ "listClusters", "createCluster", "deleteCluster", "describeCluster" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The operation [...]
+    "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MSK client" },
+    "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MSK client" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MSK client" },
     "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The region in which MSK client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east [...]
-    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Configuration", "deprecated": false, "secret": false, "description": "The AWS MSK default configuration" }
+    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Logical name" },
-    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
-    "mskClient": { "kind": "parameter", "displayName": "Msk Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kafka.KafkaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS MSK as client" },
-    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Operations", "enum": [ "listClusters", "createCluster", "deleteCluster", "describeCluster" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The  [...]
-    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MSK client" },
-    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MSK client" },
+    "mskClient": { "kind": "parameter", "displayName": "Msk Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kafka.KafkaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS MSK as client" },
+    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.msk.MSK2Operations", "enum": [ "listClusters", "createCluster", "deleteCluster", "describeCluster" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The operatio [...]
+    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MSK client" },
+    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MSK client" },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MSK client" },
     "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "The region in which MSK client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-eas [...]
-    "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
     "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" },
-    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }
+    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
+    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+    "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.msk.MSK2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   }
 }
diff --git a/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc b/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
index d662e56..f60cada 100644
--- a/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
+++ b/components/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
@@ -45,7 +45,7 @@ The AWS 2 MSK component supports 11 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
+| *configuration* (producer) | Component configuration |  | MSK2Configuration
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *mskClient* (producer) | To use a existing configured AWS MSK as client |  | KafkaClient
 | *operation* (producer) | *Required* The operation to perform. The value can be one of: listClusters, createCluster, deleteCluster, describeCluster |  | MSK2Operations
@@ -53,9 +53,9 @@ The AWS 2 MSK component supports 11 options, which are listed below.
 | *proxyPort* (producer) | To define a proxy port when instantiating the MSK client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the MSK client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which MSK client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS MSK default configuration |  | MSK2Configuration
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // component options: END
 
@@ -87,7 +87,6 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *mskClient* (producer) | To use a existing configured AWS MSK as client |  | KafkaClient
 | *operation* (producer) | *Required* The operation to perform. The value can be one of: listClusters, createCluster, deleteCluster, describeCluster |  | MSK2Operations
@@ -95,9 +94,10 @@ with the following path and query parameters:
 | *proxyPort* (producer) | To define a proxy port when instantiating the MSK client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the MSK client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which MSK client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // endpoint options: END
 
diff --git a/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java b/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java
index dcfc6eb..ca92a4f 100644
--- a/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java
+++ b/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java
@@ -33,13 +33,7 @@ import software.amazon.awssdk.services.kafka.KafkaClient;
 public class MSK2Component extends DefaultComponent {
 
     @Metadata
-    private String accessKey;
-    @Metadata
-    private String secretKey;
-    @Metadata
-    private String region;
-    @Metadata(label = "advanced")
-    private MSK2Configuration configuration;
+    private MSK2Configuration configuration = new MSK2Configuration();
 
     public MSK2Component() {
         this(null);
@@ -55,9 +49,6 @@ public class MSK2Component extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         MSK2Configuration configuration = this.configuration != null ? this.configuration.copy() : new MSK2Configuration();
         MSK2Endpoint endpoint = new MSK2Endpoint(uri, this, configuration);
-        endpoint.getConfiguration().setAccessKey(accessKey);
-        endpoint.getConfiguration().setSecretKey(secretKey);
-        endpoint.getConfiguration().setRegion(region);
         setProperties(endpoint, parameters);
         checkAndSetRegistryClient(configuration);
         if (configuration.getMskClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -71,45 +62,12 @@ public class MSK2Component extends DefaultComponent {
     }
 
     /**
-     * The AWS MSK default configuration
+     * Component configuration
      */
     public void setConfiguration(MSK2Configuration configuration) {
         this.configuration = configuration;
     }
 
-    public String getAccessKey() {
-        return accessKey;
-    }
-
-    /**
-     * Amazon AWS Access Key
-     */
-    public void setAccessKey(String accessKey) {
-        this.accessKey = accessKey;
-    }
-
-    public String getSecretKey() {
-        return secretKey;
-    }
-
-    /**
-     * Amazon AWS Secret Key
-     */
-    public void setSecretKey(String secretKey) {
-        this.secretKey = secretKey;
-    }
-
-    public String getRegion() {
-        return region;
-    }
-
-    /**
-     * The region in which MSK client needs to work
-     */
-    public void setRegion(String region) {
-        this.region = region;
-    }
-
     private void checkAndSetRegistryClient(MSK2Configuration configuration) {
         Set<KafkaClient> clients = getCamelContext().getRegistry().findByType(KafkaClient.class);
         if (clients.size() == 1) {
diff --git a/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Configuration.java b/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Configuration.java
index a8e685a..fdc3b10 100644
--- a/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Configuration.java
+++ b/components/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Configuration.java
@@ -30,20 +30,20 @@ public class MSK2Configuration implements Cloneable {
     @UriPath(description = "Logical name")
     @Metadata(required = true)
     private String label;
-    @UriParam(label = "producer")
+    @UriParam
     private KafkaClient mskClient;
-    @UriParam(label = "producer", secret = true)
+    @UriParam(label = "security", secret = true)
     private String accessKey;
-    @UriParam(label = "producer", secret = true)
+    @UriParam(label = "security", secret = true)
     private String secretKey;
-    @UriParam(label = "producer")
+    @UriParam
     @Metadata(required = true)
     private MSK2Operations operation;
     @UriParam(enums = "HTTP,HTTPS", defaultValue = "HTTPS")
     private Protocol proxyProtocol = Protocol.HTTPS;
-    @UriParam(label = "producer")
+    @UriParam
     private String proxyHost;
-    @UriParam(label = "producer")
+    @UriParam
     private Integer proxyPort;
     @UriParam
     private String region;
diff --git a/components/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKComponentConfigurationTest.java b/components/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKComponentConfigurationTest.java
index 8c9b448..16ebbe8 100644
--- a/components/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKComponentConfigurationTest.java
+++ b/components/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKComponentConfigurationTest.java
@@ -26,8 +26,8 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentElements() throws Exception {
         MSK2Component component = context.getComponent("aws2-msk", MSK2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
         MSK2Endpoint endpoint = (MSK2Endpoint)component.createEndpoint("aws2-msk://label");
 
         assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
@@ -37,9 +37,9 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentAndEndpointElements() throws Exception {
         MSK2Component component = context.getComponent("aws2-msk", MSK2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         MSK2Endpoint endpoint = (MSK2Endpoint)component.createEndpoint("aws2-msk://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
 
         assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
@@ -50,9 +50,9 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
         MSK2Component component = context.getComponent("aws2-msk", MSK2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         MSK2Endpoint endpoint = (MSK2Endpoint)component
             .createEndpoint("aws2-msk://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MskComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MskComponentBuilderFactory.java
index ed2156e..086fc91 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MskComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MskComponentBuilderFactory.java
@@ -47,14 +47,17 @@ public interface Aws2MskComponentBuilderFactory {
      */
     interface Aws2MskComponentBuilder extends ComponentBuilder<MSK2Component> {
         /**
-         * Amazon AWS Access Key.
+         * Component configuration.
          * 
-         * The option is a: <code>java.lang.String</code> type.
+         * The option is a:
+         * <code>org.apache.camel.component.aws2.msk.MSK2Configuration</code>
+         * type.
          * 
          * Group: producer
          */
-        default Aws2MskComponentBuilder accessKey(java.lang.String accessKey) {
-            doSetProperty("accessKey", accessKey);
+        default Aws2MskComponentBuilder configuration(
+                org.apache.camel.component.aws2.msk.MSK2Configuration configuration) {
+            doSetProperty("configuration", configuration);
             return this;
         }
         /**
@@ -155,17 +158,6 @@ public interface Aws2MskComponentBuilderFactory {
             return this;
         }
         /**
-         * Amazon AWS Secret Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: producer
-         */
-        default Aws2MskComponentBuilder secretKey(java.lang.String secretKey) {
-            doSetProperty("secretKey", secretKey);
-            return this;
-        }
-        /**
          * Whether the component should use basic property binding (Camel 2.x)
          * or the newer property binding with additional capabilities.
          * 
@@ -180,17 +172,25 @@ public interface Aws2MskComponentBuilderFactory {
             return this;
         }
         /**
-         * The AWS MSK default configuration.
+         * Amazon AWS Access Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default Aws2MskComponentBuilder accessKey(java.lang.String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
          * 
-         * The option is a:
-         * <code>org.apache.camel.component.aws2.msk.MSK2Configuration</code>
-         * type.
+         * The option is a: <code>java.lang.String</code> type.
          * 
-         * Group: advanced
+         * Group: security
          */
-        default Aws2MskComponentBuilder configuration(
-                org.apache.camel.component.aws2.msk.MSK2Configuration configuration) {
-            doSetProperty("configuration", configuration);
+        default Aws2MskComponentBuilder secretKey(java.lang.String secretKey) {
+            doSetProperty("secretKey", secretKey);
             return this;
         }
     }
@@ -217,7 +217,7 @@ public interface Aws2MskComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "accessKey": ((MSK2Component) component).setAccessKey((java.lang.String) value); return true;
+            case "configuration": ((MSK2Component) component).setConfiguration((org.apache.camel.component.aws2.msk.MSK2Configuration) value); return true;
             case "lazyStartProducer": ((MSK2Component) component).setLazyStartProducer((boolean) value); return true;
             case "mskClient": getOrCreateConfiguration((MSK2Component) component).setMskClient((software.amazon.awssdk.services.kafka.KafkaClient) value); return true;
             case "operation": getOrCreateConfiguration((MSK2Component) component).setOperation((org.apache.camel.component.aws2.msk.MSK2Operations) value); return true;
@@ -225,9 +225,9 @@ public interface Aws2MskComponentBuilderFactory {
             case "proxyPort": getOrCreateConfiguration((MSK2Component) component).setProxyPort((java.lang.Integer) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((MSK2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
             case "region": getOrCreateConfiguration((MSK2Component) component).setRegion((java.lang.String) value); return true;
-            case "secretKey": ((MSK2Component) component).setSecretKey((java.lang.String) value); return true;
             case "basicPropertyBinding": ((MSK2Component) component).setBasicPropertyBinding((boolean) value); return true;
-            case "configuration": ((MSK2Component) component).setConfiguration((org.apache.camel.component.aws2.msk.MSK2Configuration) value); return true;
+            case "accessKey": getOrCreateConfiguration((MSK2Component) component).setAccessKey((java.lang.String) value); return true;
+            case "secretKey": getOrCreateConfiguration((MSK2Component) component).setSecretKey((java.lang.String) value); return true;
             default: return false;
             }
         }