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 2022/02/04 13:58:09 UTC

[camel-kamelets] 03/12: Support DefaultCredentialProvider in the AWS Kamelets - AWS Secrets Manager

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

acosentino pushed a commit to branch 735-cont-2
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit f77e727d3fd07da9920831cbb5e3d35b65a1713e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 4 14:45:43 2022 +0100

    Support DefaultCredentialProvider in the AWS Kamelets - AWS Secrets Manager
---
 kamelets/aws-secrets-manager-sink.kamelet.yaml | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/kamelets/aws-secrets-manager-sink.kamelet.yaml b/kamelets/aws-secrets-manager-sink.kamelet.yaml
index bd19135..ab5c8a4 100644
--- a/kamelets/aws-secrets-manager-sink.kamelet.yaml
+++ b/kamelets/aws-secrets-manager-sink.kamelet.yaml
@@ -31,7 +31,11 @@ spec:
   definition:
     title: "AWS Secrets Manager Sink"
     description: |-
-      Create a secret in AWS Secrets Manager
+      Create a secret in AWS Secrets Manager.
+
+      Access Key/Secret Key are the basic method for authenticating to the AWS Secrets Manager Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'.
+      
+      When using a default Credentials Provider the Secrets Manager client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.
 
       The Kamelet expects the following headers to be set:
 
@@ -39,8 +43,6 @@ spec:
 
       If the header won't be set the exchange ID will be used as secret name.
     required:
-      - accessKey
-      - secretKey
       - region
     type: object
     properties:
@@ -65,6 +67,13 @@ spec:
         description: The AWS region to connect to.
         type: string
         example: eu-west-1
+      useDefaultCredentialsProvider:
+        title: Default Credentials Provider
+        description: Set whether the Kinesis Firehose client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
   dependencies:
     - "camel:core"
     - "camel:aws-secrets-manager"
@@ -93,7 +102,8 @@ spec:
       - to:
           uri: "aws-secrets-manager:kamelet"
           parameters:
-            secretKey: "{{secretKey}}"
-            accessKey: "{{accessKey}}"
+            secretKey: "{{?secretKey}}"
+            accessKey: "{{?accessKey}}"
             region: "{{region}}"
+            useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
             operation: "createSecret"