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 2020/11/18 10:53:47 UTC

[camel] branch master updated (6bde1ea -> d4a9976)

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

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


    from 6bde1ea  CAMEL-15836 - Camel-AWS2-SQS: enable autowire on the SQS Client, Added a note to migration guide
     new 2fed7cb  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client
     new 8ac371e  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen component and configurers
     new d0af489  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, fixed tests
     new f479370  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, CS
     new 90bdcc1  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen catalog
     new d4a9976  CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Added a note in the migration guide

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  |  6 ++---
 .../camel/catalog/docs/aws2-sts-component.adoc     | 10 +++-----
 .../aws2/sts/STS2ComponentConfigurer.java          | 11 ++++----
 .../component/aws2/sts/STS2EndpointConfigurer.java | 11 ++++----
 .../component/aws2/sts/STS2EndpointUriFactory.java |  3 +--
 .../apache/camel/component/aws2/sts/aws2-sts.json  |  6 ++---
 .../src/main/docs/aws2-sts-component.adoc          | 10 +++-----
 .../camel/component/aws2/sts/STS2Component.java    | 21 ----------------
 .../component/aws2/sts/STS2Configuration.java      | 15 +----------
 .../aws2/sts/STS2ComponentClientRegistryTest.java  | 15 +----------
 .../dsl/Aws2StsComponentBuilderFactory.java        | 16 ------------
 .../endpoint/dsl/STS2EndpointBuilderFactory.java   | 29 ----------------------
 .../modules/ROOT/pages/aws2-sts-component.adoc     | 10 +++-----
 .../ROOT/pages/camel-3x-upgrade-guide-3_7.adoc     |  5 ++++
 14 files changed, 34 insertions(+), 134 deletions(-)


[camel] 01/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client

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

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

commit 2fed7cb7d6fd853c436f0f8b7abe67dd0631c9c7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 10:44:58 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client
---
 .../apache/camel/component/aws2/sts/STS2Component.java | 18 ------------------
 .../camel/component/aws2/sts/STS2Configuration.java    | 15 +--------------
 2 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 4519526..1078058 100644
--- a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -55,9 +55,6 @@ public class STS2Component extends DefaultComponent {
         STS2Configuration configuration = this.configuration != null ? this.configuration.copy() : new STS2Configuration();
         STS2Endpoint endpoint = new STS2Endpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
-            checkAndSetRegistryClient(configuration, endpoint);
-        }
         if (configuration.getStsClient() == null
                 && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("Amazon STS client or accessKey and secretKey must be specified");
@@ -76,19 +73,4 @@ public class STS2Component extends DefaultComponent {
     public void setConfiguration(STS2Configuration configuration) {
         this.configuration = configuration;
     }
-
-    private void checkAndSetRegistryClient(STS2Configuration configuration, STS2Endpoint endpoint) {
-        if (ObjectHelper.isEmpty(endpoint.getConfiguration().getStsClient())) {
-            LOG.debug("Looking for an StsClient instance in the registry");
-            Set<StsClient> clients = getCamelContext().getRegistry().findByType(StsClient.class);
-            if (clients.size() == 1) {
-                LOG.debug("Found exactly one StsClient instance in the registry");
-                configuration.setStsClient(clients.stream().findFirst().get());
-            } else {
-                LOG.debug("No StsClient instance in the registry");
-            }
-        } else {
-            LOG.debug("StsClient instance is already set at endpoint level: skipping the check in the registry");
-        }
-    }
 }
diff --git a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
index 2cc043d..ecf0679 100644
--- a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
+++ b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Configuration.java
@@ -32,6 +32,7 @@ public class STS2Configuration implements Cloneable {
     @Metadata(required = true)
     private String label;
     @UriParam
+    @Metadata(autowired = true)
     private StsClient stsClient;
     @UriParam(label = "security", secret = true)
     private String accessKey;
@@ -52,8 +53,6 @@ public class STS2Configuration implements Cloneable {
     private boolean pojoRequest;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
-    @UriParam(label = "common", defaultValue = "true")
-    private boolean autoDiscoverClient = true;
 
     public StsClient getStsClient() {
         return stsClient;
@@ -166,18 +165,6 @@ public class STS2Configuration implements Cloneable {
         this.trustAllCertificates = trustAllCertificates;
     }
 
-    public boolean isAutoDiscoverClient() {
-        return autoDiscoverClient;
-    }
-
-    /**
-     * Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry
-     * automatically otherwise it will skip that checking.
-     */
-    public void setAutoDiscoverClient(boolean autoDiscoverClient) {
-        this.autoDiscoverClient = autoDiscoverClient;
-    }
-
     // *************************************************
     //
     // *************************************************


[camel] 03/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, fixed tests

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

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

commit d0af489e0185a5e78406983bc1cb5ecb93cbfd55
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 10:55:07 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, fixed tests
---
 .../aws2/sts/STS2ComponentClientRegistryTest.java          | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
index b075ee9..4f7355c 100644
--- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
+++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
@@ -47,19 +47,7 @@ public class STS2ComponentClientRegistryTest extends CamelTestSupport {
     }
 
     @Test
-    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
-        AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
-        context.getRegistry().bind("amazonStsClient", clientMock);
-        STS2Component component = context.getComponent("aws2-sts", STS2Component.class);
-        STS2Endpoint endpoint = (STS2Endpoint) component
-                .createEndpoint("aws2-sts://TestDomain?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(clientMock, endpoint.getConfiguration().getStsClient());
-    }
-
-    @Test
-    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+    public void createEndpointWithAutowire() throws Exception {
 
         AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
         context.getRegistry().bind("amazonStsClient", clientMock);


[camel] 02/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen component and configurers

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

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

commit 8ac371edebc609a4fd65ffd669c48442c38927f0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 10:54:31 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen component and configurers
---
 .../camel/catalog/docs/aws2-sts-component.adoc     | 10 +++-----
 .../aws2/sts/STS2ComponentConfigurer.java          | 11 ++++----
 .../component/aws2/sts/STS2EndpointConfigurer.java | 11 ++++----
 .../component/aws2/sts/STS2EndpointUriFactory.java |  3 +--
 .../apache/camel/component/aws2/sts/aws2-sts.json  |  6 ++---
 .../src/main/docs/aws2-sts-component.adoc          | 10 +++-----
 .../camel/component/aws2/sts/STS2Component.java    |  3 ---
 .../dsl/Aws2StsComponentBuilderFactory.java        | 16 ------------
 .../endpoint/dsl/STS2EndpointBuilderFactory.java   | 29 ----------------------
 .../modules/ROOT/pages/aws2-sts-component.adoc     | 10 +++-----
 10 files changed, 25 insertions(+), 84 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
index 1ffccbe..993570c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
@@ -42,14 +42,13 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Security Token Service (STS) component supports 14 options, which are listed below.
+The AWS 2 Security Token Service (STS) component supports 13 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | STS2Configuration
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
@@ -58,7 +57,7 @@ The AWS 2 Security Token Service (STS) component supports 14 options, which are
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *autowiredEnabled* (advanced) | 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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String
@@ -88,13 +87,12 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (13 parameters):
+=== Query Parameters (12 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
@@ -102,7 +100,7 @@ with the following path and query parameters:
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String
diff --git a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
index 60c63df..b4cab09 100644
--- a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
+++ b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
@@ -30,8 +30,6 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "autowiredenabled":
         case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.sts.STS2Configuration.class, value)); return true;
@@ -58,12 +56,15 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"stsClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return java.lang.String.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "autowiredenabled":
         case "autowiredEnabled": return boolean.class;
         case "configuration": return org.apache.camel.component.aws2.sts.STS2Configuration.class;
@@ -95,8 +96,6 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "autowiredenabled":
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "configuration": return target.getConfiguration();
diff --git a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
index 9dd7991..480acc1 100644
--- a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
+++ b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
@@ -23,8 +23,6 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.sts.STS2Operations.class, value)); return true;
@@ -49,12 +47,15 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
     }
 
     @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"stsClient"};
+    }
+
+    @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return java.lang.String.class;
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return boolean.class;
         case "lazystartproducer":
         case "lazyStartProducer": return boolean.class;
         case "operation": return org.apache.camel.component.aws2.sts.STS2Operations.class;
@@ -84,8 +85,6 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return target.getConfiguration().getAccessKey();
-        case "autodiscoverclient":
-        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         case "operation": return target.getConfiguration().getOperation();
diff --git a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
index f88df1e..e4fc0be 100644
--- a/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
+++ b/components/camel-aws2-sts/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointUriFactory.java
@@ -20,8 +20,7 @@ public class STS2EndpointUriFactory extends org.apache.camel.support.component.E
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(14);
-        props.add("autoDiscoverClient");
+        Set<String> props = new HashSet<>(13);
         props.add("proxyProtocol");
         props.add("secretKey");
         props.add("synchronous");
diff --git a/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json b/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
index 71729b7..13c099c 100644
--- a/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
+++ b/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
@@ -22,7 +22,6 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail during star [...]
     "operation": { "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": "configura [...]
@@ -31,7 +30,7 @@
     "proxyPort": { "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": { "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 instantiating t [...]
     "region": { "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 will expect the [...]
-    "stsClient": { "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+    "stsClient": { "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": { "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" },
     "autowiredEnabled": { "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 type, which t [...]
     "accessKey": { "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" },
@@ -39,7 +38,6 @@
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Logical name" },
-    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client ins [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail during sta [...]
     "operation": { "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": "configur [...]
     "pojoRequest": { "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" },
@@ -47,7 +45,7 @@
     "proxyPort": { "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": { "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 instantiating  [...]
     "region": { "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 will expect th [...]
-    "stsClient": { "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+    "stsClient": { "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": { "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" },
     "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
     "accessKey": { "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" },
diff --git a/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc b/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
index 1ffccbe..993570c 100644
--- a/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
+++ b/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
@@ -42,14 +42,13 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Security Token Service (STS) component supports 14 options, which are listed below.
+The AWS 2 Security Token Service (STS) component supports 13 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | STS2Configuration
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
@@ -58,7 +57,7 @@ The AWS 2 Security Token Service (STS) component supports 14 options, which are
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *autowiredEnabled* (advanced) | 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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String
@@ -88,13 +87,12 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (13 parameters):
+=== Query Parameters (12 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
@@ -102,7 +100,7 @@ with the following path and query parameters:
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String
diff --git a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 1078058..6392f2e 100644
--- a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -17,17 +17,14 @@
 package org.apache.camel.component.aws2.sts;
 
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import software.amazon.awssdk.services.sts.StsClient;
 
 /**
  * For working with Amazon STS SDK v2.
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
index ed6e0d1..492f54a 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StsComponentBuilderFactory.java
@@ -47,21 +47,6 @@ public interface Aws2StsComponentBuilderFactory {
      */
     interface Aws2StsComponentBuilder extends ComponentBuilder<STS2Component> {
         /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default Aws2StsComponentBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * Component configuration.
          * 
          * The option is a:
@@ -264,7 +249,6 @@ public interface Aws2StsComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "autoDiscoverClient": getOrCreateConfiguration((STS2Component) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((STS2Component) component).setConfiguration((org.apache.camel.component.aws2.sts.STS2Configuration) value); return true;
             case "lazyStartProducer": ((STS2Component) component).setLazyStartProducer((boolean) value); return true;
             case "operation": getOrCreateConfiguration((STS2Component) component).setOperation((org.apache.camel.component.aws2.sts.STS2Operations) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
index 881d3aa..0b1f540 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java
@@ -39,35 +39,6 @@ public interface STS2EndpointBuilderFactory {
             return (AdvancedSTS2EndpointBuilder) this;
         }
         /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default STS2EndpointBuilder autoDiscoverClient(
-                boolean autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
-         * Setting the autoDiscoverClient mechanism, if true, the component will
-         * look for a client instance in the registry automatically otherwise it
-         * will skip that checking.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Default: true
-         * Group: common
-         */
-        default STS2EndpointBuilder autoDiscoverClient(String autoDiscoverClient) {
-            doSetProperty("autoDiscoverClient", autoDiscoverClient);
-            return this;
-        }
-        /**
          * Whether the producer should be started lazy (on the first message).
          * By starting lazy you can use this to allow CamelContext and routes to
          * startup in situations where a producer may otherwise fail during
diff --git a/docs/components/modules/ROOT/pages/aws2-sts-component.adoc b/docs/components/modules/ROOT/pages/aws2-sts-component.adoc
index f938f1a..fed408e 100644
--- a/docs/components/modules/ROOT/pages/aws2-sts-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-sts-component.adoc
@@ -44,14 +44,13 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Security Token Service (STS) component supports 14 options, which are listed below.
+The AWS 2 Security Token Service (STS) component supports 13 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | STS2Configuration
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
@@ -60,7 +59,7 @@ The AWS 2 Security Token Service (STS) component supports 14 options, which are
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *autowiredEnabled* (advanced) | 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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String
@@ -90,13 +89,12 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (13 parameters):
+=== Query Parameters (12 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. There are 3 enums and the value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
@@ -104,7 +102,7 @@ with the following path and query parameters:
 | *proxyPort* (producer) | To define a proxy port when instantiating the STS client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String
-| *stsClient* (producer) | To use a existing configured AWS STS as client |  | StsClient
+| *stsClient* (producer) | *Autowired* To use a existing configured AWS STS as client |  | StsClient
 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *accessKey* (security) | Amazon AWS Access Key |  | String


[camel] 06/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Added a note in the migration guide

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

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

commit d4a9976b863f16be15b22a48567351ea49b7c949
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 11:53:02 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Added a note in the migration guide
---
 docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
index 3623281..b990b32 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_7.adoc
@@ -244,4 +244,9 @@ In this context, it wasn't having any sense to maintain the autodiscoverClient o
 The camel-aws2-sqs has now support for autowiring the amazonSQSClient option with SqsClient instance coming from the registry.
 In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
 
+=== Camel-AWS2-STS Autowire support
+
+The camel-aws2-sts has now support for autowiring the stsClient option with StsClient instance coming from the registry.
+In this context, it wasn't having any sense to maintain the autodiscoverClient option, which has been now removed.
+
 


[camel] 04/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, CS

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

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

commit f479370ff45fec59440a9232bd7eeb4673796289
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 10:58:16 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, CS
---
 .../apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
index 4f7355c..c8ff082 100644
--- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
+++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
@@ -20,7 +20,6 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 


[camel] 05/06: CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen catalog

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

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

commit 90bdcc1eb63bd2d3d6bb6c1e1b49c94c8adeacb4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 18 11:52:16 2020 +0100

    CAMEL-15836 - Camel-AWS2-STS: enable autowire on the STS Client, Regen catalog
---
 .../resources/org/apache/camel/catalog/components/aws2-sts.json     | 6 ++----
 1 file changed, 2 insertions(+), 4 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 71729b7..13c099c 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
@@ -22,7 +22,6 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client inst [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail during star [...]
     "operation": { "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": "configura [...]
@@ -31,7 +30,7 @@
     "proxyPort": { "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": { "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 instantiating t [...]
     "region": { "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 will expect the [...]
-    "stsClient": { "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+    "stsClient": { "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": { "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" },
     "autowiredEnabled": { "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 type, which t [...]
     "accessKey": { "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" },
@@ -39,7 +38,6 @@
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Logical name" },
-    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client ins [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail during sta [...]
     "operation": { "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": "configur [...]
     "pojoRequest": { "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" },
@@ -47,7 +45,7 @@
     "proxyPort": { "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": { "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 instantiating  [...]
     "region": { "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 will expect th [...]
-    "stsClient": { "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
+    "stsClient": { "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": { "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" },
     "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
     "accessKey": { "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" },