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 2023/12/21 12:33:55 UTC

(camel-kamelets) branch 1816 created (now a75dd6ca)

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

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


      at a75dd6ca Add an AWS STS Assume Role Action Kamelet

This branch includes the following new commits:

     new 0f822d86 Add an AWS STS Assume Role Action Kamelet
     new 3f94d27d Add an AWS STS Assume Role Action Kamelet
     new 3277469c Add an AWS STS Assume Role Action Kamelet
     new 03d205e0 Add an AWS STS Assume Role Action Kamelet
     new a75dd6ca Add an AWS STS Assume Role Action Kamelet

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.



(camel-kamelets) 03/05: Add an AWS STS Assume Role Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3277469c3aec393516988bd50849ff172421f7ed
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 21 13:30:51 2023 +0100

    Add an AWS STS Assume Role Action Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 2b146624..e1d902e6 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -25,6 +25,7 @@
 * xref:aws-sqs-fifo-sink.adoc[]
 * xref:aws-sqs-sink.adoc[]
 * xref:aws-sqs-source.adoc[]
+* xref:aws-sts-assume-role-action.adoc[]
 * xref:aws-timestream-query-sink.adoc[]
 * xref:aws-translate-action.adoc[]
 * xref:azure-cosmosdb-sink.adoc[]


(camel-kamelets) 05/05: Add an AWS STS Assume Role Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a75dd6caf72c42ba93fbfebe276961bd82cd8941
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 21 13:32:25 2023 +0100

    Add an AWS STS Assume Role Action Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java    | 2 +-
 .../main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
index 06510575..abb5b995 100644
--- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
+++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
@@ -103,7 +103,7 @@ public class KameletsCatalogTest {
     void testGetKameletsByNamespace() throws Exception {
         List<Kamelet> c = catalog.getKameletsByNamespace("AWS");
         assertFalse(c.isEmpty());
-        assertEquals(26, c.size());
+        assertEquals(27, c.size());
         c = catalog.getKameletsByGroups("Not-existing-group");
         assertTrue(c.isEmpty());
     }
diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml
index d53c864b..fb095aec 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml
@@ -72,7 +72,8 @@ spec:
   dependencies:
     - "camel:dns"
     - "camel:kamelet"
-    - "camel:aws2-translate"
+    - "camel:core"
+    - "camel:aws2-sts"
   template:
     from:
       uri: "kamelet:source"


(camel-kamelets) 04/05: Add an AWS STS Assume Role Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 03d205e04d56a1046d9a4511dfd6e1d1c67ca170
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 21 13:31:32 2023 +0100

    Add an AWS STS Assume Role Action Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/aws-sts-assume-role-action.kamelet.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kamelets/aws-sts-assume-role-action.kamelet.yaml b/kamelets/aws-sts-assume-role-action.kamelet.yaml
index d53c864b..fb095aec 100644
--- a/kamelets/aws-sts-assume-role-action.kamelet.yaml
+++ b/kamelets/aws-sts-assume-role-action.kamelet.yaml
@@ -72,7 +72,8 @@ spec:
   dependencies:
     - "camel:dns"
     - "camel:kamelet"
-    - "camel:aws2-translate"
+    - "camel:core"
+    - "camel:aws2-sts"
   template:
     from:
       uri: "kamelet:source"


(camel-kamelets) 02/05: Add an AWS STS Assume Role Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3f94d27dd5b95bc8694c61577be166917fb624bd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 21 13:28:01 2023 +0100

    Add an AWS STS Assume Role Action Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../aws-sts-assume-role-action.kamelet.yaml        | 111 +++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml
new file mode 100644
index 00000000..d53c864b
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sts-assume-role-action.kamelet.yaml
@@ -0,0 +1,111 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+  name: aws-sts-assume-role-action
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.4.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5MCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIHZpZXdCb3g9IjAgMCAyNTYgNDkwIiB3aWR0aD0iMjU2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiMzYzQ5MjkiPjxwYXRoIGQ9Im0yMSAxNjUuNzUtMjEgNi44NTYgMjEuNzUgMi41MTl6Ii8+PHBhdGggZD0ibTE5Ljk1NSAyMDYuODA2IDEwOC4wNDUgNi45MDggMTA4LjA0NS02LjkwOC0xMDguMDQ1LTIxLjA1NnoiLz48cGF0aCBkPSJtMjM0LjUgMTc1LjEyNSAyMS41LTIuNTE5LTIxLjUtNS43MzF6Ii8+PC9nPjxwYXRoIGQ9Im0xNTcuMzg3ID [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "AWS STS"
+    camel.apache.org/kamelet.namespace: "AWS"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "AWS STS Assume Role Action"
+    description: |-
+      Assume a role through STS
+
+      Access Key/Secret Key are the basic method for authenticating to the AWS STS Service. These parameters are optional because the Kamelet provides the 'useDefaultCredentialsProvider'.
+      
+      When using a default Credentials Provider the Translate 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.
+      
+      In the headers, you have to specify the `role-arn` / `ce-role-arn` property to specify the role ARN you want to assume.
+
+      In the headers, you have to specify the `role-session-name` / `ce-role-session-name` property to specify the role Session name you want to use.
+    required:
+      - region
+    type: object
+    properties:
+      accessKey:
+        title: Access Key
+        description: The access key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      secretKey:
+        title: Secret Key
+        description: The secret key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      region:
+        title: AWS Region
+        description: The AWS region to access.
+        type: string
+        enum: ["ap-south-1", "eu-south-1", "us-gov-east-1", "me-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "a [...]
+      useDefaultCredentialsProvider:
+        title: Default Credentials Provider
+        description: Set whether the STS client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
+        type: boolean
+        default: false
+  dependencies:
+    - "camel:dns"
+    - "camel:kamelet"
+    - "camel:aws2-translate"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[role-arn]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleArn
+                simple: "${header[role-arn]}"
+          - simple: "${header[ce-role-arn]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleArn
+                simple: "${header[ce-role-arn]}"
+      - choice:
+          when:
+          - simple: "${header[role-session-name]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleSessionName
+                simple: "${header[role-session-name]}"
+          - simple: "${header[ce-role-session-name]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleSessionName
+                simple: "${header[ce-role-session-name]}"
+      - to:
+          uri: "aws2-sts://default"
+          parameters:
+            secretKey: "{{?secretKey}}"
+            accessKey: "{{?accessKey}}"
+            region: "{{region}}"
+            operation: "assumeRole"
+            useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"


(camel-kamelets) 01/05: Add an AWS STS Assume Role Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0f822d86de96b64d10a2f07cfae923f1cdfe9935
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 21 13:26:37 2023 +0100

    Add an AWS STS Assume Role Action Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/aws-sts-assume-role-action.kamelet.yaml | 111 +++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/kamelets/aws-sts-assume-role-action.kamelet.yaml b/kamelets/aws-sts-assume-role-action.kamelet.yaml
new file mode 100644
index 00000000..d53c864b
--- /dev/null
+++ b/kamelets/aws-sts-assume-role-action.kamelet.yaml
@@ -0,0 +1,111 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+  name: aws-sts-assume-role-action
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.4.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5MCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIHZpZXdCb3g9IjAgMCAyNTYgNDkwIiB3aWR0aD0iMjU2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiMzYzQ5MjkiPjxwYXRoIGQ9Im0yMSAxNjUuNzUtMjEgNi44NTYgMjEuNzUgMi41MTl6Ii8+PHBhdGggZD0ibTE5Ljk1NSAyMDYuODA2IDEwOC4wNDUgNi45MDggMTA4LjA0NS02LjkwOC0xMDguMDQ1LTIxLjA1NnoiLz48cGF0aCBkPSJtMjM0LjUgMTc1LjEyNSAyMS41LTIuNTE5LTIxLjUtNS43MzF6Ii8+PC9nPjxwYXRoIGQ9Im0xNTcuMzg3ID [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "AWS STS"
+    camel.apache.org/kamelet.namespace: "AWS"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "AWS STS Assume Role Action"
+    description: |-
+      Assume a role through STS
+
+      Access Key/Secret Key are the basic method for authenticating to the AWS STS Service. These parameters are optional because the Kamelet provides the 'useDefaultCredentialsProvider'.
+      
+      When using a default Credentials Provider the Translate 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.
+      
+      In the headers, you have to specify the `role-arn` / `ce-role-arn` property to specify the role ARN you want to assume.
+
+      In the headers, you have to specify the `role-session-name` / `ce-role-session-name` property to specify the role Session name you want to use.
+    required:
+      - region
+    type: object
+    properties:
+      accessKey:
+        title: Access Key
+        description: The access key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      secretKey:
+        title: Secret Key
+        description: The secret key obtained from AWS.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:camel:group:credentials
+      region:
+        title: AWS Region
+        description: The AWS region to access.
+        type: string
+        enum: ["ap-south-1", "eu-south-1", "us-gov-east-1", "me-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "a [...]
+      useDefaultCredentialsProvider:
+        title: Default Credentials Provider
+        description: Set whether the STS client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
+        type: boolean
+        default: false
+  dependencies:
+    - "camel:dns"
+    - "camel:kamelet"
+    - "camel:aws2-translate"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[role-arn]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleArn
+                simple: "${header[role-arn]}"
+          - simple: "${header[ce-role-arn]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleArn
+                simple: "${header[ce-role-arn]}"
+      - choice:
+          when:
+          - simple: "${header[role-session-name]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleSessionName
+                simple: "${header[role-session-name]}"
+          - simple: "${header[ce-role-session-name]}"
+            steps:
+            - setHeader:
+                name: CamelAwsStsRoleSessionName
+                simple: "${header[ce-role-session-name]}"
+      - to:
+          uri: "aws2-sts://default"
+          parameters:
+            secretKey: "{{?secretKey}}"
+            accessKey: "{{?accessKey}}"
+            region: "{{region}}"
+            operation: "assumeRole"
+            useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"