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 2021/04/07 11:50:49 UTC

[camel] branch master updated (3a81f78 -> 891db0b)

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 3a81f78  CAMEL-16400: conditionally determine test execution based on environment availability (#5298)
     new cad8ccf  CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
     new 81a00a2  CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
     new b510cfd  CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
     new 15b10c8  CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
     new 891db0b  CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

The 5 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/aws2-kinesis.json     |   2 +
 .../camel/catalog/docs/aws2-kinesis-component.adoc |   6 +-
 .../aws2/kinesis/Kinesis2ComponentConfigurer.java  |   6 ++
 .../aws2/kinesis/Kinesis2EndpointConfigurer.java   |   6 ++
 .../aws2/kinesis/Kinesis2EndpointUriFactory.java   |   3 +-
 .../camel/component/aws2/kinesis/aws2-kinesis.json |   2 +
 .../src/main/docs/aws2-kinesis-component.adoc      |   6 +-
 .../aws2/kinesis/Kinesis2Configuration.java        |  13 +++
 .../component/aws2/kinesis/Kinesis2Endpoint.java   |   4 +-
 .../aws2/kinesis/client/KinesisClientFactory.java} |  22 ++--
 .../kinesis/client/KinesisInternalClient.java}     |  33 +++---
 .../impl/KinesisClientIAMOptimizedImpl.java}       |  37 ++++---
 .../client/impl/KinesisClientStandardImpl.java}    |  34 +++----
 .../aws2/kinesis/KinesisClientFactoryTest.java     |  51 ++++++++++
 .../dsl/Aws2KinesisComponentBuilderFactory.java    |  19 ++++
 .../dsl/Kinesis2EndpointBuilderFactory.java        | 111 +++++++++++++++++++++
 .../modules/ROOT/pages/aws2-kinesis-component.adoc |   6 +-
 17 files changed, 285 insertions(+), 76 deletions(-)
 copy components/camel-aws/{camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/client/Sns2ClientFactory.java => camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisClientFactory.java} (55%)
 copy components/{camel-openapi-java/src/test/java/org/apache/camel/openapi/BookOrder.java => camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java} (68%)
 copy components/camel-aws/{camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/client/impl/Sqs2ClientIAMOptimized.java => camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java} (74%)
 copy components/camel-aws/{camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java => camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java} (77%)
 create mode 100644 components/camel-aws/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisClientFactoryTest.java

[camel] 04/05: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

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 15b10c818e7fa1dc1451f39c7617aa42c96b3293
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 7 13:29:35 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
---
 .../aws2/kinesis/client/KinesisInternalClient.java       | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java
index 849ef56..e22cf6d 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java
@@ -1,3 +1,19 @@
+/*
+ * 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.aws2.kinesis.client;
 
 import software.amazon.awssdk.services.kinesis.KinesisClient;

[camel] 03/05: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

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 b510cfd1c8ad3acf88f2b789b2fe1f8a2e81ad8a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 7 13:28:15 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
---
 .../aws2/kinesis/KinesisClientFactoryTest.java     | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/components/camel-aws/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisClientFactoryTest.java b/components/camel-aws/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisClientFactoryTest.java
new file mode 100644
index 0000000..af3b87c
--- /dev/null
+++ b/components/camel-aws/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisClientFactoryTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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.aws2.kinesis;
+
+import org.apache.camel.component.aws2.kinesis.client.KinesisClientFactory;
+import org.apache.camel.component.aws2.kinesis.client.KinesisInternalClient;
+import org.apache.camel.component.aws2.kinesis.client.impl.KinesisClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.kinesis.client.impl.KinesisClientStandardImpl;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class KinesisClientFactoryTest {
+
+    @Test
+    public void getStandardS3ClientDefault() {
+        Kinesis2Configuration kinesis2Configuration = new Kinesis2Configuration();
+        KinesisInternalClient kinesisClient = KinesisClientFactory.getKinesisClient(kinesis2Configuration);
+        assertTrue(kinesisClient instanceof KinesisClientStandardImpl);
+    }
+
+    @Test
+    public void getStandardS3Client() {
+        Kinesis2Configuration kinesis2Configuration = new Kinesis2Configuration();
+        kinesis2Configuration.setUseDefaultCredentialsProvider(false);
+        KinesisInternalClient kinesisClient = KinesisClientFactory.getKinesisClient(kinesis2Configuration);
+        assertTrue(kinesisClient instanceof KinesisClientStandardImpl);
+    }
+
+    @Test
+    public void getIAMOptimizedS3Client() {
+        Kinesis2Configuration kinesis2Configuration = new Kinesis2Configuration();
+        kinesis2Configuration.setUseDefaultCredentialsProvider(true);
+        KinesisInternalClient kinesisClient = KinesisClientFactory.getKinesisClient(kinesis2Configuration);
+        assertTrue(kinesisClient instanceof KinesisClientIAMOptimizedImpl);
+    }
+}

[camel] 05/05: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

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 891db0bb69887cdb38be77c3b0e9b9f56f6a79db
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 7 13:33:41 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
---
 .../resources/org/apache/camel/catalog/components/aws2-kinesis.json     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-kinesis.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-kinesis.json
index 3c4fbb0..3582a17 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-kinesis.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-kinesis.json
@@ -32,6 +32,7 @@
     "region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "The region in which Kinesis Firehose client needs to work. When using this parameter, the configuration will expect the lowercase  [...]
     "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
+    "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set whether the Kinesis client should expect to load credent [...]
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 me [...]
     "iteratorType": { "kind": "property", "displayName": "Iterator Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.model.ShardIteratorType", "enum": [ "AT_SEQUENCE_NUMBER", "AFTER_SEQUENCE_NUMBER", "TRIM_HORIZON", "LATEST", "AT_TIMESTAMP", "null" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRIM_HORIZON", "configurationClass": "org.apache.camel.component.aws2.kinesi [...]
     "maxResultsPerRequest": { "kind": "property", "displayName": "Max Results Per Request", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Maximum number of records that will be fetched in each poll" },
@@ -54,6 +55,7 @@
     "region": { "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "The region in which Kinesis Firehose client needs to work. When using this parameter, the configuration will expect the lowercase [...]
     "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
+    "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set whether the Kinesis client should expect to load creden [...]
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 m [...]
     "iteratorType": { "kind": "parameter", "displayName": "Iterator Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.model.ShardIteratorType", "enum": [ "AT_SEQUENCE_NUMBER", "AFTER_SEQUENCE_NUMBER", "TRIM_HORIZON", "LATEST", "AT_TIMESTAMP", "null" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRIM_HORIZON", "configurationClass": "org.apache.camel.component.aws2.kines [...]
     "maxResultsPerRequest": { "kind": "parameter", "displayName": "Max Results Per Request", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Maximum number of records that will be fetched in each poll" },

[camel] 01/05: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

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 cad8ccf506f75716a9159b2976cf02dd051080bb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 7 13:17:46 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
---
 .../aws2/kinesis/Kinesis2Configuration.java        |  11 +++
 .../component/aws2/kinesis/Kinesis2Endpoint.java   |   5 +-
 .../aws2/kinesis/client/KinesisClientFactory.java  |  41 ++++++++
 .../aws2/kinesis/client/KinesisInternalClient.java |  16 ++++
 .../impl/KinesisClientIAMOptimizedImpl.java}       | 103 ++++++---------------
 .../impl/KinesisClientStandardImpl.java}           |  96 +++++--------------
 6 files changed, 119 insertions(+), 153 deletions(-)

diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
index 3f80cd4..ec89c1e 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
@@ -77,6 +77,9 @@ public class Kinesis2Configuration implements Cloneable {
     @UriParam(label = "common",
               description = "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option")
     private String uriEndpointOverride;
+    @UriParam(label = "common", defaultValue = "false", description = "Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect " +
+            "static credentials to be passed in.")
+    private boolean useDefaultCredentialsProvider;
 
     public KinesisClient getAmazonKinesisClient() {
         return amazonKinesisClient;
@@ -214,6 +217,14 @@ public class Kinesis2Configuration implements Cloneable {
         this.uriEndpointOverride = uriEndpointOverride;
     }
 
+    public boolean isUseDefaultCredentialsProvider() {
+        return useDefaultCredentialsProvider;
+    }
+
+    public void setUseDefaultCredentialsProvider(boolean useDefaultCredentialsProvider) {
+        this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
+    }
+
     // *************************************************
     //
     // *************************************************
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
index ebe2e31..d0f819c 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
@@ -22,6 +22,7 @@ import org.apache.camel.Category;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.component.aws2.kinesis.client.KinesisClientFactory;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.ScheduledPollEndpoint;
@@ -64,8 +65,8 @@ public class Kinesis2Endpoint extends ScheduledPollEndpoint {
             System.setProperty(CBOR_ENABLED.property(), "false");
         }
         kinesisClient = configuration.getAmazonKinesisClient() != null
-                ? configuration.getAmazonKinesisClient() : createKinesisClient();
-
+                ? configuration.getAmazonKinesisClient() : KinesisClientFactory.getKinesisClient(configuration).getKinesisClient();
+        
         if ((configuration.getIteratorType().equals(ShardIteratorType.AFTER_SEQUENCE_NUMBER)
                 || configuration.getIteratorType().equals(ShardIteratorType.AT_SEQUENCE_NUMBER))
                 && configuration.getSequenceNumber().isEmpty()) {
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisClientFactory.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisClientFactory.java
new file mode 100644
index 0000000..7c8f1ef
--- /dev/null
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisClientFactory.java
@@ -0,0 +1,41 @@
+/*
+ * 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.aws2.kinesis.client;
+
+import org.apache.camel.component.aws2.kinesis.Kinesis2Configuration;
+import org.apache.camel.component.aws2.kinesis.client.impl.KinesisClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.kinesis.client.impl.KinesisClientStandardImpl;
+
+/**
+ * Factory class to return the correct type of AWS Kinesis client.
+ */
+public final class KinesisClientFactory {
+
+    private KinesisClientFactory() {
+    }
+
+    /**
+     * Return the correct aws Kinesis client (based on remote vs local).
+     * 
+     * @param  configuration configuration
+     * @return               KinesisClient
+     */
+    public static KinesisInternalClient getKinesisClient(Kinesis2Configuration configuration) {
+        return configuration.isUseDefaultCredentialsProvider()
+                ? new KinesisClientIAMOptimizedImpl(configuration) : new KinesisClientStandardImpl(configuration);
+    }
+}
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java
new file mode 100644
index 0000000..849ef56
--- /dev/null
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java
@@ -0,0 +1,16 @@
+package org.apache.camel.component.aws2.kinesis.client;
+
+import software.amazon.awssdk.services.kinesis.KinesisClient;
+
+/**
+ * Manage the required actions of a Kinesis client for either local or remote.
+ */
+public interface KinesisInternalClient {
+
+    /**
+     * Returns a Kinesis client after a factory method determines which one to return.
+     *
+     * @return KinesisClient client
+     */
+    KinesisClient getKinesisClient();
+}
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
similarity index 53%
copy from components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
copy to components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
index ebe2e31..1ebde1f 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
@@ -14,19 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.aws2.kinesis;
+package org.apache.camel.component.aws2.kinesis.client.impl;
 
-import java.net.URI;
-
-import org.apache.camel.Category;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.support.ScheduledPollEndpoint;
+import org.apache.camel.component.aws2.kinesis.Kinesis2Configuration;
+import org.apache.camel.component.aws2.kinesis.client.KinesisInternalClient;
 import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
 import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
 import software.amazon.awssdk.http.SdkHttpClient;
 import software.amazon.awssdk.http.SdkHttpConfigurationOption;
@@ -35,80 +31,33 @@ import software.amazon.awssdk.http.apache.ProxyConfiguration;
 import software.amazon.awssdk.regions.Region;
 import software.amazon.awssdk.services.kinesis.KinesisClient;
 import software.amazon.awssdk.services.kinesis.KinesisClientBuilder;
-import software.amazon.awssdk.services.kinesis.model.ShardIteratorType;
 import software.amazon.awssdk.utils.AttributeMap;
 
-import static software.amazon.awssdk.core.SdkSystemSetting.CBOR_ENABLED;
+import java.net.URI;
 
 /**
- * Consume and produce records from and to AWS Kinesis Streams using AWS SDK version 2.x.
+ * Manage an AWS Kinesis client for all users to use (enabling temporary creds). This implementation is for remote instances
+ * to manage the credentials on their own (eliminating credential rotations)
  */
-@UriEndpoint(firstVersion = "3.2.0", scheme = "aws2-kinesis", title = "AWS 2 Kinesis", syntax = "aws2-kinesis:streamName",
-             category = { Category.CLOUD, Category.MESSAGING })
-public class Kinesis2Endpoint extends ScheduledPollEndpoint {
-
-    @UriParam
+public class KinesisClientIAMOptimizedImpl implements KinesisInternalClient {
+    private static final Logger LOG = LoggerFactory.getLogger(KinesisClientIAMOptimizedImpl.class);
     private Kinesis2Configuration configuration;
 
-    private KinesisClient kinesisClient;
-
-    public Kinesis2Endpoint(String uri, Kinesis2Configuration configuration, Kinesis2Component component) {
-        super(uri, component);
+    /**
+     * Constructor that uses the config file.
+     */
+    public KinesisClientIAMOptimizedImpl(Kinesis2Configuration configuration) {
+        LOG.trace("Creating an AWS Kinesis client for an ec2 instance with IAM temporary credentials (normal for ec2s).");
         this.configuration = configuration;
     }
 
+    /**
+     * Getting the Kinesis client that is used.
+     *
+     * @return Amazon Kinesis Client.
+     */
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
-        if (!configuration.isCborEnabled()) {
-            System.setProperty(CBOR_ENABLED.property(), "false");
-        }
-        kinesisClient = configuration.getAmazonKinesisClient() != null
-                ? configuration.getAmazonKinesisClient() : createKinesisClient();
-
-        if ((configuration.getIteratorType().equals(ShardIteratorType.AFTER_SEQUENCE_NUMBER)
-                || configuration.getIteratorType().equals(ShardIteratorType.AT_SEQUENCE_NUMBER))
-                && configuration.getSequenceNumber().isEmpty()) {
-            throw new IllegalArgumentException(
-                    "Sequence Number must be specified with iterator Types AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER");
-        }
-    }
-
-    @Override
-    public void doStop() throws Exception {
-        if (ObjectHelper.isEmpty(configuration.getAmazonKinesisClient())) {
-            if (kinesisClient != null) {
-                kinesisClient.close();
-            }
-        }
-        if (!configuration.isCborEnabled()) {
-            System.clearProperty(CBOR_ENABLED.property());
-        }
-        super.doStop();
-    }
-
-    @Override
-    public Producer createProducer() throws Exception {
-        return new Kinesis2Producer(this);
-    }
-
-    @Override
-    public Consumer createConsumer(Processor processor) throws Exception {
-        final Kinesis2Consumer consumer = new Kinesis2Consumer(this, processor);
-        consumer.setSchedulerProperties(getSchedulerProperties());
-        configureConsumer(consumer);
-        return consumer;
-    }
-
-    public KinesisClient getClient() {
-        return kinesisClient;
-    }
-
-    public Kinesis2Configuration getConfiguration() {
-        return configuration;
-    }
-
-    KinesisClient createKinesisClient() {
+    public KinesisClient getKinesisClient() {
         KinesisClient client = null;
         KinesisClientBuilder clientBuilder = KinesisClient.builder();
         ProxyConfiguration.Builder proxyConfig = null;
@@ -117,18 +66,18 @@ public class Kinesis2Endpoint extends ScheduledPollEndpoint {
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
             proxyConfig = ProxyConfiguration.builder();
             URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
-                                           + configuration.getProxyPort());
+                    + configuration.getProxyPort());
             proxyConfig.endpoint(proxyEndpoint);
             httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
             isClientConfigFound = true;
         }
         if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
-            AwsBasicCredentials cred = AwsBasicCredentials.create(configuration.getAccessKey(), configuration.getSecretKey());
+            DefaultCredentialsProvider cred = DefaultCredentialsProvider.create();
             if (isClientConfigFound) {
                 clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
-                        .credentialsProvider(StaticCredentialsProvider.create(cred));
+                        .credentialsProvider(cred);
             } else {
-                clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+                clientBuilder = clientBuilder.credentialsProvider(cred);
             }
         } else {
             if (!isClientConfigFound) {
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
similarity index 57%
copy from components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
copy to components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
index ebe2e31..3d1b055 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
@@ -14,18 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.aws2.kinesis;
+package org.apache.camel.component.aws2.kinesis.client.impl;
 
-import java.net.URI;
-
-import org.apache.camel.Category;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.support.ScheduledPollEndpoint;
+import org.apache.camel.component.aws2.kinesis.Kinesis2Configuration;
+import org.apache.camel.component.aws2.kinesis.client.KinesisInternalClient;
 import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
 import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
 import software.amazon.awssdk.http.SdkHttpClient;
@@ -35,80 +30,33 @@ import software.amazon.awssdk.http.apache.ProxyConfiguration;
 import software.amazon.awssdk.regions.Region;
 import software.amazon.awssdk.services.kinesis.KinesisClient;
 import software.amazon.awssdk.services.kinesis.KinesisClientBuilder;
-import software.amazon.awssdk.services.kinesis.model.ShardIteratorType;
 import software.amazon.awssdk.utils.AttributeMap;
 
-import static software.amazon.awssdk.core.SdkSystemSetting.CBOR_ENABLED;
+import java.net.URI;
 
 /**
- * Consume and produce records from and to AWS Kinesis Streams using AWS SDK version 2.x.
+ * Manage an AWS Kinesis client for all users to use. This implementation is for local instances to use a static and solid
+ * credential set.
  */
-@UriEndpoint(firstVersion = "3.2.0", scheme = "aws2-kinesis", title = "AWS 2 Kinesis", syntax = "aws2-kinesis:streamName",
-             category = { Category.CLOUD, Category.MESSAGING })
-public class Kinesis2Endpoint extends ScheduledPollEndpoint {
-
-    @UriParam
+public class KinesisClientStandardImpl implements KinesisInternalClient {
+    private static final Logger LOG = LoggerFactory.getLogger(KinesisClientStandardImpl.class);
     private Kinesis2Configuration configuration;
 
-    private KinesisClient kinesisClient;
-
-    public Kinesis2Endpoint(String uri, Kinesis2Configuration configuration, Kinesis2Component component) {
-        super(uri, component);
+    /**
+     * Constructor that uses the config file.
+     */
+    public KinesisClientStandardImpl(Kinesis2Configuration configuration) {
+        LOG.trace("Creating an AWS Kinesis manager using static credentials.");
         this.configuration = configuration;
     }
 
+    /**
+     * Getting the Kinesis client that is used.
+     * 
+     * @return Amazon Kinesis Client.
+     */
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
-        if (!configuration.isCborEnabled()) {
-            System.setProperty(CBOR_ENABLED.property(), "false");
-        }
-        kinesisClient = configuration.getAmazonKinesisClient() != null
-                ? configuration.getAmazonKinesisClient() : createKinesisClient();
-
-        if ((configuration.getIteratorType().equals(ShardIteratorType.AFTER_SEQUENCE_NUMBER)
-                || configuration.getIteratorType().equals(ShardIteratorType.AT_SEQUENCE_NUMBER))
-                && configuration.getSequenceNumber().isEmpty()) {
-            throw new IllegalArgumentException(
-                    "Sequence Number must be specified with iterator Types AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER");
-        }
-    }
-
-    @Override
-    public void doStop() throws Exception {
-        if (ObjectHelper.isEmpty(configuration.getAmazonKinesisClient())) {
-            if (kinesisClient != null) {
-                kinesisClient.close();
-            }
-        }
-        if (!configuration.isCborEnabled()) {
-            System.clearProperty(CBOR_ENABLED.property());
-        }
-        super.doStop();
-    }
-
-    @Override
-    public Producer createProducer() throws Exception {
-        return new Kinesis2Producer(this);
-    }
-
-    @Override
-    public Consumer createConsumer(Processor processor) throws Exception {
-        final Kinesis2Consumer consumer = new Kinesis2Consumer(this, processor);
-        consumer.setSchedulerProperties(getSchedulerProperties());
-        configureConsumer(consumer);
-        return consumer;
-    }
-
-    public KinesisClient getClient() {
-        return kinesisClient;
-    }
-
-    public Kinesis2Configuration getConfiguration() {
-        return configuration;
-    }
-
-    KinesisClient createKinesisClient() {
+    public KinesisClient getKinesisClient() {
         KinesisClient client = null;
         KinesisClientBuilder clientBuilder = KinesisClient.builder();
         ProxyConfiguration.Builder proxyConfig = null;
@@ -117,7 +65,7 @@ public class Kinesis2Endpoint extends ScheduledPollEndpoint {
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
             proxyConfig = ProxyConfiguration.builder();
             URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
-                                           + configuration.getProxyPort());
+                    + configuration.getProxyPort());
             proxyConfig.endpoint(proxyEndpoint);
             httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
             isClientConfigFound = true;

[camel] 02/05: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component

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 81a00a2318bd436c80adecaaa36e3ea783ca26c7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 7 13:24:59 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Kinesis component
---
 .../camel/catalog/docs/aws2-kinesis-component.adoc |   6 +-
 .../aws2/kinesis/Kinesis2ComponentConfigurer.java  |   6 ++
 .../aws2/kinesis/Kinesis2EndpointConfigurer.java   |   6 ++
 .../aws2/kinesis/Kinesis2EndpointUriFactory.java   |   3 +-
 .../camel/component/aws2/kinesis/aws2-kinesis.json |   2 +
 .../src/main/docs/aws2-kinesis-component.adoc      |   6 +-
 .../aws2/kinesis/Kinesis2Configuration.java        |   6 +-
 .../component/aws2/kinesis/Kinesis2Endpoint.java   |   5 +-
 .../client/impl/KinesisClientIAMOptimizedImpl.java |  12 +--
 .../client/impl/KinesisClientStandardImpl.java     |  10 +-
 .../dsl/Aws2KinesisComponentBuilderFactory.java    |  19 ++++
 .../dsl/Kinesis2EndpointBuilderFactory.java        | 111 +++++++++++++++++++++
 .../modules/ROOT/pages/aws2-kinesis-component.adoc |   6 +-
 13 files changed, 175 insertions(+), 23 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-kinesis-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-kinesis-component.adoc
index 4d8d356..cd19d35a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-kinesis-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-kinesis-component.adoc
@@ -43,7 +43,7 @@ The stream needs to be created prior to it being used. +
 
 
 // component options: START
-The AWS 2 Kinesis component supports 20 options, which are listed below.
+The AWS 2 Kinesis component supports 21 options, which are listed below.
 
 
 
@@ -60,6 +60,7 @@ The AWS 2 Kinesis component supports 20 options, which are listed below.
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int
@@ -98,7 +99,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (36 parameters):
+=== Query Parameters (37 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -113,6 +114,7 @@ with the following path and query parameters:
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int
diff --git a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java
index 80f3a1a..1a15fdc 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java
@@ -66,6 +66,8 @@ public class Kinesis2ComponentConfigurer extends PropertyConfigurerSupport imple
         case "trustAllCertificates": getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
         case "uriendpointoverride":
         case "uriEndpointOverride": getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
         default: return false;
         }
     }
@@ -116,6 +118,8 @@ public class Kinesis2ComponentConfigurer extends PropertyConfigurerSupport imple
         case "trustAllCertificates": return boolean.class;
         case "uriendpointoverride":
         case "uriEndpointOverride": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
         default: return null;
         }
     }
@@ -162,6 +166,8 @@ public class Kinesis2ComponentConfigurer extends PropertyConfigurerSupport imple
         case "trustAllCertificates": return getOrCreateConfiguration(target).isTrustAllCertificates();
         case "uriendpointoverride":
         case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
         default: return null;
         }
     }
diff --git a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointConfigurer.java b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointConfigurer.java
index ff3e704..b165e71 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointConfigurer.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointConfigurer.java
@@ -87,6 +87,8 @@ public class Kinesis2EndpointConfigurer extends PropertyConfigurerSupport implem
         case "trustAllCertificates": target.getConfiguration().setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
         case "uriendpointoverride":
         case "uriEndpointOverride": target.getConfiguration().setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
         case "usefixeddelay":
         case "useFixedDelay": target.setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
         default: return false;
@@ -167,6 +169,8 @@ public class Kinesis2EndpointConfigurer extends PropertyConfigurerSupport implem
         case "trustAllCertificates": return boolean.class;
         case "uriendpointoverride":
         case "uriEndpointOverride": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
         case "usefixeddelay":
         case "useFixedDelay": return boolean.class;
         default: return null;
@@ -243,6 +247,8 @@ public class Kinesis2EndpointConfigurer extends PropertyConfigurerSupport implem
         case "trustAllCertificates": return target.getConfiguration().isTrustAllCertificates();
         case "uriendpointoverride":
         case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
         case "usefixeddelay":
         case "useFixedDelay": return target.isUseFixedDelay();
         default: return null;
diff --git a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointUriFactory.java b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointUriFactory.java
index 66c0ea7..1ba2211 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointUriFactory.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2EndpointUriFactory.java
@@ -20,7 +20,7 @@ public class Kinesis2EndpointUriFactory extends org.apache.camel.support.compone
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(37);
+        Set<String> props = new HashSet<>(38);
         props.add("backoffMultiplier");
         props.add("initialDelay");
         props.add("scheduler");
@@ -45,6 +45,7 @@ public class Kinesis2EndpointUriFactory extends org.apache.camel.support.compone
         props.add("uriEndpointOverride");
         props.add("exchangePattern");
         props.add("shardId");
+        props.add("useDefaultCredentialsProvider");
         props.add("streamName");
         props.add("proxyHost");
         props.add("backoffIdleThreshold");
diff --git a/components/camel-aws/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json b/components/camel-aws/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json
index 3c4fbb0..3582a17 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json
+++ b/components/camel-aws/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json
@@ -32,6 +32,7 @@
     "region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "The region in which Kinesis Firehose client needs to work. When using this parameter, the configuration will expect the lowercase  [...]
     "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
+    "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set whether the Kinesis client should expect to load credent [...]
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 me [...]
     "iteratorType": { "kind": "property", "displayName": "Iterator Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.model.ShardIteratorType", "enum": [ "AT_SEQUENCE_NUMBER", "AFTER_SEQUENCE_NUMBER", "TRIM_HORIZON", "LATEST", "AT_TIMESTAMP", "null" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRIM_HORIZON", "configurationClass": "org.apache.camel.component.aws2.kinesi [...]
     "maxResultsPerRequest": { "kind": "property", "displayName": "Max Results Per Request", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Maximum number of records that will be fetched in each poll" },
@@ -54,6 +55,7 @@
     "region": { "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "The region in which Kinesis Firehose client needs to work. When using this parameter, the configuration will expect the lowercase [...]
     "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
+    "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Set whether the Kinesis client should expect to load creden [...]
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 m [...]
     "iteratorType": { "kind": "parameter", "displayName": "Iterator Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.model.ShardIteratorType", "enum": [ "AT_SEQUENCE_NUMBER", "AFTER_SEQUENCE_NUMBER", "TRIM_HORIZON", "LATEST", "AT_TIMESTAMP", "null" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRIM_HORIZON", "configurationClass": "org.apache.camel.component.aws2.kines [...]
     "maxResultsPerRequest": { "kind": "parameter", "displayName": "Max Results Per Request", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Maximum number of records that will be fetched in each poll" },
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
index 4d8d356..cd19d35a 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
@@ -43,7 +43,7 @@ The stream needs to be created prior to it being used. +
 
 
 // component options: START
-The AWS 2 Kinesis component supports 20 options, which are listed below.
+The AWS 2 Kinesis component supports 21 options, which are listed below.
 
 
 
@@ -60,6 +60,7 @@ The AWS 2 Kinesis component supports 20 options, which are listed below.
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int
@@ -98,7 +99,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (36 parameters):
+=== Query Parameters (37 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -113,6 +114,7 @@ with the following path and query parameters:
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
index ec89c1e..db57da4 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Configuration.java
@@ -77,8 +77,10 @@ public class Kinesis2Configuration implements Cloneable {
     @UriParam(label = "common",
               description = "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option")
     private String uriEndpointOverride;
-    @UriParam(label = "common", defaultValue = "false", description = "Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect " +
-            "static credentials to be passed in.")
+    @UriParam(label = "common", defaultValue = "false",
+              description = "Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect "
+                            +
+                            "static credentials to be passed in.")
     private boolean useDefaultCredentialsProvider;
 
     public KinesisClient getAmazonKinesisClient() {
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
index d0f819c..1756ec6 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java
@@ -65,8 +65,9 @@ public class Kinesis2Endpoint extends ScheduledPollEndpoint {
             System.setProperty(CBOR_ENABLED.property(), "false");
         }
         kinesisClient = configuration.getAmazonKinesisClient() != null
-                ? configuration.getAmazonKinesisClient() : KinesisClientFactory.getKinesisClient(configuration).getKinesisClient();
-        
+                ? configuration.getAmazonKinesisClient()
+                : KinesisClientFactory.getKinesisClient(configuration).getKinesisClient();
+
         if ((configuration.getIteratorType().equals(ShardIteratorType.AFTER_SEQUENCE_NUMBER)
                 || configuration.getIteratorType().equals(ShardIteratorType.AT_SEQUENCE_NUMBER))
                 && configuration.getSequenceNumber().isEmpty()) {
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
index 1ebde1f..94f290a 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientIAMOptimizedImpl.java
@@ -16,14 +16,14 @@
  */
 package org.apache.camel.component.aws2.kinesis.client.impl;
 
+import java.net.URI;
+
 import org.apache.camel.component.aws2.kinesis.Kinesis2Configuration;
 import org.apache.camel.component.aws2.kinesis.client.KinesisInternalClient;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
 import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
-import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
 import software.amazon.awssdk.http.SdkHttpClient;
 import software.amazon.awssdk.http.SdkHttpConfigurationOption;
 import software.amazon.awssdk.http.apache.ApacheHttpClient;
@@ -33,11 +33,9 @@ import software.amazon.awssdk.services.kinesis.KinesisClient;
 import software.amazon.awssdk.services.kinesis.KinesisClientBuilder;
 import software.amazon.awssdk.utils.AttributeMap;
 
-import java.net.URI;
-
 /**
- * Manage an AWS Kinesis client for all users to use (enabling temporary creds). This implementation is for remote instances
- * to manage the credentials on their own (eliminating credential rotations)
+ * Manage an AWS Kinesis client for all users to use (enabling temporary creds). This implementation is for remote
+ * instances to manage the credentials on their own (eliminating credential rotations)
  */
 public class KinesisClientIAMOptimizedImpl implements KinesisInternalClient {
     private static final Logger LOG = LoggerFactory.getLogger(KinesisClientIAMOptimizedImpl.class);
@@ -66,7 +64,7 @@ public class KinesisClientIAMOptimizedImpl implements KinesisInternalClient {
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
             proxyConfig = ProxyConfiguration.builder();
             URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
-                    + configuration.getProxyPort());
+                                           + configuration.getProxyPort());
             proxyConfig.endpoint(proxyEndpoint);
             httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
             isClientConfigFound = true;
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
index 3d1b055..cc1221d 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisClientStandardImpl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.aws2.kinesis.client.impl;
 
+import java.net.URI;
+
 import org.apache.camel.component.aws2.kinesis.Kinesis2Configuration;
 import org.apache.camel.component.aws2.kinesis.client.KinesisInternalClient;
 import org.apache.camel.util.ObjectHelper;
@@ -32,11 +34,9 @@ import software.amazon.awssdk.services.kinesis.KinesisClient;
 import software.amazon.awssdk.services.kinesis.KinesisClientBuilder;
 import software.amazon.awssdk.utils.AttributeMap;
 
-import java.net.URI;
-
 /**
- * Manage an AWS Kinesis client for all users to use. This implementation is for local instances to use a static and solid
- * credential set.
+ * Manage an AWS Kinesis client for all users to use. This implementation is for local instances to use a static and
+ * solid credential set.
  */
 public class KinesisClientStandardImpl implements KinesisInternalClient {
     private static final Logger LOG = LoggerFactory.getLogger(KinesisClientStandardImpl.class);
@@ -65,7 +65,7 @@ public class KinesisClientStandardImpl implements KinesisInternalClient {
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
             proxyConfig = ProxyConfiguration.builder();
             URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
-                    + configuration.getProxyPort());
+                                           + configuration.getProxyPort());
             proxyConfig.endpoint(proxyEndpoint);
             httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
             isClientConfigFound = true;
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java
index 16c8d78..e5223c4 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java
@@ -213,6 +213,24 @@ public interface Aws2KinesisComponentBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Aws2KinesisComponentBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            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
@@ -426,6 +444,7 @@ public interface Aws2KinesisComponentBuilderFactory {
             case "region": getOrCreateConfiguration((Kinesis2Component) component).setRegion((java.lang.String) value); return true;
             case "trustAllCertificates": getOrCreateConfiguration((Kinesis2Component) component).setTrustAllCertificates((boolean) value); return true;
             case "uriEndpointOverride": getOrCreateConfiguration((Kinesis2Component) component).setUriEndpointOverride((java.lang.String) value); return true;
+            case "useDefaultCredentialsProvider": getOrCreateConfiguration((Kinesis2Component) component).setUseDefaultCredentialsProvider((boolean) value); return true;
             case "bridgeErrorHandler": ((Kinesis2Component) component).setBridgeErrorHandler((boolean) value); return true;
             case "iteratorType": getOrCreateConfiguration((Kinesis2Component) component).setIteratorType((software.amazon.awssdk.services.kinesis.model.ShardIteratorType) value); return true;
             case "maxResultsPerRequest": getOrCreateConfiguration((Kinesis2Component) component).setMaxResultsPerRequest((int) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Kinesis2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Kinesis2EndpointBuilderFactory.java
index c80433d..c41a2a5 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Kinesis2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Kinesis2EndpointBuilderFactory.java
@@ -291,6 +291,43 @@ public interface Kinesis2EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointConsumerBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointConsumerBuilder useDefaultCredentialsProvider(
+                String useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            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
@@ -1387,6 +1424,43 @@ public interface Kinesis2EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointProducerBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointProducerBuilder useDefaultCredentialsProvider(
+                String useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
          * 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
@@ -1727,6 +1801,43 @@ public interface Kinesis2EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
+         * Set whether the Kinesis client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: common
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Kinesis2EndpointBuilder useDefaultCredentialsProvider(
+                String useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
          * Amazon AWS Access Key.
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
diff --git a/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc b/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc
index 8ac0da8..ee44441f 100644
--- a/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc
@@ -45,7 +45,7 @@ The stream needs to be created prior to it being used. +
 
 
 // component options: START
-The AWS 2 Kinesis component supports 20 options, which are listed below.
+The AWS 2 Kinesis component supports 21 options, which are listed below.
 
 
 
@@ -62,6 +62,7 @@ The AWS 2 Kinesis component supports 20 options, which are listed below.
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int
@@ -100,7 +101,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (36 parameters):
+=== Query Parameters (37 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -115,6 +116,7 @@ with the following path and query parameters:
 | *region* (common) | The region in which Kinesis Firehose 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
 | *trustAllCertificates* (common) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
+| *useDefaultCredentialsProvider* (common) | Set whether the Kinesis client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. | 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
 | *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. There are 6 enums and the value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType
 | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int