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 2025/03/05 09:17:58 UTC
(camel-spring-boot) branch main updated: CAMEL-21826 - Camel-IBM-Secrtes-manager: Support properties function in Spring boot (#1387)
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
The following commit(s) were added to refs/heads/main by this push:
new 9876883a1a8 CAMEL-21826 - Camel-IBM-Secrtes-manager: Support properties function in Spring boot (#1387)
9876883a1a8 is described below
commit 9876883a1a89ed11590f9f3a16ad3ac43bb4dbe2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 5 10:17:53 2025 +0100
CAMEL-21826 - Camel-IBM-Secrtes-manager: Support properties function in Spring boot (#1387)
* CAMEL-21826 - Camel-IBM-Secrtes-manager: Support properties function in Spring boot
Signed-off-by: Andrea Cosentino <an...@gmail.com>
* Regen
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---------
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../src/main/docs/spring-boot.json | 17 ++++++
.../boot/vault/IBMVaultAutoConfiguration.java | 41 ++++++++++++++
.../vault/IBMVaultConfigurationProperties.java | 49 ++++++++++++++++
...rk.boot.autoconfigure.AutoConfiguration.imports | 1 +
.../IBMSecretsManagerVaultConfigurationTest.java | 44 +++++++++++++++
tooling/camel-spring-boot-dependencies/pom.xml | 66 +++++++++++-----------
6 files changed, 185 insertions(+), 33 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 83273ca07aa..ed5ae454e6d 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -161,6 +161,11 @@
"type": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties",
"sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties"
},
+ {
+ "name": "camel.vault.ibm",
+ "type": "org.apache.camel.spring.boot.vault.IBMVaultConfigurationProperties",
+ "sourceType": "org.apache.camel.spring.boot.vault.IBMVaultConfigurationProperties"
+ },
{
"name": "camel.vault.kubernetes",
"type": "org.apache.camel.spring.boot.vault.KubernetesVaultConfigurationProperties",
@@ -1926,6 +1931,18 @@
"description": "The Hashicorp Vault Token for accessing the service",
"sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties"
},
+ {
+ "name": "camel.vault.ibm.service-url",
+ "type": "java.lang.String",
+ "description": "The IBM Secrets Manager Service URL",
+ "sourceType": "org.apache.camel.spring.boot.vault.IBMVaultConfigurationProperties"
+ },
+ {
+ "name": "camel.vault.ibm.token",
+ "type": "java.lang.String",
+ "description": "The IBM Secrets Manager Token",
+ "sourceType": "org.apache.camel.spring.boot.vault.IBMVaultConfigurationProperties"
+ },
{
"name": "camel.vault.kubernetes.refresh-enabled",
"type": "java.lang.Boolean",
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultAutoConfiguration.java
new file mode 100644
index 00000000000..d24f5c5dc25
--- /dev/null
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultAutoConfiguration.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.boot.vault;
+
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.vault.IBMSecretsManagerVaultConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration(proxyBeanMethods = false)
+@ConditionalOnBean(CamelAutoConfiguration.class)
+@EnableConfigurationProperties(IBMVaultConfigurationProperties.class)
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+public class IBMVaultAutoConfiguration {
+
+ @Bean
+ public IBMSecretsManagerVaultConfiguration ibmSecretsManagerVaultConfiguration(IBMVaultConfigurationProperties config) {
+ IBMSecretsManagerVaultConfiguration answer = new IBMSecretsManagerVaultConfiguration();
+ answer.setToken(config.getToken());
+ answer.setServiceUrl(config.getServiceUrl());
+ return answer;
+ }
+
+}
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultConfigurationProperties.java
new file mode 100644
index 00000000000..7c92a8565ee
--- /dev/null
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/IBMVaultConfigurationProperties.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.boot.vault;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.vault.ibm")
+public class IBMVaultConfigurationProperties {
+
+ /**
+ * The IBM Secrets Manager Token
+ */
+ private String token;
+
+ /**
+ * The IBM Secrets Manager Service URL
+ */
+ private String serviceUrl;
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getServiceUrl() {
+ return serviceUrl;
+ }
+
+ public void setServiceUrl(String serviceUrl) {
+ this.serviceUrl = serviceUrl;
+ }
+}
diff --git a/core/camel-spring-boot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/core/camel-spring-boot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index cf3819c1455..33babc9c09c 100644
--- a/core/camel-spring-boot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/core/camel-spring-boot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -41,3 +41,4 @@ org.apache.camel.spring.boot.vault.AzureVaultAutoConfiguration
org.apache.camel.spring.boot.vault.HashicorpVaultAutoConfiguration
org.apache.camel.spring.boot.vault.KubernetesVaultAutoConfiguration
org.apache.camel.spring.boot.vault.KubernetesConfigMapVaultAutoConfiguration
+org.apache.camel.spring.boot.vault.IBMVaultAutoConfiguration
diff --git a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/IBMSecretsManagerVaultConfigurationTest.java b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/IBMSecretsManagerVaultConfigurationTest.java
new file mode 100644
index 00000000000..b346c3220dc
--- /dev/null
+++ b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/IBMSecretsManagerVaultConfigurationTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.boot.vault;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.annotation.DirtiesContext;
+
+@DirtiesContext
+@CamelSpringBootTest
+@EnableAutoConfiguration
+@SpringBootTest(classes = { IBMSecretsManagerVaultConfigurationTest.class }, properties = {
+ "camel.vault.ibm.token=myToken",
+ "camel.vault.ibm.service-url=http://myHost" })
+public class IBMSecretsManagerVaultConfigurationTest {
+
+ @Autowired
+ private CamelContext camelContext;
+
+ @Test
+ public void testIBMSecretsManagerVault() throws Exception {
+ Assertions.assertEquals("myToken", camelContext.getVaultConfiguration().ibmSecretsManager().getToken());
+ Assertions.assertEquals("http://myHost", camelContext.getVaultConfiguration().ibmSecretsManager().getServiceUrl());
+ }
+}
diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml
index d11c656ea57..43f1d0fcced 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -54,167 +54,167 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-alts</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-android</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-auth</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-benchmarks</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-binder</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-census</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-context</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-cronet</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-gcp-csm-observability</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-gcp-observability</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-googleapis</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-grpclb</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-inprocess</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-interop-testing</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-opentelemetry</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf-lite</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-rls</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-servlet</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-servlet-jakarta</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing-proto</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-util</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-xds</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>protoc-gen-grpc-java</artifactId>
- <version>1.70.0</version>
+ <version>1.71.0</version>
<type>pom</type>
</dependency>
<dependency>