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/04/05 14:33:49 UTC

[camel] 03/05: CAMEL-18625 - Provide an option to pass specific AWS SAML Profile

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 17560c5d3c0d1d28bddbd48880cd3f89c36e206a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 14:57:46 2023 +0200

    CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../apache/camel/main/AwsVaultConfigurationConfigurer.java   | 12 ++++++++++++
 .../main/AwsVaultConfigurationPropertiesConfigurer.java      | 12 ++++++++++++
 .../META-INF/camel-main-configuration-metadata.json          |  2 ++
 core/camel-main/src/main/docs/main.adoc                      |  4 +++-
 4 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
index e9bba9ad2dd..abf73feb90d 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
@@ -33,6 +33,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "GcpVaultConfiguration": target.setGcpVaultConfiguration(property(camelContext, org.apache.camel.vault.GcpVaultConfiguration.class, value)); return true;
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": target.setHashicorpVaultConfiguration(property(camelContext, org.apache.camel.vault.HashicorpVaultConfiguration.class, value)); return true;
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": target.setProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+        case "profilename":
+        case "ProfileName": target.setProfileName(property(camelContext, java.lang.String.class, value)); return true;
         case "refreshenabled":
         case "RefreshEnabled": target.setRefreshEnabled(property(camelContext, boolean.class, value)); return true;
         case "refreshperiod":
@@ -62,6 +66,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "GcpVaultConfiguration": return org.apache.camel.vault.GcpVaultConfiguration.class;
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": return org.apache.camel.vault.HashicorpVaultConfiguration.class;
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": return boolean.class;
+        case "profilename":
+        case "ProfileName": return java.lang.String.class;
         case "refreshenabled":
         case "RefreshEnabled": return boolean.class;
         case "refreshperiod":
@@ -92,6 +100,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "GcpVaultConfiguration": return target.getGcpVaultConfiguration();
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": return target.getHashicorpVaultConfiguration();
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": return target.isProfileCredentialsProvider();
+        case "profilename":
+        case "ProfileName": return target.getProfileName();
         case "refreshenabled":
         case "RefreshEnabled": return target.isRefreshEnabled();
         case "refreshperiod":
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
index 614950cfbe2..e928064bb7e 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
@@ -33,6 +33,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "GcpVaultConfiguration": target.setGcpVaultConfiguration(property(camelContext, org.apache.camel.vault.GcpVaultConfiguration.class, value)); return true;
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": target.setHashicorpVaultConfiguration(property(camelContext, org.apache.camel.vault.HashicorpVaultConfiguration.class, value)); return true;
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": target.setProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+        case "profilename":
+        case "ProfileName": target.setProfileName(property(camelContext, java.lang.String.class, value)); return true;
         case "refreshenabled":
         case "RefreshEnabled": target.setRefreshEnabled(property(camelContext, boolean.class, value)); return true;
         case "refreshperiod":
@@ -62,6 +66,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "GcpVaultConfiguration": return org.apache.camel.vault.GcpVaultConfiguration.class;
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": return org.apache.camel.vault.HashicorpVaultConfiguration.class;
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": return boolean.class;
+        case "profilename":
+        case "ProfileName": return java.lang.String.class;
         case "refreshenabled":
         case "RefreshEnabled": return boolean.class;
         case "refreshperiod":
@@ -92,6 +100,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "GcpVaultConfiguration": return target.getGcpVaultConfiguration();
         case "hashicorpvaultconfiguration":
         case "HashicorpVaultConfiguration": return target.getHashicorpVaultConfiguration();
+        case "profilecredentialsprovider":
+        case "ProfileCredentialsProvider": return target.isProfileCredentialsProvider();
+        case "profilename":
+        case "ProfileName": return target.getProfileName();
         case "refreshenabled":
         case "RefreshEnabled": return target.isRefreshEnabled();
         case "refreshperiod":
diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index dac149fe578..84dd30a3935 100644
--- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -210,6 +210,8 @@
     { "name": "camel.threadpool.timeUnit", "description": "Sets the default time unit used for keep alive time", "sourceType": "org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "object", "javaType": "java.util.concurrent.TimeUnit" },
     { "name": "camel.vault.aws.accessKey", "description": "The AWS access key", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.defaultCredentialsProvider", "description": "Define if we want to use the AWS Default Credentials Provider or not", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.vault.aws.profileCredentialsProvider", "description": "Define if we want to use the AWS Profile Credentials Provider or not", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.vault.aws.profileName", "description": "Define the profile name to use if Profile Credentials Provider is selected", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.refreshEnabled", "description": "Whether to automatically reload Camel upon secrets being updated in AWS.", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.aws.refreshPeriod", "description": "The period (millis) between checking AWS for updated secrets.", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "integer", "javaType": "long", "defaultValue": 30000 },
     { "name": "camel.vault.aws.region", "description": "The AWS region", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc
index 5c23b953115..ef7c1e1407a 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -209,13 +209,15 @@ The camel.rest supports 27 options, which are listed below.
 |===
 
 === Camel AWS Vault configurations
-The camel.vault.aws supports 7 options, which are listed below.
+The camel.vault.aws supports 9 options, which are listed below.
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *camel.vault.aws.accessKey* | The AWS access key |  | String
 | *camel.vault.aws.default{zwsp}CredentialsProvider* | Define if we want to use the AWS Default Credentials Provider or not | false | boolean
+| *camel.vault.aws.profile{zwsp}CredentialsProvider* | Define if we want to use the AWS Profile Credentials Provider or not | false | boolean
+| *camel.vault.aws.profileName* | Define the profile name to use if Profile Credentials Provider is selected |  | String
 | *camel.vault.aws.refreshEnabled* | Whether to automatically reload Camel upon secrets being updated in AWS. | false | boolean
 | *camel.vault.aws.refreshPeriod* | The period (millis) between checking AWS for updated secrets. | 30000 | long
 | *camel.vault.aws.region* | The AWS region |  | String