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/02/19 15:28:13 UTC
(camel) 01/03: CAMEL-21198 - Create an IBM Secrets Manager component
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 82820b9d474e7dc885e5f6812eab92f89f7c1d01
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Feb 19 15:49:37 2025 +0100
CAMEL-21198 - Create an IBM Secrets Manager component
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../org/apache/camel/catalog/components.properties | 1 +
.../catalog/components/ibm-secrets-manager.json | 43 +++
components/camel-ibm-secrets-manager/pom.xml | 60 +++++
.../IBMSecretsManagerComponentConfigurer.java | 57 ++++
.../IBMSecretsManagerEndpointConfigurer.java | 63 +++++
.../IBMSecretsManagerEndpointUriFactory.java | 76 ++++++
.../ibm/secrets/manager/ibm-secrets-manager.json | 43 +++
.../services/org/apache/camel/component.properties | 7 +
.../org/apache/camel/component/ibm-secrets-manager | 2 +
.../camel/configurer/ibm-secrets-manager-component | 2 +
.../camel/configurer/ibm-secrets-manager-endpoint | 2 +
.../camel/urifactory/ibm-secrets-manager-endpoint | 2 +
.../main/docs/ibm-secrets-manager-component.adoc | 59 +++++
.../manager/IBMSecretsManagerComponent.java | 59 +++++
.../manager/IBMSecretsManagerConfiguration.java | 82 ++++++
.../manager/IBMSecretsManagerConstants.java | 46 ++++
.../secrets/manager/IBMSecretsManagerEndpoint.java | 100 +++++++
.../manager/IBMSecretsManagerOperation.java | 23 ++
.../secrets/manager/IBMSecretsManagerProducer.java | 108 ++++++++
.../IBMSecretsManagerCreateSecretIT.java | 106 ++++++++
.../src/test/resources/log4j2.properties | 27 ++
components/pom.xml | 1 +
.../org/apache/camel/main/components.properties | 1 +
.../ROOT/examples/json/ibm-secrets-manager.json | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/ibm-secrets-manager-component.adoc | 1 +
.../component/ComponentsBuilderFactory.java | 13 +
.../IbmSecretsManagerComponentBuilderFactory.java | 120 +++++++++
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 40 +++
.../IBMSecretsManagerEndpointBuilderFactory.java | 290 +++++++++++++++++++++
.../camel-component-known-dependencies.properties | 1 +
parent/pom.xml | 5 +
36 files changed, 1454 insertions(+)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index f9bde6a6f5b..7cbcc7e5e7a 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1002,6 +1002,11 @@
<artifactId>camel-huaweicloud-smn</artifactId>
<version>4.11.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ibm-secrets-manager</artifactId>
+ <version>4.11.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 62c135fdef4..f1a60cc6cc0 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -871,6 +871,11 @@
<artifactId>camel-huaweicloud-smn</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ibm-secrets-manager</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 7eb00e2a86d..6532b9c0f46 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -151,6 +151,7 @@ hwcloud-iam
hwcloud-imagerecognition
hwcloud-obs
hwcloud-smn
+ibm-secrets-manager
iec60870-client
iec60870-server
ignite-cache
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ibm-secrets-manager.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ibm-secrets-manager.json
new file mode 100644
index 00000000000..c5f1b490144
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ibm-secrets-manager.json
@@ -0,0 +1,43 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "ibm-secrets-manager",
+ "title": "IBM Secrets Manager",
+ "description": "Manage secrets in IBM Secrets Manager Service",
+ "deprecated": false,
+ "firstVersion": "4.11.0",
+ "label": "cloud,cloud",
+ "javaType": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-ibm-secrets-manager",
+ "version": "4.11.0-SNAPSHOT",
+ "scheme": "ibm-secrets-manager",
+ "extendsScheme": "",
+ "syntax": "ibm-secrets-manager:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "lazyStartProducer": { "index": 0, "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 [...]
+ "autowiredEnabled": { "index": 1, "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 t [...]
+ },
+ "headers": {
+ "CamelIbmSecretsManagerProducerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#OPERATION" },
+ "CamelIbmSecretsManagerSecretName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret path as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_NAME" },
+ "CamelIbmSecretsManagerSecretVersion": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret version as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_VERSION" },
+ "CamelIbmSecretsManagerSecretId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret version as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_ID" }
+ },
+ "properties": {
+ "label": { "index": 0, "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.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "Logical name" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation", "enum": [ "createArbitrarySecret", "getSecret", "deleteSecret" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationFie [...]
+ "serviceUrl": { "index": 2, "kind": "parameter", "displayName": "Service Url", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "Service URL for IBM Secrets Manager" },
+ "lazyStartProducer": { "index": 3, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "token": { "index": 4, "kind": "parameter", "displayName": "Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "IBM Cloud API Token for IBM Secrets Manager" }
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/pom.xml b/components/camel-ibm-secrets-manager/pom.xml
new file mode 100644
index 00000000000..ba1c0cb9041
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>components</artifactId>
+ <version>4.11.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-ibm-secrets-manager</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Camel :: IBM :: Secrets Manager </name>
+ <description>Camel IBM Secrets Manager Component</description>
+
+ <properties>
+ <!-- Hashicorp vault container is not available on this platform -->
+ <skipITs.s390x>true</skipITs.s390x>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+
+<dependency>
+ <groupId>com.ibm.cloud</groupId>
+ <artifactId>secrets-manager</artifactId>
+ <version>2.0.20</version>
+</dependency>
+
+ <!-- for testing -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponentConfigurer.java b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponentConfigurer.java
new file mode 100644
index 00000000000..f7c142b77b2
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponentConfigurer.java
@@ -0,0 +1,57 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class IBMSecretsManagerComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ IBMSecretsManagerComponent target = (IBMSecretsManagerComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ IBMSecretsManagerComponent target = (IBMSecretsManagerComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointConfigurer.java b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointConfigurer.java
new file mode 100644
index 00000000000..cadc22d45f8
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointConfigurer.java
@@ -0,0 +1,63 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class IBMSecretsManagerEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ IBMSecretsManagerEndpoint target = (IBMSecretsManagerEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation.class, value)); return true;
+ case "serviceurl":
+ case "serviceUrl": target.getConfiguration().setServiceUrl(property(camelContext, java.lang.String.class, value)); return true;
+ case "token": target.getConfiguration().setToken(property(camelContext, java.lang.String.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation.class;
+ case "serviceurl":
+ case "serviceUrl": return java.lang.String.class;
+ case "token": return java.lang.String.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ IBMSecretsManagerEndpoint target = (IBMSecretsManagerEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return target.getConfiguration().getOperation();
+ case "serviceurl":
+ case "serviceUrl": return target.getConfiguration().getServiceUrl();
+ case "token": return target.getConfiguration().getToken();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointUriFactory.java b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointUriFactory.java
new file mode 100644
index 00000000000..488f7bdb71c
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpointUriFactory.java
@@ -0,0 +1,76 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import javax.annotation.processing.Generated;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
+public class IBMSecretsManagerEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+ private static final String BASE = ":label";
+
+ private static final Set<String> PROPERTY_NAMES;
+ private static final Set<String> SECRET_PROPERTY_NAMES;
+ private static final Set<String> MULTI_VALUE_PREFIXES;
+ static {
+ Set<String> props = new HashSet<>(5);
+ props.add("label");
+ props.add("lazyStartProducer");
+ props.add("operation");
+ props.add("serviceUrl");
+ props.add("token");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ Set<String> secretProps = new HashSet<>(1);
+ secretProps.add("token");
+ SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+ MULTI_VALUE_PREFIXES = Collections.emptySet();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "ibm-secrets-manager".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map<String, Object> copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "label", null, true, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set<String> propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> multiValuePrefixes() {
+ return MULTI_VALUE_PREFIXES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/org/apache/camel/component/ibm/secrets/manager/ibm-secrets-manager.json b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/org/apache/camel/component/ibm/secrets/manager/ibm-secrets-manager.json
new file mode 100644
index 00000000000..c5f1b490144
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/org/apache/camel/component/ibm/secrets/manager/ibm-secrets-manager.json
@@ -0,0 +1,43 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "ibm-secrets-manager",
+ "title": "IBM Secrets Manager",
+ "description": "Manage secrets in IBM Secrets Manager Service",
+ "deprecated": false,
+ "firstVersion": "4.11.0",
+ "label": "cloud,cloud",
+ "javaType": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-ibm-secrets-manager",
+ "version": "4.11.0-SNAPSHOT",
+ "scheme": "ibm-secrets-manager",
+ "extendsScheme": "",
+ "syntax": "ibm-secrets-manager:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "lazyStartProducer": { "index": 0, "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 [...]
+ "autowiredEnabled": { "index": 1, "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 t [...]
+ },
+ "headers": {
+ "CamelIbmSecretsManagerProducerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#OPERATION" },
+ "CamelIbmSecretsManagerSecretName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret path as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_NAME" },
+ "CamelIbmSecretsManagerSecretVersion": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret version as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_VERSION" },
+ "CamelIbmSecretsManagerSecretId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Set the desired secret version as header.", "constantName": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants#SECRET_ID" }
+ },
+ "properties": {
+ "label": { "index": 0, "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.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "Logical name" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation", "enum": [ "createArbitrarySecret", "getSecret", "deleteSecret" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationFie [...]
+ "serviceUrl": { "index": 2, "kind": "parameter", "displayName": "Service Url", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "Service URL for IBM Secrets Manager" },
+ "lazyStartProducer": { "index": 3, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "token": { "index": 4, "kind": "parameter", "displayName": "Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConfiguration", "configurationField": "configuration", "description": "IBM Cloud API Token for IBM Secrets Manager" }
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 00000000000..57737deaea0
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=ibm-secrets-manager
+groupId=org.apache.camel
+artifactId=camel-ibm-secrets-manager
+version=4.11.0-SNAPSHOT
+projectName=Camel :: IBM :: Secrets Manager
+projectDescription=Camel IBM Secrets Manager Component
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component/ibm-secrets-manager b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component/ibm-secrets-manager
new file mode 100644
index 00000000000..2610c5d1385
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/component/ibm-secrets-manager
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponent
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-component b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-component
new file mode 100644
index 00000000000..c0d71e4ee7c
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponentConfigurer
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-endpoint b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-endpoint
new file mode 100644
index 00000000000..48df8426aca
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/configurer/ibm-secrets-manager-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerEndpointConfigurer
diff --git a/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/urifactory/ibm-secrets-manager-endpoint b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/urifactory/ibm-secrets-manager-endpoint
new file mode 100644
index 00000000000..fd36684c894
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/generated/resources/META-INF/services/org/apache/camel/urifactory/ibm-secrets-manager-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerEndpointUriFactory
diff --git a/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc b/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc
new file mode 100644
index 00000000000..049981f1365
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc
@@ -0,0 +1,59 @@
+= IBM Secrets Manager Component
+:doctitle: IBM Secrets Manager
+:shortname: ibm-secrets-manager
+:artifactid: camel-ibm-secrets-manager
+:description: Manage secrets in IBM Secrets Manager Service
+:since: 4.11
+:supportlevel: Preview
+:tabs-sync-option:
+:component-header: Only producer is supported
+//Manually maintained attributes
+:camel-spring-boot-name: hashicorp-vault
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The ibm-secrets-manager component that integrates https://www.ibm.com/products/secrets-manager[IBM Cloud Secrets Manager].
+
+
+== URI Format
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ibm-secrets-manager</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+
+// component-configure options: START
+
+// component-configure options: END
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+// component options: END
+
+// endpoint options: START
+
+// endpoint options: END
+
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
+== Functionalities
+
+The component supports operations at the producer level. Specifically, it provides the following functionalities:
+
+* `createSecret`
+* `getSecret`
+* `deleteSecret`
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponent.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponent.java
new file mode 100644
index 00000000000..fdc9bd70d8a
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerComponent.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import java.util.Map;
+
+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;
+
+/**
+ * IBM Secrets Manager component
+ */
+@Component("ibm-secrets-manager")
+public class IBMSecretsManagerComponent extends DefaultComponent {
+ @Metadata
+ private IBMSecretsManagerConfiguration configuration = new IBMSecretsManagerConfiguration();
+
+ public IBMSecretsManagerComponent() {
+ }
+
+ public IBMSecretsManagerComponent(final CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+
+ final IBMSecretsManagerConfiguration epConfiguration
+ = this.configuration != null ? this.configuration.copy() : new IBMSecretsManagerConfiguration();
+
+ final IBMSecretsManagerEndpoint endpoint = new IBMSecretsManagerEndpoint(uri, this, epConfiguration);
+ setProperties(endpoint, parameters);
+
+ if (epConfiguration.getServiceUrl() == null
+ && epConfiguration.getToken() == null) {
+ throw new IllegalArgumentException(
+ "Service URL and Token must be specified");
+ }
+
+ return endpoint;
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConfiguration.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConfiguration.java
new file mode 100644
index 00000000000..6940075b563
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConfiguration.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+
+@UriParams
+public class IBMSecretsManagerConfiguration implements Cloneable {
+
+ @UriPath(description = "Logical name")
+ @Metadata(required = true)
+ private String label;
+ @UriParam
+ private String serviceUrl;
+ @UriParam(label = "security", secret = true)
+ private String token;
+ @UriParam(label = "producer")
+ private IBMSecretsManagerOperation operation = IBMSecretsManagerOperation.createArbitrarySecret;
+
+ /**
+ * Service URL for IBM Secrets Manager
+ */
+ public String getServiceUrl() {
+ return serviceUrl;
+ }
+
+ public void setServiceUrl(String serviceUrl) {
+ this.serviceUrl = serviceUrl;
+ }
+
+ /**
+ * IBM Cloud API Token for IBM Secrets Manager
+ */
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ /**
+ * Operation to be performed
+ */
+ public IBMSecretsManagerOperation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(IBMSecretsManagerOperation operation) {
+ this.operation = operation;
+ }
+
+ // *************************************************
+ //
+ // *************************************************
+
+ public IBMSecretsManagerConfiguration copy() {
+ try {
+ return (IBMSecretsManagerConfiguration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConstants.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConstants.java
new file mode 100644
index 00000000000..77c31747dfc
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerConstants.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import org.apache.camel.spi.Metadata;
+
+public final class IBMSecretsManagerConstants {
+ private static final String HEADER_PREFIX = "CamelIbmSecretsManager";
+
+ // headers set by the producer only
+ @Metadata(label = "producer", description = "Overrides the desired operation to be used in the producer.",
+ javaType = "String")
+ public static final String OPERATION = HEADER_PREFIX + "ProducerOperation";
+
+ // headers set by the producer only
+ @Metadata(label = "producer", description = "Set the desired secret path as header.",
+ javaType = "String")
+ public static final String SECRET_NAME = HEADER_PREFIX + "SecretName";
+
+ // headers set by the producer only
+ @Metadata(label = "producer", description = "Set the desired secret version as header.",
+ javaType = "String")
+ public static final String SECRET_VERSION = HEADER_PREFIX + "SecretVersion";
+
+ // headers set by the producer only
+ @Metadata(label = "producer", description = "Set the desired secret version as header.",
+ javaType = "String")
+ public static final String SECRET_ID = HEADER_PREFIX + "SecretId";
+
+ private IBMSecretsManagerConstants() {
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpoint.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpoint.java
new file mode 100644
index 00000000000..05346b983c6
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerEndpoint.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import com.ibm.cloud.sdk.core.security.IamAuthenticator;
+import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.SecretsManager;
+import org.apache.camel.Category;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultEndpoint;
+
+/**
+ * Manage secrets in IBM Secrets Manager Service
+ */
+@UriEndpoint(firstVersion = "4.11.0", scheme = "ibm-secrets-manager", title = "IBM Secrets Manager",
+ syntax = "ibm-secrets-manager:label", category = {
+ Category.CLOUD, Category.CLOUD },
+ producerOnly = true,
+ headersClass = IBMSecretsManagerConstants.class)
+public class IBMSecretsManagerEndpoint extends DefaultEndpoint {
+
+ private SecretsManager secretManager;
+
+ @UriParam
+ private IBMSecretsManagerConfiguration configuration;
+
+ public IBMSecretsManagerEndpoint(final String uri, final Component component,
+ final IBMSecretsManagerConfiguration configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public void doInit() throws Exception {
+ super.doInit();
+ secretManager = createSecretManager();
+ }
+
+ private SecretsManager createSecretManager() {
+ SecretsManager secretsManager;
+
+ IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
+ .apikey(getConfiguration().getToken())
+ .build();
+ secretsManager = new SecretsManager("Camel Secrets Manager Service", iamAuthenticator);
+ secretsManager.setServiceUrl(getConfiguration().getServiceUrl());
+
+ return secretsManager;
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new IBMSecretsManagerProducer(this);
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException("Consumer not supported");
+ }
+
+ /**
+ * The component configurations
+ */
+ public IBMSecretsManagerConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(IBMSecretsManagerConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * The Secrets Manager
+ */
+ public SecretsManager getSecretManager() {
+ return secretManager;
+ }
+
+ public void setSecretManager(SecretsManager secretManager) {
+ this.secretManager = secretManager;
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerOperation.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerOperation.java
new file mode 100644
index 00000000000..51f0e7dfd76
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerOperation.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+public enum IBMSecretsManagerOperation {
+ createArbitrarySecret,
+ getSecret,
+ deleteSecret
+}
diff --git a/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerProducer.java b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerProducer.java
new file mode 100644
index 00000000000..652e4760f84
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/main/java/org/apache/camel/component/ibm/secrets/manager/IBMSecretsManagerProducer.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.ibm.secrets.manager;
+
+import com.ibm.cloud.sdk.core.http.Response;
+import com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.*;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+
+public class IBMSecretsManagerProducer extends DefaultProducer {
+ public IBMSecretsManagerProducer(final Endpoint endpoint) {
+ super(endpoint);
+ }
+
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ IBMSecretsManagerOperation operation = determineOperation(exchange);
+ switch (operation) {
+ case createArbitrarySecret:
+ createArbitratySecret(exchange);
+ break;
+ case getSecret:
+ getSecret(exchange);
+ break;
+ case deleteSecret:
+ deleteSecret(exchange);
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private void createArbitratySecret(Exchange exchange) {
+ ArbitrarySecretPrototype.Builder arbitrarySecretResourceBuilder = new ArbitrarySecretPrototype.Builder();
+ if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_NAME, String.class))) {
+ arbitrarySecretResourceBuilder
+ .name(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_NAME, String.class));
+ } else {
+ throw new IllegalArgumentException("Secret Name must be specified");
+ }
+ arbitrarySecretResourceBuilder.payload(exchange.getMessage().getBody(String.class));
+ arbitrarySecretResourceBuilder.secretType(ArbitrarySecretPrototype.SecretType.ARBITRARY);
+ ArbitrarySecretPrototype arbitrarySecretResource = arbitrarySecretResourceBuilder.build();
+
+ CreateSecretOptions createSecretOptions = new CreateSecretOptions.Builder()
+ .secretPrototype(arbitrarySecretResource)
+ .build();
+ Response<Secret> createResp = getEndpoint().getSecretManager().createSecret(createSecretOptions).execute();
+
+ exchange.getMessage().setBody(createResp.getResult().getId());
+ }
+
+ private void getSecret(Exchange exchange) {
+ GetSecretOptions.Builder getSecretOptionsBuilder = new GetSecretOptions.Builder();
+ if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_ID, String.class))) {
+ getSecretOptionsBuilder.id(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_ID, String.class));
+ } else {
+ throw new IllegalArgumentException("Secret ID must be specified");
+ }
+ Response<Secret> getResp = getEndpoint().getSecretManager().getSecret(getSecretOptionsBuilder.build()).execute();
+
+ exchange.getMessage().setBody(getResp.getResult().getPayload());
+ }
+
+ private void deleteSecret(Exchange exchange) {
+ DeleteSecretOptions.Builder deleteSecretOptionsBuilder = new DeleteSecretOptions.Builder();
+ if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_ID, String.class))) {
+ deleteSecretOptionsBuilder.id(exchange.getMessage().getHeader(IBMSecretsManagerConstants.SECRET_ID, String.class));
+ } else {
+ throw new IllegalArgumentException("Secret ID must be specified");
+ }
+ getEndpoint().getSecretManager().deleteSecret(deleteSecretOptionsBuilder.build()).execute();
+ }
+
+ @Override
+ public IBMSecretsManagerEndpoint getEndpoint() {
+ return (IBMSecretsManagerEndpoint) super.getEndpoint();
+ }
+
+ public IBMSecretsManagerConfiguration getConfiguration() {
+ return getEndpoint().getConfiguration();
+ }
+
+ private IBMSecretsManagerOperation determineOperation(Exchange exchange) {
+ IBMSecretsManagerOperation operation
+ = exchange.getIn().getHeader(IBMSecretsManagerConstants.OPERATION, IBMSecretsManagerOperation.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/test/java/org/apache/camel/component/ibm/secrets/manager/integration/operations/IBMSecretsManagerCreateSecretIT.java b/components/camel-ibm-secrets-manager/src/test/java/org/apache/camel/component/ibm/secrets/manager/integration/operations/IBMSecretsManagerCreateSecretIT.java
new file mode 100644
index 00000000000..140f639fc0f
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/test/java/org/apache/camel/component/ibm/secrets/manager/integration/operations/IBMSecretsManagerCreateSecretIT.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.ibm.secrets.manager.integration.operations;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerConstants;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperties;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+// Must be manually tested. Provide your own accessKey and secretKey using -Dsecrets-manager and -Dcamel.ibm.sm.serviceurl
+@EnabledIfSystemProperties({
+ @EnabledIfSystemProperty(named = "camel.ibm.sm.token", matches = ".*",
+ disabledReason = "Secrets Manager Token not provided"),
+ @EnabledIfSystemProperty(named = "camel.ibm.sm.serviceurl", matches = ".*",
+ disabledReason = "Secrets Manager Service URL not provided")
+})
+public class IBMSecretsManagerCreateSecretIT extends CamelTestSupport {
+
+ @EndpointInject("mock:result-write")
+ private MockEndpoint mockWrite;
+
+ @EndpointInject("mock:result-read")
+ private MockEndpoint mockRead;
+
+ @EndpointInject("mock:result-delete")
+ private MockEndpoint mockDelete;
+
+ @Test
+ public void createSecretTest() throws InterruptedException {
+ mockWrite.expectedMessageCount(1);
+ mockRead.expectedMessageCount(1);
+ mockDelete.expectedMessageCount(1);
+ Exchange createdSec = template.request("direct:createSecret", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setBody("test");
+
+ exchange.getMessage().setHeader(IBMSecretsManagerConstants.SECRET_NAME, "secret1");
+ }
+ });
+ Exchange readSec = template.request("direct:readSecret", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getMessage().setHeader(IBMSecretsManagerConstants.SECRET_ID, createdSec.getMessage().getBody());
+ }
+ });
+
+ template.request("direct:deleteSecret", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getMessage().setHeader(IBMSecretsManagerConstants.SECRET_ID, createdSec.getMessage().getBody());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+ Exchange ret = mockRead.getExchanges().get(0);
+ assertNotNull(ret);
+ assertEquals("test", ret.getMessage().getBody(String.class));
+ Exchange retDelete = mockDelete.getExchanges().get(0);
+ assertNotNull(retDelete);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:createSecret")
+ .toF("ibm-secrets-manager://secret?operation=createArbitrarySecret&token=RAW(%s)&serviceUrl=%s",
+ System.getProperty("camel.ibm.sm.token"), System.getProperty("camel.ibm.sm.serviceurl"))
+ .to("mock:result-write");
+ from("direct:readSecret")
+ .toF("ibm-secrets-manager://secret?operation=getSecret&token=RAW(%s)&serviceUrl=%s",
+ System.getProperty("camel.ibm.sm.token"), System.getProperty("camel.ibm.sm.serviceurl"))
+ .to("mock:result-read");
+ from("direct:deleteSecret")
+ .toF("ibm-secrets-manager://secret?operation=deleteSecret&token=RAW(%s)&serviceUrl=%s",
+ System.getProperty("camel.ibm.sm.token"), System.getProperty("camel.ibm.sm.serviceurl"))
+ .to("mock:result-delete");
+ }
+ };
+ }
+}
diff --git a/components/camel-ibm-secrets-manager/src/test/resources/log4j2.properties b/components/camel-ibm-secrets-manager/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..770e035ac6d
--- /dev/null
+++ b/components/camel-ibm-secrets-manager/src/test/resources/log4j2.properties
@@ -0,0 +1,27 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-ibm-secrets-manager-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/pom.xml b/components/pom.xml
index 1c9e053f9c0..cd617f5b62a 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -158,6 +158,7 @@
<module>camel-headersmap</module>
<module>camel-hl7</module>
<module>camel-huawei</module>
+ <module>camel-ibm-secrets-manager</module>
<module>camel-ical</module>
<module>camel-iec60870</module>
<module>camel-ignite</module>
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 7eb00e2a86d..6532b9c0f46 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -151,6 +151,7 @@ hwcloud-iam
hwcloud-imagerecognition
hwcloud-obs
hwcloud-smn
+ibm-secrets-manager
iec60870-client
iec60870-server
ignite-cache
diff --git a/docs/components/modules/ROOT/examples/json/ibm-secrets-manager.json b/docs/components/modules/ROOT/examples/json/ibm-secrets-manager.json
new file mode 120000
index 00000000000..481ac356836
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/ibm-secrets-manager.json
@@ -0,0 +1 @@
+../../../../../../components/camel-ibm-secrets-manager/src/generated/resources/META-INF/org/apache/camel/component/ibm/secrets/manager/ibm-secrets-manager.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 8b490118595..03ac8c17ce9 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -168,6 +168,7 @@
*** xref:hwcloud-iam-component.adoc[Huawei Identity and Access Management (IAM)]
*** xref:hwcloud-obs-component.adoc[Huawei Object Storage Service (OBS)]
*** xref:hwcloud-smn-component.adoc[Huawei Simple Message Notification (SMN)]
+** xref:ibm-secrets-manager-component.adoc[IBM Secrets Manager]
** xref:iec60870-client-component.adoc[IEC 60870 Client]
** xref:iec60870-server-component.adoc[IEC 60870 Server]
** xref:ignite-summary.adoc[Ignite]
diff --git a/docs/components/modules/ROOT/pages/ibm-secrets-manager-component.adoc b/docs/components/modules/ROOT/pages/ibm-secrets-manager-component.adoc
new file mode 120000
index 00000000000..2002418d9a1
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/ibm-secrets-manager-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index 2169f180806..380dafbbd7d 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -2077,6 +2077,19 @@ public interface ComponentsBuilderFactory {
static HwcloudSmnComponentBuilderFactory.HwcloudSmnComponentBuilder hwcloudSmn() {
return HwcloudSmnComponentBuilderFactory.hwcloudSmn();
}
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * @return the dsl builder
+ */
+ static IbmSecretsManagerComponentBuilderFactory.IbmSecretsManagerComponentBuilder ibmSecretsManager() {
+ return IbmSecretsManagerComponentBuilderFactory.ibmSecretsManager();
+ }
/**
* IEC 60870 Client (camel-iec60870)
* IEC 60870 supervisory control and data acquisition (SCADA) client using
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IbmSecretsManagerComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IbmSecretsManagerComponentBuilderFactory.java
new file mode 100644
index 00000000000..c59a672616f
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IbmSecretsManagerComponentBuilderFactory.java
@@ -0,0 +1,120 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponent;
+
+/**
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface IbmSecretsManagerComponentBuilderFactory {
+
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * @return the dsl builder
+ */
+ static IbmSecretsManagerComponentBuilder ibmSecretsManager() {
+ return new IbmSecretsManagerComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the IBM Secrets Manager component.
+ */
+ interface IbmSecretsManagerComponentBuilder extends ComponentBuilder<IBMSecretsManagerComponent> {
+
+
+ /**
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default IbmSecretsManagerComponentBuilder lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+
+
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in the
+ * 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.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default IbmSecretsManagerComponentBuilder autowiredEnabled(boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ }
+
+ class IbmSecretsManagerComponentBuilderImpl
+ extends AbstractComponentBuilder<IBMSecretsManagerComponent>
+ implements IbmSecretsManagerComponentBuilder {
+ @Override
+ protected IBMSecretsManagerComponent buildConcreteComponent() {
+ return new IBMSecretsManagerComponent();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "lazyStartProducer": ((IBMSecretsManagerComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "autowiredEnabled": ((IBMSecretsManagerComponent) component).setAutowiredEnabled((boolean) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 86c5f2d1022..69d76b35955 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -160,6 +160,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.HttpEndpointBuilderFactory.HttpBuilders,
org.apache.camel.builder.endpoint.dsl.IAM2EndpointBuilderFactory.IAM2Builders,
org.apache.camel.builder.endpoint.dsl.IAMEndpointBuilderFactory.IAMBuilders,
+ org.apache.camel.builder.endpoint.dsl.IBMSecretsManagerEndpointBuilderFactory.IBMSecretsManagerBuilders,
org.apache.camel.builder.endpoint.dsl.IgniteCacheEndpointBuilderFactory.IgniteCacheBuilders,
org.apache.camel.builder.endpoint.dsl.IgniteComputeEndpointBuilderFactory.IgniteComputeBuilders,
org.apache.camel.builder.endpoint.dsl.IgniteEventsEndpointBuilderFactory.IgniteEventsBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index c0f0f4061a6..8ac0c896c1d 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -157,6 +157,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.HttpEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.IAM2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.IAMEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.IBMSecretsManagerEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.IgniteCacheEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.IgniteComputeEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.IgniteEventsEndpointBuilderFactory,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index cf2614e5f3a..0bae9b80d06 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -6760,6 +6760,46 @@ public class StaticEndpointBuilders {
public static SimpleNotificationEndpointBuilderFactory.SimpleNotificationEndpointBuilder hwcloudSmn(String componentName, String path) {
return SimpleNotificationEndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * Syntax: <code>ibm-secrets-manager:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ public static IBMSecretsManagerEndpointBuilderFactory.IBMSecretsManagerEndpointBuilder ibmSecretsManager(String path) {
+ return ibmSecretsManager("ibm-secrets-manager", path);
+ }
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * Syntax: <code>ibm-secrets-manager:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ public static IBMSecretsManagerEndpointBuilderFactory.IBMSecretsManagerEndpointBuilder ibmSecretsManager(String componentName, String path) {
+ return IBMSecretsManagerEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* IEC 60870 Client (camel-iec60870)
* IEC 60870 supervisory control and data acquisition (SCADA) client using
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IBMSecretsManagerEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IBMSecretsManagerEndpointBuilderFactory.java
new file mode 100644
index 00000000000..053fd3a51df
--- /dev/null
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IBMSecretsManagerEndpointBuilderFactory.java
@@ -0,0 +1,290 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * 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.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface IBMSecretsManagerEndpointBuilderFactory {
+
+ /**
+ * Builder for endpoint for the IBM Secrets Manager component.
+ */
+ public interface IBMSecretsManagerEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedIBMSecretsManagerEndpointBuilder advanced() {
+ return (AdvancedIBMSecretsManagerEndpointBuilder) this;
+ }
+
+ /**
+ * Operation to be performed.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder operation(org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Operation to be performed.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerOperation</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Service URL for IBM Secrets Manager.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param serviceUrl the value to set
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder serviceUrl(String serviceUrl) {
+ doSetProperty("serviceUrl", serviceUrl);
+ return this;
+ }
+ /**
+ * IBM Cloud API Token for IBM Secrets Manager.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param token the value to set
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder token(String token) {
+ doSetProperty("token", token);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the IBM Secrets Manager component.
+ */
+ public interface AdvancedIBMSecretsManagerEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default IBMSecretsManagerEndpointBuilder basic() {
+ return (IBMSecretsManagerEndpointBuilder) 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
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedIBMSecretsManagerEndpointBuilder lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ 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
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedIBMSecretsManagerEndpointBuilder lazyStartProducer(String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ }
+
+ public interface IBMSecretsManagerBuilders {
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default IBMSecretsManagerHeaderNameBuilder ibmSecretsManager() {
+ return IBMSecretsManagerHeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * Syntax: <code>ibm-secrets-manager:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder ibmSecretsManager(String path) {
+ return IBMSecretsManagerEndpointBuilderFactory.endpointBuilder("ibm-secrets-manager", path);
+ }
+ /**
+ * IBM Secrets Manager (camel-ibm-secrets-manager)
+ * Manage secrets in IBM Secrets Manager Service
+ *
+ * Category: cloud,cloud
+ * Since: 4.11
+ * Maven coordinates: org.apache.camel:camel-ibm-secrets-manager
+ *
+ * Syntax: <code>ibm-secrets-manager:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ default IBMSecretsManagerEndpointBuilder ibmSecretsManager(String componentName, String path) {
+ return IBMSecretsManagerEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+
+ }
+ /**
+ * The builder of headers' name for the IBM Secrets Manager component.
+ */
+ public static class IBMSecretsManagerHeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final IBMSecretsManagerHeaderNameBuilder INSTANCE = new IBMSecretsManagerHeaderNameBuilder();
+
+ /**
+ * Overrides the desired operation to be used in the producer.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * IbmSecretsManagerProducerOperation}.
+ */
+ public String ibmSecretsManagerProducerOperation() {
+ return "CamelIbmSecretsManagerProducerOperation";
+ }
+ /**
+ * Set the desired secret path as header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code IbmSecretsManagerSecretName}.
+ */
+ public String ibmSecretsManagerSecretName() {
+ return "CamelIbmSecretsManagerSecretName";
+ }
+ /**
+ * Set the desired secret version as header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * IbmSecretsManagerSecretVersion}.
+ */
+ public String ibmSecretsManagerSecretVersion() {
+ return "CamelIbmSecretsManagerSecretVersion";
+ }
+ /**
+ * Set the desired secret version as header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code IbmSecretsManagerSecretId}.
+ */
+ public String ibmSecretsManagerSecretId() {
+ return "CamelIbmSecretsManagerSecretId";
+ }
+ }
+ static IBMSecretsManagerEndpointBuilder endpointBuilder(String componentName, String path) {
+ class IBMSecretsManagerEndpointBuilderImpl extends AbstractEndpointBuilder implements IBMSecretsManagerEndpointBuilder, AdvancedIBMSecretsManagerEndpointBuilder {
+ public IBMSecretsManagerEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new IBMSecretsManagerEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index 730fa06cdc7..58ce07459ad 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -165,6 +165,7 @@ org.apache.camel.component.huaweicloud.iam.IAMComponent=camel:huaweicloud-iam
org.apache.camel.component.huaweicloud.image.ImageRecognitionComponent=camel:huaweicloud-imagerecognition
org.apache.camel.component.huaweicloud.obs.OBSComponent=camel:huaweicloud-obs
org.apache.camel.component.huaweicloud.smn.SimpleNotificationComponent=camel:huaweicloud-smn
+org.apache.camel.component.ibm.secrets.manager.IBMSecretsManagerComponent=camel:ibm-secrets-manager
org.apache.camel.component.iec60870.client.ClientComponent=camel:iec60870
org.apache.camel.component.iec60870.server.ServerComponent=camel:iec60870
org.apache.camel.component.ignite.cache.IgniteCacheComponent=camel:ignite
diff --git a/parent/pom.xml b/parent/pom.xml
index 8da3f1a33cd..0a182b99522 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1504,6 +1504,11 @@
<artifactId>camel-huaweicloud-smn</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ibm-secrets-manager</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>