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 15:20:48 UTC

[camel-spring-boot] branch main updated (481f7fd9151 -> b16fb70536b)

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-spring-boot.git


    from 481f7fd9151 Regen
     new c6af6472e07 CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
     new c14d26b8aa4 CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
     new b16fb70536b Regen

The 3 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:
 .../catalog/components/vertx-websocket.json        |  4 ++++
 .../src/main/docs/vertx-websocket.json             | 13 ++++++++++
 .../VertxWebsocketComponentConfiguration.java      | 28 ++++++++++++++++++++++
 .../src/main/docs/spring-boot.json                 | 13 ++++++++++
 .../boot/vault/AwsVaultAutoConfiguration.java      |  2 ++
 .../vault/AwsVaultConfigurationProperties.java     | 25 +++++++++++++++++++
 .../boot/vault/AwsVaultConfigurationTest.java      | 14 +++++++----
 7 files changed, 94 insertions(+), 5 deletions(-)


[camel-spring-boot] 03/03: Regen

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-spring-boot.git

commit b16fb70536b77a485c7825fb9c130a7fa63eb5fc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 17:20:33 2023 +0200

    Regen
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../catalog/components/vertx-websocket.json        |  4 ++++
 .../src/main/docs/vertx-websocket.json             | 13 ++++++++++
 .../VertxWebsocketComponentConfiguration.java      | 28 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)

diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/vertx-websocket.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/vertx-websocket.json
index aa2d51cce5f..1adba0f1233 100644
--- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/vertx-websocket.json
+++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/vertx-websocket.json
@@ -24,9 +24,11 @@
   "componentProperties": {
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...]
     "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 [...]
+    "allowOriginHeader": { "kind": "property", "displayName": "Allow Origin Header", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the WebSocket client should add the Origin header to the WebSocket handshake request." },
     "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 [...]
     "defaultHost": { "kind": "property", "displayName": "Default Host", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0.0.0.0", "description": "Default value for host name that the WebSocket should bind to" },
     "defaultPort": { "kind": "property", "displayName": "Default Port", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "description": "Default value for the port that the WebSocket should bind to" },
+    "originHeaderUrl": { "kind": "property", "displayName": "Origin Header Url", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The value of the Origin header that the WebSocket client should use on the WebSocket handshake request. When not specified, the WebSocket client will automatically determine the value for the Origin from the request URL." },
     "router": { "kind": "property", "displayName": "Router", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.vertx.ext.web.Router", "deprecated": false, "autowired": false, "secret": false, "description": "To provide a custom vertx router to use on the WebSocket server" },
     "vertx": { "kind": "property", "displayName": "Vertx", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.vertx.core.Vertx", "deprecated": false, "autowired": false, "secret": false, "description": "To use an existing vertx instead of creating a new instance" },
     "vertxOptions": { "kind": "property", "displayName": "Vertx Options", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.vertx.core.VertxOptions", "deprecated": false, "autowired": false, "secret": false, "description": "To provide a custom set of vertx options for configuring vertx" },
@@ -43,9 +45,11 @@
     "port": { "kind": "path", "displayName": "Port", "group": "common", "label": "", "required": true, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "WebSocket port number to use." },
     "path": { "kind": "path", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "WebSocket path to use." },
     "allowedOriginPattern": { "kind": "parameter", "displayName": "Allowed Origin Pattern", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "Regex pattern to match the origin header sent by WebSocket clients" },
+    "allowOriginHeader": { "kind": "parameter", "displayName": "Allow Origin Header", "group": "consumer", "label": "producer,consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "Whether the WebSocket client should add the Origin header to th [...]
     "consumeAsClient": { "kind": "parameter", "displayName": "Consume As Client", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "When set to true, the consumer acts as a WebSocket client, creating exchang [...]
     "fireWebSocketConnectionEvents": { "kind": "parameter", "displayName": "Fire Web Socket Connection Events", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "Whether the server consumer will create a mes [...]
     "maxReconnectAttempts": { "kind": "parameter", "displayName": "Max Reconnect Attempts", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "When consumeAsClient is set to true this sets the maximum number of allow [...]
+    "originHeaderUrl": { "kind": "parameter", "displayName": "Origin Header Url", "group": "consumer", "label": "producer,consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "The value of the Origin header that the WebSocket client should use on the WebSoc [...]
     "reconnectInitialDelay": { "kind": "parameter", "displayName": "Reconnect Initial Delay", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "When consumeAsClient is set to true this sets the initial delay in mill [...]
     "reconnectInterval": { "kind": "parameter", "displayName": "Reconnect Interval", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "When consumeAsClient is set to true this sets the interval in milliseconds at [...]
     "router": { "kind": "parameter", "displayName": "Router", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "io.vertx.ext.web.Router", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration", "configurationField": "configuration", "description": "To use an existing vertx router for the HTTP server" },
diff --git a/components-starter/camel-vertx-websocket-starter/src/main/docs/vertx-websocket.json b/components-starter/camel-vertx-websocket-starter/src/main/docs/vertx-websocket.json
index f1ab5c9dc89..9d00b5c34ee 100644
--- a/components-starter/camel-vertx-websocket-starter/src/main/docs/vertx-websocket.json
+++ b/components-starter/camel-vertx-websocket-starter/src/main/docs/vertx-websocket.json
@@ -13,6 +13,13 @@
     }
   ],
   "properties": [
+    {
+      "name": "camel.component.vertx-websocket.allow-origin-header",
+      "type": "java.lang.Boolean",
+      "description": "Whether the WebSocket client should add the Origin header to the WebSocket handshake request.",
+      "sourceType": "org.apache.camel.component.vertx.websocket.springboot.VertxWebsocketComponentConfiguration",
+      "defaultValue": true
+    },
     {
       "name": "camel.component.vertx-websocket.autowired-enabled",
       "type": "java.lang.Boolean",
@@ -59,6 +66,12 @@
       "sourceType": "org.apache.camel.component.vertx.websocket.springboot.VertxWebsocketComponentConfiguration",
       "defaultValue": false
     },
+    {
+      "name": "camel.component.vertx-websocket.origin-header-url",
+      "type": "java.lang.String",
+      "description": "The value of the Origin header that the WebSocket client should use on the WebSocket handshake request. When not specified, the WebSocket client will automatically determine the value for the Origin from the request URL.",
+      "sourceType": "org.apache.camel.component.vertx.websocket.springboot.VertxWebsocketComponentConfiguration"
+    },
     {
       "name": "camel.component.vertx-websocket.router",
       "type": "io.vertx.ext.web.Router",
diff --git a/components-starter/camel-vertx-websocket-starter/src/main/java/org/apache/camel/component/vertx/websocket/springboot/VertxWebsocketComponentConfiguration.java b/components-starter/camel-vertx-websocket-starter/src/main/java/org/apache/camel/component/vertx/websocket/springboot/VertxWebsocketComponentConfiguration.java
index 9f727b4d474..8f8070af301 100644
--- a/components-starter/camel-vertx-websocket-starter/src/main/java/org/apache/camel/component/vertx/websocket/springboot/VertxWebsocketComponentConfiguration.java
+++ b/components-starter/camel-vertx-websocket-starter/src/main/java/org/apache/camel/component/vertx/websocket/springboot/VertxWebsocketComponentConfiguration.java
@@ -58,6 +58,11 @@ public class VertxWebsocketComponentConfiguration
      * and prolong the total processing time of the processing.
      */
     private Boolean lazyStartProducer = false;
+    /**
+     * Whether the WebSocket client should add the Origin header to the
+     * WebSocket handshake request.
+     */
+    private Boolean allowOriginHeader = true;
     /**
      * Whether autowiring is enabled. This is used for automatic autowiring
      * options (the option must be marked as autowired) by looking up in the
@@ -75,6 +80,13 @@ public class VertxWebsocketComponentConfiguration
      * Default value for the port that the WebSocket should bind to
      */
     private Integer defaultPort = 0;
+    /**
+     * The value of the Origin header that the WebSocket client should use on
+     * the WebSocket handshake request. When not specified, the WebSocket client
+     * will automatically determine the value for the Origin from the request
+     * URL.
+     */
+    private String originHeaderUrl;
     /**
      * To provide a custom vertx router to use on the WebSocket server. The
      * option is a io.vertx.ext.web.Router type.
@@ -111,6 +123,14 @@ public class VertxWebsocketComponentConfiguration
         this.lazyStartProducer = lazyStartProducer;
     }
 
+    public Boolean getAllowOriginHeader() {
+        return allowOriginHeader;
+    }
+
+    public void setAllowOriginHeader(Boolean allowOriginHeader) {
+        this.allowOriginHeader = allowOriginHeader;
+    }
+
     public Boolean getAutowiredEnabled() {
         return autowiredEnabled;
     }
@@ -135,6 +155,14 @@ public class VertxWebsocketComponentConfiguration
         this.defaultPort = defaultPort;
     }
 
+    public String getOriginHeaderUrl() {
+        return originHeaderUrl;
+    }
+
+    public void setOriginHeaderUrl(String originHeaderUrl) {
+        this.originHeaderUrl = originHeaderUrl;
+    }
+
     public Router getRouter() {
         return router;
     }


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

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-spring-boot.git

commit c6af6472e075e2104ee7a004f13de42aa600c34d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 16:55:48 2023 +0200

    CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../boot/vault/AwsVaultAutoConfiguration.java      |  2 ++
 .../vault/AwsVaultConfigurationProperties.java     | 25 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
index 20d3eeac81a..d6fe69c10f1 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
@@ -37,6 +37,8 @@ public class AwsVaultAutoConfiguration {
         answer.setSecretKey(config.getSecretKey());
         answer.setRegion(config.getRegion());
         answer.setDefaultCredentialsProvider(config.isDefaultCredentialsProvider());
+        answer.setProfileCredentialsProvider(config.isProfileCredentialsProvider());
+        answer.setProfileName(config.getProfileName());
         answer.setRefreshEnabled(config.isRefreshEnabled());
         answer.setRefreshPeriod(config.getRefreshPeriod());
         answer.setSecrets(config.getSecrets());
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
index 9657d044321..aaa40d8d589 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
@@ -41,6 +41,16 @@ public class AwsVaultConfigurationProperties {
      */
     private boolean defaultCredentialsProvider;
 
+    /**
+     * Define if we want to use the AWS Profile Credentials Provider or not
+     */
+    private boolean profileCredentialsProvider;
+
+    /**
+     * Define the profile name in case we are using profile credentials provider
+     */
+    private String profileName;
+
     /**
      * Define if we want to refresh the secrets on update
      */
@@ -87,6 +97,21 @@ public class AwsVaultConfigurationProperties {
     public void setDefaultCredentialsProvider(boolean defaultCredentialsProvider) {
         this.defaultCredentialsProvider = defaultCredentialsProvider;
     }
+    public boolean isProfileCredentialsProvider() {
+        return profileCredentialsProvider;
+    }
+
+    public void setProfileCredentialsProvider(boolean profileCredentialsProvider) {
+        this.profileCredentialsProvider = profileCredentialsProvider;
+    }
+
+    public String getProfileName() {
+        return profileName;
+    }
+
+    public void setProfileName(String profileName) {
+        this.profileName = profileName;
+    }
 
     public boolean isRefreshEnabled() {
         return refreshEnabled;


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

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-spring-boot.git

commit c14d26b8aa4decad01e52a126d11f2a111feaa41
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 17:17:11 2023 +0200

    CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 core/camel-spring-boot/src/main/docs/spring-boot.json      | 13 +++++++++++++
 .../camel/spring/boot/vault/AwsVaultConfigurationTest.java | 14 +++++++++-----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json b/core/camel-spring-boot/src/main/docs/spring-boot.json
index cd558d83b47..c72338f9f84 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -1402,6 +1402,19 @@
       "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties",
       "defaultValue": false
     },
+    {
+      "name": "camel.vault.aws.profile-credentials-provider",
+      "type": "java.lang.Boolean",
+      "description": "Define if we want to use the AWS Profile Credentials Provider or not",
+      "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties",
+      "defaultValue": false
+    },
+    {
+      "name": "camel.vault.aws.profile-name",
+      "type": "java.lang.String",
+      "description": "Define the profile name in case we are using profile credentials provider",
+      "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties"
+    },
     {
       "name": "camel.vault.aws.refresh-enabled",
       "type": "java.lang.Boolean",
diff --git a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
index 8df230702a5..a0117804477 100644
--- a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
+++ b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
@@ -35,10 +35,12 @@ import org.springframework.test.annotation.DirtiesContext;
                 "camel.vault.aws.accessKey=myAccessKey",
                 "camel.vault.aws.secretKey=mySecretKey",
                 "camel.vault.aws.region=myRegion",
-                "camel.vault.aws.defaultCredentialsProvider=true",
+                "camel.vault.aws.defaultCredentialsProvider=false",
                 "camel.vault.aws.refreshPeriod=60000",
-                "camel.vault.aws.refreshEnabled=true",
-                "camel.vault.aws.secrets=supersecret"
+                "camel.vault.aws.refreshEnabled=false",
+                "camel.vault.aws.secrets=supersecret",
+                "camel.vault.aws.profile-credentials-provider=true",
+                "camel.vault.aws.profile-name=test"
         }
 )
 public class AwsVaultConfigurationTest {
@@ -51,9 +53,11 @@ public class AwsVaultConfigurationTest {
         Assertions.assertEquals("myAccessKey", camelContext.getVaultConfiguration().aws().getAccessKey());
         Assertions.assertEquals("mySecretKey", camelContext.getVaultConfiguration().aws().getSecretKey());
         Assertions.assertEquals("myRegion", camelContext.getVaultConfiguration().aws().getRegion());
-        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isDefaultCredentialsProvider());
-        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isRefreshEnabled());
+        Assertions.assertEquals(false, camelContext.getVaultConfiguration().aws().isDefaultCredentialsProvider());
+        Assertions.assertEquals(false, camelContext.getVaultConfiguration().aws().isRefreshEnabled());
         Assertions.assertEquals(60000, camelContext.getVaultConfiguration().aws().getRefreshPeriod());
         Assertions.assertEquals("supersecret", camelContext.getVaultConfiguration().aws().getSecrets());
+        Assertions.assertEquals("test", camelContext.getVaultConfiguration().aws().getProfileName());
+        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isProfileCredentialsProvider());
     }
 }