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/06/19 12:56:24 UTC
[camel] branch main updated (e868f4cd967 -> f7c8a12ace0)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from e868f4cd967 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SES
new c7018a2f191 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
new 6f229d71a1c CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
new 9e1f505d7aa CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
new fd8e8e50e74 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
new d2a9ab462ca CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
new f7c8a12ace0 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
The 6 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:
.../apache/camel/catalog/components/aws2-sts.json | 48 ++++++++++----------
.../aws2/sts/STS2ComponentConfigurer.java | 12 +++++
.../component/aws2/sts/STS2EndpointConfigurer.java | 12 +++++
.../component/aws2/sts/STS2EndpointUriFactory.java | 4 +-
.../apache/camel/component/aws2/sts/aws2-sts.json | 48 ++++++++++----------
.../src/main/docs/aws2-sts-component.adoc | 12 ++++-
.../camel/component/aws2/sts/STS2Component.java | 3 +-
.../component/aws2/sts/STS2Configuration.java | 26 +++++++++++
.../aws2/sts/client/STS2ClientFactory.java | 10 ++++-
...zed.java => STS2ClientIAMProfileOptimized.java} | 11 +++--
.../dsl/Aws2StsComponentBuilderFactory.java | 35 +++++++++++++++
.../endpoint/dsl/STS2EndpointBuilderFactory.java | 51 ++++++++++++++++++++++
12 files changed, 219 insertions(+), 53 deletions(-)
copy components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/{STS2ClientIAMOptimized.java => STS2ClientIAMProfileOptimized.java} (87%)
[camel] 04/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit fd8e8e50e742429de2df7d69f8bb52330d3f72d0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:34:16 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../main/java/org/apache/camel/component/aws2/sts/STS2Component.java | 3 ++-
.../component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 59c9293c815..a1a874c2acb 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -47,7 +47,8 @@ public class STS2Component extends DefaultComponent {
STS2Configuration configurationClone = this.configuration != null ? this.configuration.copy() : new STS2Configuration();
STS2Endpoint endpoint = new STS2Endpoint(uri, this, configurationClone);
setProperties(endpoint, parameters);
- if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configurationClone.isUseProfileCredentialsProvider())
+ if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configurationClone.isUseProfileCredentialsProvider())
&& configurationClone.getStsClient() == null
&& (configurationClone.getAccessKey() == null || configurationClone.getSecretKey() == null)) {
throw new IllegalArgumentException(
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
index a7b6d0b5711..9ffc1b26e90 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.aws2.sts.client.impl;
+import java.net.URI;
+
import org.apache.camel.component.aws2.sts.STS2Configuration;
import org.apache.camel.component.aws2.sts.client.STS2InternalClient;
import org.apache.camel.util.ObjectHelper;
@@ -31,8 +33,6 @@ import software.amazon.awssdk.services.sts.StsClient;
import software.amazon.awssdk.services.sts.StsClientBuilder;
import software.amazon.awssdk.utils.AttributeMap;
-import java.net.URI;
-
/**
* Manage an AWS STS client for all users to use. This implementation is for remote instances to manage the credentials
* on their own (eliminating credential rotations)
[camel] 06/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f7c8a12ace0bbae0eaeb9eb3175e0784501523cc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:56:11 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../camel-aws2-sts/src/main/docs/aws2-sts-component.adoc | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
index 328ed65f08d..f7cb24c63da 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
+++ b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
@@ -61,16 +61,24 @@ the https://aws.amazon.com/sts/[Amazon STS] service.
== Usage
-=== Static credentials vs Default Credential Provider
+=== Static credentials, Default Credential Provider and Profile Credentials Provider
You have the possibility of avoiding the usage of explicit static credentials, by specifying the useDefaultCredentialsProvider option and set it to true.
+The order of evaluation for Default Credentials Provider is the following:
+
- Java system properties - aws.accessKeyId and aws.secretKey
- Environment variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
- Web Identity Token from AWS STS.
- The shared credentials and config files.
- Amazon ECS container credentials - loaded from the Amazon ECS if the environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set.
- - Amazon EC2 Instance profile credentials.
+ - Amazon EC2 Instance profile credentials.
+
+You have also the possibility of using Profile Credentials Provider, by specifying the useProfileCredentialsProvider option to true and profileCredentialsName to the profile name.
+
+Only one of static, default and profile credentials could be used at the same time.
+
+For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation]
// component headers: START
include::partial$component-endpoint-headers.adoc[]
[camel] 05/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d2a9ab462ca52544846230b1784a1a2a7c16c7ce
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:54:51 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../apache/camel/catalog/components/aws2-sts.json | 48 ++++++++++----------
.../dsl/Aws2StsComponentBuilderFactory.java | 35 +++++++++++++++
.../endpoint/dsl/STS2EndpointBuilderFactory.java | 51 ++++++++++++++++++++++
3 files changed, 112 insertions(+), 22 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sts.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sts.json
index 219aa089c90..bd7e9671b63 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sts.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sts.json
@@ -27,17 +27,19 @@
"operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField" [...]
"overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination wi [...]
"pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "proxyHost": { "index": 5, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
- "proxyPort": { "index": 6, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
- "proxyProtocol": { "index": 7, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
- "region": { "index": 8, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wil [...]
- "stsClient": { "index": 9, "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "index": 10, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "uriEndpointOverride": { "index": 11, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
- "useDefaultCredentialsProvider": { "index": 12, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
- "autowiredEnabled": { "index": 13, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
- "accessKey": { "index": 14, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 15, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 6, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
+ "proxyPort": { "index": 7, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
+ "proxyProtocol": { "index": 8, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
+ "region": { "index": 9, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wil [...]
+ "stsClient": { "index": 10, "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+ "trustAllCertificates": { "index": 11, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 12, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
+ "useDefaultCredentialsProvider": { "index": 13, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
+ "useProfileCredentialsProvider": { "index": 14, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
+ "autowiredEnabled": { "index": 15, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "accessKey": { "index": 16, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 17, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
"headers": {
"CamelAwsStsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.sts.STS2Constants#OPERATION" },
@@ -50,16 +52,18 @@
"operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField [...]
"overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination w [...]
"pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "proxyHost": { "index": 4, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
- "proxyPort": { "index": 5, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
- "proxyProtocol": { "index": 6, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when in [...]
- "region": { "index": 7, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wi [...]
- "stsClient": { "index": 8, "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "index": 9, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "uriEndpointOverride": { "index": 10, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndp [...]
- "useDefaultCredentialsProvider": { "index": 11, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
- "lazyStartProducer": { "index": 12, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
- "accessKey": { "index": 13, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 14, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 4, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 5, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
+ "proxyPort": { "index": 6, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
+ "proxyProtocol": { "index": 7, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when in [...]
+ "region": { "index": 8, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wi [...]
+ "stsClient": { "index": 9, "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+ "trustAllCertificates": { "index": 10, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 11, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndp [...]
+ "useDefaultCredentialsProvider": { "index": 12, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
+ "useProfileCredentialsProvider": { "index": 13, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
+ "lazyStartProducer": { "index": 14, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "accessKey": { "index": 15, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
}
}
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
index 26c064f9097..6de77e10bf0 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
@@ -137,6 +137,22 @@ public interface Aws2StsComponentBuilderFactory {
doSetProperty("pojoRequest", pojoRequest);
return this;
}
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default Aws2StsComponentBuilder profileCredentialsName(
+ java.lang.String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
/**
* To define a proxy host when instantiating the STS client.
*
@@ -267,6 +283,23 @@ public interface Aws2StsComponentBuilderFactory {
doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
return this;
}
+ /**
+ * Set whether the STS client should expect to load credentials through
+ * a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Aws2StsComponentBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
/**
* Whether autowiring is enabled. This is used for automatic autowiring
* options (the option must be marked as autowired) by looking up in the
@@ -345,6 +378,7 @@ public interface Aws2StsComponentBuilderFactory {
case "operation": getOrCreateConfiguration((STS2Component) component).setOperation((org.apache.camel.component.aws2.sts.STS2Operations) value); return true;
case "overrideEndpoint": getOrCreateConfiguration((STS2Component) component).setOverrideEndpoint((boolean) value); return true;
case "pojoRequest": getOrCreateConfiguration((STS2Component) component).setPojoRequest((boolean) value); return true;
+ case "profileCredentialsName": getOrCreateConfiguration((STS2Component) component).setProfileCredentialsName((java.lang.String) value); return true;
case "proxyHost": getOrCreateConfiguration((STS2Component) component).setProxyHost((java.lang.String) value); return true;
case "proxyPort": getOrCreateConfiguration((STS2Component) component).setProxyPort((java.lang.Integer) value); return true;
case "proxyProtocol": getOrCreateConfiguration((STS2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
@@ -353,6 +387,7 @@ public interface Aws2StsComponentBuilderFactory {
case "trustAllCertificates": getOrCreateConfiguration((STS2Component) component).setTrustAllCertificates((boolean) value); return true;
case "uriEndpointOverride": getOrCreateConfiguration((STS2Component) component).setUriEndpointOverride((java.lang.String) value); return true;
case "useDefaultCredentialsProvider": getOrCreateConfiguration((STS2Component) component).setUseDefaultCredentialsProvider((boolean) value); return true;
+ case "useProfileCredentialsProvider": getOrCreateConfiguration((STS2Component) component).setUseProfileCredentialsProvider((boolean) value); return true;
case "autowiredEnabled": ((STS2Component) component).setAutowiredEnabled((boolean) value); return true;
case "accessKey": getOrCreateConfiguration((STS2Component) component).setAccessKey((java.lang.String) value); return true;
case "secretKey": getOrCreateConfiguration((STS2Component) component).setSecretKey((java.lang.String) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
index a27c8b2dc9d..6cb2dd9481c 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
@@ -140,6 +140,22 @@ public interface STS2EndpointBuilderFactory {
doSetProperty("pojoRequest", pojoRequest);
return this;
}
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default STS2EndpointBuilder profileCredentialsName(
+ String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
/**
* To define a proxy host when instantiating the STS client.
*
@@ -353,6 +369,41 @@ public interface STS2EndpointBuilderFactory {
doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
return this;
}
+ /**
+ * Set whether the STS client should expect to load credentials through
+ * a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default STS2EndpointBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the STS client should expect to load credentials through
+ * a profile credentials provider.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default STS2EndpointBuilder useProfileCredentialsProvider(
+ String useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
/**
* Amazon AWS Access Key.
*
[camel] 03/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9e1f505d7aac6d9bbb5a2f6b05ce2a96abd7f04b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:33:53 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../aws2/sts/STS2ComponentConfigurer.java | 12 ++++++
.../component/aws2/sts/STS2EndpointConfigurer.java | 12 ++++++
.../component/aws2/sts/STS2EndpointUriFactory.java | 4 +-
.../apache/camel/component/aws2/sts/aws2-sts.json | 48 ++++++++++++----------
4 files changed, 53 insertions(+), 23 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
index 16013fbfbe4..cf22d126f10 100644
--- a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
+++ b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
@@ -40,6 +40,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
case "pojorequest":
case "pojoRequest": getOrCreateConfiguration(target).setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
case "proxyhost":
case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
case "proxyport":
@@ -57,6 +59,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
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;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": getOrCreateConfiguration(target).setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
@@ -81,6 +85,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "overrideEndpoint": return boolean.class;
case "pojorequest":
case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
case "proxyhost":
case "proxyHost": return java.lang.String.class;
case "proxyport":
@@ -98,6 +104,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "uriEndpointOverride": return java.lang.String.class;
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
default: return null;
}
}
@@ -118,6 +126,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
case "pojorequest":
case "pojoRequest": return getOrCreateConfiguration(target).isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName();
case "proxyhost":
case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
case "proxyport":
@@ -135,6 +145,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
default: return null;
}
}
diff --git a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
index c0bac88db8a..47178407855 100644
--- a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
+++ b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
@@ -30,6 +30,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
case "pojorequest":
case "pojoRequest": target.getConfiguration().setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": target.getConfiguration().setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
case "proxyhost":
case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
case "proxyport":
@@ -47,6 +49,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
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 "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
@@ -68,6 +72,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "overrideEndpoint": return boolean.class;
case "pojorequest":
case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
case "proxyhost":
case "proxyHost": return java.lang.String.class;
case "proxyport":
@@ -85,6 +91,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return java.lang.String.class;
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
default: return null;
}
}
@@ -102,6 +110,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
case "pojorequest":
case "pojoRequest": return target.getConfiguration().isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName();
case "proxyhost":
case "proxyHost": return target.getConfiguration().getProxyHost();
case "proxyport":
@@ -119,6 +129,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider();
default: return null;
}
}
diff --git a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
index aa657a371a7..27f411d5e8f 100644
--- a/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
+++ b/components/camel-aws/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
@@ -21,13 +21,14 @@ public class STS2EndpointUriFactory extends org.apache.camel.support.component.E
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(15);
+ Set<String> props = new HashSet<>(17);
props.add("accessKey");
props.add("label");
props.add("lazyStartProducer");
props.add("operation");
props.add("overrideEndpoint");
props.add("pojoRequest");
+ props.add("profileCredentialsName");
props.add("proxyHost");
props.add("proxyPort");
props.add("proxyProtocol");
@@ -37,6 +38,7 @@ public class STS2EndpointUriFactory extends org.apache.camel.support.component.E
props.add("trustAllCertificates");
props.add("uriEndpointOverride");
props.add("useDefaultCredentialsProvider");
+ props.add("useProfileCredentialsProvider");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
Set<String> secretProps = new HashSet<>(2);
secretProps.add("accessKey");
diff --git a/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json b/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
index 219aa089c90..bd7e9671b63 100644
--- a/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
+++ b/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
@@ -27,17 +27,19 @@
"operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField" [...]
"overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination wi [...]
"pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "proxyHost": { "index": 5, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
- "proxyPort": { "index": 6, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
- "proxyProtocol": { "index": 7, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
- "region": { "index": 8, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wil [...]
- "stsClient": { "index": 9, "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "index": 10, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "uriEndpointOverride": { "index": 11, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
- "useDefaultCredentialsProvider": { "index": 12, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
- "autowiredEnabled": { "index": 13, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
- "accessKey": { "index": 14, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 15, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 6, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
+ "proxyPort": { "index": 7, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
+ "proxyProtocol": { "index": 8, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
+ "region": { "index": 9, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wil [...]
+ "stsClient": { "index": 10, "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+ "trustAllCertificates": { "index": 11, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 12, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpo [...]
+ "useDefaultCredentialsProvider": { "index": 13, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
+ "useProfileCredentialsProvider": { "index": 14, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credential [...]
+ "autowiredEnabled": { "index": 15, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "accessKey": { "index": 16, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 17, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
"headers": {
"CamelAwsStsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.sts.STS2Constants#OPERATION" },
@@ -50,16 +52,18 @@
"operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField [...]
"overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination w [...]
"pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "proxyHost": { "index": 4, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
- "proxyPort": { "index": 5, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
- "proxyProtocol": { "index": 6, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when in [...]
- "region": { "index": 7, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wi [...]
- "stsClient": { "index": 8, "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "index": 9, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "uriEndpointOverride": { "index": 10, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndp [...]
- "useDefaultCredentialsProvider": { "index": 11, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
- "lazyStartProducer": { "index": 12, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
- "accessKey": { "index": 13, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 14, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 4, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 5, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" },
+ "proxyPort": { "index": 6, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" },
+ "proxyProtocol": { "index": 7, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when in [...]
+ "region": { "index": 8, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration wi [...]
+ "stsClient": { "index": 9, "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+ "trustAllCertificates": { "index": 10, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 11, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndp [...]
+ "useDefaultCredentialsProvider": { "index": 12, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
+ "useProfileCredentialsProvider": { "index": 13, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Set whether the STS client should expect to load credentia [...]
+ "lazyStartProducer": { "index": 14, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "accessKey": { "index": 15, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
}
}
[camel] 01/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit c7018a2f19126cbdb4a0acd175132228b86ca61f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:29:26 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../camel/component/aws2/sts/STS2Component.java | 4 ++--
.../component/aws2/sts/STS2Configuration.java | 26 ++++++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 1bd98055a7f..59c9293c815 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -47,11 +47,11 @@ public class STS2Component extends DefaultComponent {
STS2Configuration configurationClone = this.configuration != null ? this.configuration.copy() : new STS2Configuration();
STS2Endpoint endpoint = new STS2Endpoint(uri, this, configurationClone);
setProperties(endpoint, parameters);
- if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider())
+ if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configurationClone.isUseProfileCredentialsProvider())
&& configurationClone.getStsClient() == null
&& (configurationClone.getAccessKey() == null || configurationClone.getSecretKey() == null)) {
throw new IllegalArgumentException(
- "useDefaultCredentialsProvider is set to false, Amazon STS client or accessKey and secretKey must be specified");
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon STS client or accessKey and secretKey must be specified");
}
return endpoint;
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
index a200abcde90..a2b13beb4b2 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
@@ -59,6 +59,10 @@ public class STS2Configuration implements Cloneable {
private String uriEndpointOverride;
@UriParam(defaultValue = "false")
private boolean useDefaultCredentialsProvider;
+ @UriParam(defaultValue = "false")
+ private boolean useProfileCredentialsProvider;
+ @UriParam
+ private String profileCredentialsName;
public StsClient getStsClient() {
return stsClient;
@@ -205,6 +209,28 @@ public class STS2Configuration implements Cloneable {
public Boolean isUseDefaultCredentialsProvider() {
return useDefaultCredentialsProvider;
}
+
+ public boolean isUseProfileCredentialsProvider() {
+ return useProfileCredentialsProvider;
+ }
+
+ /**
+ * Set whether the STS client should expect to load credentials through a profile credentials provider.
+ */
+ public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ this.useProfileCredentialsProvider = useProfileCredentialsProvider;
+ }
+
+ public String getProfileCredentialsName() {
+ return profileCredentialsName;
+ }
+
+ /**
+ * If using a profile credentials provider this parameter will set the profile name
+ */
+ public void setProfileCredentialsName(String profileCredentialsName) {
+ this.profileCredentialsName = profileCredentialsName;
+ }
// *************************************************
//
// *************************************************
[camel] 02/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6f229d71a1cebcd5ea29349b8938bf1f037637d2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:31:58 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../aws2/sts/client/STS2ClientFactory.java | 10 ++-
.../client/impl/STS2ClientIAMProfileOptimized.java | 94 ++++++++++++++++++++++
2 files changed, 102 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/STS2ClientFactory.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/STS2ClientFactory.java
index b50c8f87565..53bcdc58da8 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/STS2ClientFactory.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/STS2ClientFactory.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.aws2.sts.client;
import org.apache.camel.component.aws2.sts.STS2Configuration;
import org.apache.camel.component.aws2.sts.client.impl.STS2ClientIAMOptimized;
+import org.apache.camel.component.aws2.sts.client.impl.STS2ClientIAMProfileOptimized;
import org.apache.camel.component.aws2.sts.client.impl.STS2ClientStandardImpl;
/**
@@ -35,7 +36,12 @@ public final class STS2ClientFactory {
* @return StsClient
*/
public static STS2InternalClient getStsClient(STS2Configuration configuration) {
- return Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())
- ? new STS2ClientIAMOptimized(configuration) : new STS2ClientStandardImpl(configuration);
+ if (Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())) {
+ return new STS2ClientIAMOptimized(configuration);
+ } else if (Boolean.TRUE.equals(configuration.isUseProfileCredentialsProvider())) {
+ return new STS2ClientIAMProfileOptimized(configuration);
+ } else {
+ return new STS2ClientStandardImpl(configuration);
+ }
}
}
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
new file mode 100644
index 00000000000..a7b6d0b5711
--- /dev/null
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
@@ -0,0 +1,94 @@
+/*
+ * 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.sts.client.impl;
+
+import org.apache.camel.component.aws2.sts.STS2Configuration;
+import org.apache.camel.component.aws2.sts.client.STS2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.sts.StsClient;
+import software.amazon.awssdk.services.sts.StsClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+import java.net.URI;
+
+/**
+ * Manage an AWS STS client for all users to use. This implementation is for remote instances to manage the credentials
+ * on their own (eliminating credential rotations)
+ */
+public class STS2ClientIAMProfileOptimized implements STS2InternalClient {
+ private static final Logger LOG = LoggerFactory.getLogger(STS2ClientIAMProfileOptimized.class);
+ private STS2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public STS2ClientIAMProfileOptimized(STS2Configuration configuration) {
+ LOG.trace("Creating an AWS STS client for working on AWS Services");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the STS aws client that is used.
+ *
+ * @return Amazon STS Client.
+ */
+ @Override
+ public StsClient getStsClient() {
+ StsClient client = null;
+ StsClientBuilder clientBuilder = StsClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ if (configuration.getProfileCredentialsName() != null) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
+ .credentialsProvider(ProfileCredentialsProvider.create(configuration.getProfileCredentialsName()));
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+}