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/02/28 15:58:05 UTC

[camel] 02/04: CAMEL-14568 - Fixed AWS SNS

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 86b133390023d56fd358ef964ada7f091792c726
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 28 16:48:54 2020 +0100

    CAMEL-14568 - Fixed AWS SNS
---
 .../component/aws/sns/SnsComponentConfigurer.java  | 11 ++--
 .../apache/camel/component/aws/sns/aws-sns.json    |  6 +-
 .../src/main/docs/aws-sns-component.adoc           |  6 +-
 .../camel/component/aws/sns/SnsComponent.java      | 49 +---------------
 .../aws/sns/SnsComponentConfigurationTest.java     | 22 ++++----
 .../dsl/AwsSnsComponentBuilderFactory.java         | 66 +++++++++++-----------
 6 files changed, 58 insertions(+), 102 deletions(-)

diff --git a/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
index 6b57de8..c16362f 100644
--- a/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
+++ b/components/camel-aws-sns/src/generated/java/org/apache/camel/component/aws/sns/SnsComponentConfigurer.java
@@ -22,14 +22,13 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         SnsComponent target = (SnsComponent) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "amazonsnsclient":
         case "amazonSNSClient": getOrCreateConfiguration(target).setAmazonSNSClient(property(camelContext, com.amazonaws.services.sns.AmazonSNS.class, value)); return true;
         case "amazonsqsclient":
         case "amazonSQSClient": getOrCreateConfiguration(target).setAmazonSQSClient(property(camelContext, com.amazonaws.services.sqs.AmazonSQS.class, value)); return true;
         case "autocreatetopic":
         case "autoCreateTopic": getOrCreateConfiguration(target).setAutoCreateTopic(property(camelContext, boolean.class, value)); return true;
+        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.sns.SnsConfiguration.class, value)); return true;
         case "kmsmasterkeyid":
         case "kmsMasterKeyId": getOrCreateConfiguration(target).setKmsMasterKeyId(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
@@ -45,10 +44,7 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
         case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
         case "queueurl":
         case "queueUrl": getOrCreateConfiguration(target).setQueueUrl(property(camelContext, java.lang.String.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 "serversideencryptionenabled":
         case "serverSideEncryptionEnabled": getOrCreateConfiguration(target).setServerSideEncryptionEnabled(property(camelContext, boolean.class, value)); return true;
         case "subject": getOrCreateConfiguration(target).setSubject(property(camelContext, java.lang.String.class, value)); return true;
@@ -56,7 +52,10 @@ public class SnsComponentConfigurer extends PropertyConfigurerSupport implements
         case "subscribeSNStoSQS": getOrCreateConfiguration(target).setSubscribeSNStoSQS(property(camelContext, boolean.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.aws.sns.SnsConfiguration.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-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json b/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
index e1089c2..bfb4869 100644
--- a/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
+++ b/components/camel-aws-sns/src/generated/resources/org/apache/camel/component/aws/sns/aws-sns.json
@@ -19,10 +19,10 @@
     "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" },
     "amazonSNSClient": { "kind": "property", "displayName": "Amazon SNSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sns.AmazonSNS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "To use the AmazonSNS as the client" },
     "amazonSQSClient": { "kind": "property", "displayName": "Amazon SQSClient", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.sqs.AmazonSQS", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "An SQS Client to use as bridge between SNS and SQS" },
     "autoCreateTopic": { "kind": "property", "displayName": "Auto Create Topic", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Setting the autocreation of the topic" },
+    "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.sns.SnsConfiguration", "deprecated": false, "secret": false, "description": "The component configuration" },
     "kmsMasterKeyId": { "kind": "property", "displayName": "Kms Master Key Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK." },
     "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 [...]
     "messageStructure": { "kind": "property", "displayName": "Message Structure", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The message structure to use such as json" },
@@ -32,12 +32,12 @@
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the SNS client" },
     "queueUrl": { "kind": "property", "displayName": "Queue Url", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The queueUrl to subscribe to" },
     "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.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The region in which SNS client needs to work. When using this parameter, the configuration will expect the capitalized 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" },
     "serverSideEncryptionEnabled": { "kind": "property", "displayName": "Server Side Encryption Enabled", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Define if Server Side Encryption is enabled or not on the topic" },
     "subject": { "kind": "property", "displayName": "Subject", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "The subject which is used if the message header 'CamelAwsSnsSubject' is not present." },
     "subscribeSNStoSQS": { "kind": "property", "displayName": "Subscribe SNSto SQS", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Define if the subscription between SNS Topic and SQS must be done or not" },
     "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.aws.sns.SnsConfiguration", "deprecated": false, "secret": false, "description": "The AWS SNS 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.aws.sns.SnsConfiguration", "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.aws.sns.SnsConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
     "topicNameOrArn": { "kind": "path", "displayName": "Topic Name Or Arn", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Topic name or ARN" },
diff --git a/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc b/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
index 3192664..82097dd 100644
--- a/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
+++ b/components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
@@ -40,10 +40,10 @@ The AWS Simple Notification System component supports 19 options, which are list
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
 | *amazonSNSClient* (producer) | To use the AmazonSNS as the client |  | AmazonSNS
 | *amazonSQSClient* (producer) | An SQS Client to use as bridge between SNS and SQS |  | AmazonSQS
 | *autoCreateTopic* (producer) | Setting the autocreation of the topic | true | boolean
+| *configuration* (producer) | The component configuration |  | SnsConfiguration
 | *kmsMasterKeyId* (producer) | The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. |  | 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 [...]
 | *messageStructure* (producer) | The message structure to use such as json |  | String
@@ -53,12 +53,12 @@ The AWS Simple Notification System component supports 19 options, which are list
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the SNS client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *queueUrl* (producer) | The queueUrl to subscribe to |  | String
 | *region* (producer) | The region in which SNS client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *serverSideEncryptionEnabled* (producer) | Define if Server Side Encryption is enabled or not on the topic | false | boolean
 | *subject* (producer) | The subject which is used if the message header 'CamelAwsSnsSubject' is not present. |  | String
 | *subscribeSNStoSQS* (producer) | Define if the subscription between SNS Topic and SQS must be done or not | false | boolean
 | *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 SNS default configuration |  | SnsConfiguration
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // component options: END
 
diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
index 7337cdd..2a34db1 100644
--- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
+++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
@@ -26,19 +26,12 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.util.ObjectHelper;
 
 @Component("aws-sns")
 public class SnsComponent extends DefaultComponent {
     
-    @Metadata
-    private String accessKey;
-    @Metadata
-    private String secretKey;
-    @Metadata
-    private String region;
-    @Metadata(label = "advanced")    
-    private SnsConfiguration configuration;
+    @Metadata  
+    private SnsConfiguration configuration = new SnsConfiguration();
     
     public SnsComponent() {
         this(null);
@@ -68,9 +61,6 @@ public class SnsComponent extends DefaultComponent {
             configuration.setTopicName(remaining);
         }
         SnsEndpoint endpoint = new SnsEndpoint(uri, this, configuration);
-        endpoint.getConfiguration().setAccessKey(accessKey);
-        endpoint.getConfiguration().setSecretKey(secretKey);
-        endpoint.getConfiguration().setRegion(region);
         setProperties(endpoint, parameters);
         checkAndSetRegistryClient(configuration);
         if (configuration.getAmazonSNSClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -85,44 +75,11 @@ public class SnsComponent extends DefaultComponent {
     }
 
     /**
-     * The AWS SNS default configuration
+     * The component configuration
      */
     public void setConfiguration(SnsConfiguration 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;
-    }
-    
-    /**
-     * The region in which SNS client needs to work
-     */
-    public String getRegion() {
-        return region;
-    }
-
-    public void setRegion(String region) {
-        this.region = region;
-    }
     
     private void checkAndSetRegistryClient(SnsConfiguration configuration) {
         Set<AmazonSNS> clients = getCamelContext().getRegistry().findByType(AmazonSNS.class);
diff --git a/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java b/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
index 1e723e1..f14367f 100644
--- a/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
+++ b/components/camel-aws-sns/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
@@ -175,8 +175,8 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentElements() throws Exception {
         SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
         SnsEndpoint endpoint = (SnsEndpoint)component.createEndpoint("aws-sns://MyTopic");
         
         assertEquals("MyTopic", endpoint.getConfiguration().getTopicName());
@@ -187,9 +187,9 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentAndEndpointElements() throws Exception {
         SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SnsEndpoint endpoint = (SnsEndpoint)component.createEndpoint("aws-sns://MyTopic?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
         
         assertEquals("MyTopic", endpoint.getConfiguration().getTopicName());
@@ -201,9 +201,9 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithoutAutocreation() throws Exception {
         SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SnsEndpoint endpoint = (SnsEndpoint)component.createEndpoint("aws-sns://MyTopic?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&autoCreateTopic=false");
         
         assertEquals("MyTopic", endpoint.getConfiguration().getTopicName());
@@ -216,9 +216,9 @@ public class SnsComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
         SnsComponent component = context.getComponent("aws-sns", SnsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SnsEndpoint endpoint = (SnsEndpoint)component.createEndpoint("aws-sns://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
         
         assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
index 2a64f66..a6c1c2d 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSnsComponentBuilderFactory.java
@@ -49,17 +49,6 @@ public interface AwsSnsComponentBuilderFactory {
      */
     interface AwsSnsComponentBuilder extends ComponentBuilder<SnsComponent> {
         /**
-         * Amazon AWS Access Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: producer
-         */
-        default AwsSnsComponentBuilder accessKey(java.lang.String accessKey) {
-            doSetProperty("accessKey", accessKey);
-            return this;
-        }
-        /**
          * To use the AmazonSNS as the client.
          * 
          * The option is a: <code>com.amazonaws.services.sns.AmazonSNS</code>
@@ -98,6 +87,20 @@ public interface AwsSnsComponentBuilderFactory {
             return this;
         }
         /**
+         * The component configuration.
+         * 
+         * The option is a:
+         * <code>org.apache.camel.component.aws.sns.SnsConfiguration</code>
+         * type.
+         * 
+         * Group: producer
+         */
+        default AwsSnsComponentBuilder configuration(
+                org.apache.camel.component.aws.sns.SnsConfiguration configuration) {
+            doSetProperty("configuration", configuration);
+            return this;
+        }
+        /**
          * The ID of an AWS-managed customer master key (CMK) for Amazon SNS or
          * a custom CMK.
          * 
@@ -215,17 +218,6 @@ public interface AwsSnsComponentBuilderFactory {
             return this;
         }
         /**
-         * Amazon AWS Secret Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: producer
-         */
-        default AwsSnsComponentBuilder secretKey(java.lang.String secretKey) {
-            doSetProperty("secretKey", secretKey);
-            return this;
-        }
-        /**
          * Define if Server Side Encryption is enabled or not on the topic.
          * 
          * The option is a: <code>boolean</code> type.
@@ -279,17 +271,25 @@ public interface AwsSnsComponentBuilderFactory {
             return this;
         }
         /**
-         * The AWS SNS default configuration.
+         * Amazon AWS Access Key.
          * 
-         * The option is a:
-         * <code>org.apache.camel.component.aws.sns.SnsConfiguration</code>
-         * type.
+         * The option is a: <code>java.lang.String</code> type.
          * 
-         * Group: advanced
+         * Group: security
          */
-        default AwsSnsComponentBuilder configuration(
-                org.apache.camel.component.aws.sns.SnsConfiguration configuration) {
-            doSetProperty("configuration", configuration);
+        default AwsSnsComponentBuilder accessKey(java.lang.String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default AwsSnsComponentBuilder secretKey(java.lang.String secretKey) {
+            doSetProperty("secretKey", secretKey);
             return this;
         }
     }
@@ -316,10 +316,10 @@ public interface AwsSnsComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "accessKey": ((SnsComponent) component).setAccessKey((java.lang.String) value); return true;
             case "amazonSNSClient": getOrCreateConfiguration((SnsComponent) component).setAmazonSNSClient((com.amazonaws.services.sns.AmazonSNS) value); return true;
             case "amazonSQSClient": getOrCreateConfiguration((SnsComponent) component).setAmazonSQSClient((com.amazonaws.services.sqs.AmazonSQS) value); return true;
             case "autoCreateTopic": getOrCreateConfiguration((SnsComponent) component).setAutoCreateTopic((boolean) value); return true;
+            case "configuration": ((SnsComponent) component).setConfiguration((org.apache.camel.component.aws.sns.SnsConfiguration) value); return true;
             case "kmsMasterKeyId": getOrCreateConfiguration((SnsComponent) component).setKmsMasterKeyId((java.lang.String) value); return true;
             case "lazyStartProducer": ((SnsComponent) component).setLazyStartProducer((boolean) value); return true;
             case "messageStructure": getOrCreateConfiguration((SnsComponent) component).setMessageStructure((java.lang.String) value); return true;
@@ -329,12 +329,12 @@ public interface AwsSnsComponentBuilderFactory {
             case "proxyProtocol": getOrCreateConfiguration((SnsComponent) component).setProxyProtocol((com.amazonaws.Protocol) value); return true;
             case "queueUrl": getOrCreateConfiguration((SnsComponent) component).setQueueUrl((java.lang.String) value); return true;
             case "region": getOrCreateConfiguration((SnsComponent) component).setRegion((java.lang.String) value); return true;
-            case "secretKey": ((SnsComponent) component).setSecretKey((java.lang.String) value); return true;
             case "serverSideEncryptionEnabled": getOrCreateConfiguration((SnsComponent) component).setServerSideEncryptionEnabled((boolean) value); return true;
             case "subject": getOrCreateConfiguration((SnsComponent) component).setSubject((java.lang.String) value); return true;
             case "subscribeSNStoSQS": getOrCreateConfiguration((SnsComponent) component).setSubscribeSNStoSQS((boolean) value); return true;
             case "basicPropertyBinding": ((SnsComponent) component).setBasicPropertyBinding((boolean) value); return true;
-            case "configuration": ((SnsComponent) component).setConfiguration((org.apache.camel.component.aws.sns.SnsConfiguration) value); return true;
+            case "accessKey": getOrCreateConfiguration((SnsComponent) component).setAccessKey((java.lang.String) value); return true;
+            case "secretKey": getOrCreateConfiguration((SnsComponent) component).setSecretKey((java.lang.String) value); return true;
             default: return false;
             }
         }