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 2022/03/30 12:57:30 UTC
[camel] 10/13: CAMEL-17687 - Create a Camel Azure Key Vault component - Kit
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 926874fca1e99c62b1c1f3500a881ebccfeeb1eb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 30 13:03:21 2022 +0200
CAMEL-17687 - Create a Camel Azure Key Vault component - Kit
---
bom/camel-bom/pom.xml | 4 +-
.../org/apache/camel/catalog/components.properties | 1 +
.../camel/catalog/components}/azure-key-vault.json | 3 +-
.../component/azure/key/vault/azure-key-vault.json | 3 +-
.../azure/key/vault/KeyVaultConstants.java | 2 +-
.../azure/key/vault/KeyVaultProducer.java | 9 +-
.../org/apache/camel/main/components.properties | 1 +
.../ROOT/examples/json/azure-key-vault.json | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/azure-key-vault-component.adoc | 1 +
.../component/ComponentsBuilderFactory.java | 13 +
.../dsl/AzureKeyVaultComponentBuilderFactory.java | 144 ++++++
.../src/generated/resources/metadata.json | 22 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 43 ++
.../dsl/KeyVaultEndpointBuilderFactory.java | 491 +++++++++++++++++++++
.../EndpointConsumerDeserializersResolver.java | 1 +
.../EndpointProducerDeserializersResolver.java | 1 +
.../apache/camel/maven/packaging/MojoHelper.java | 3 +-
20 files changed, 734 insertions(+), 12 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 8890fe3..3707311 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -278,12 +278,12 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-azure-parent</artifactId>
+ <artifactId>camel-azure-key-vault</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-azure-key-vault</artifactId>
+ <artifactId>camel-azure-parent</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
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 23e8e15..de8c49c 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
@@ -41,6 +41,7 @@ aws2-sts
aws2-translate
azure-cosmosdb
azure-eventhubs
+azure-key-vault
azure-servicebus
azure-storage-blob
azure-storage-datalake
diff --git a/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
similarity index 96%
copy from components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
copy to catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
index f331f2f..6560c92 100644
--- a/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
@@ -27,7 +27,8 @@
"autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
},
"headers": {
- "CamelAzureKeyVaultProducerOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer." }
+ "CamelAzureKeyVaultProducerOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer." },
+ "CamelAzureKeyVaultSecretName": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The secret name to be used in Key Vault" }
},
"properties": {
"vaultName": { "kind": "path", "displayName": "Vault Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Vault Name to be used" },
diff --git a/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json b/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
index f331f2f..6560c92 100644
--- a/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
+++ b/components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
@@ -27,7 +27,8 @@
"autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
},
"headers": {
- "CamelAzureKeyVaultProducerOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer." }
+ "CamelAzureKeyVaultProducerOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer." },
+ "CamelAzureKeyVaultSecretName": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The secret name to be used in Key Vault" }
},
"properties": {
"vaultName": { "kind": "path", "displayName": "Vault Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Vault Name to be used" },
diff --git a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
index d5696eb..becb503 100644
--- a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
+++ b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
@@ -27,7 +27,7 @@ public final class KeyVaultConstants {
public static final String OPERATION = HEADER_PREFIX + "ProducerOperation";
// headers set by the producer only
@Metadata(label = "producer", description = "The secret name to be used in Key Vault",
- javaType = "String")
+ javaType = "String")
public static final String SECRET_NAME = HEADER_PREFIX + "SecretName";
private KeyVaultConstants() {
diff --git a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultProducer.java b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultProducer.java
index b9c1e52..00c8bd8 100644
--- a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultProducer.java
+++ b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultProducer.java
@@ -16,10 +16,6 @@
*/
package org.apache.camel.component.azure.key.vault;
-import com.azure.identity.ClientSecretCredential;
-import com.azure.identity.ClientSecretCredentialBuilder;
-import com.azure.security.keyvault.secrets.SecretClient;
-import com.azure.security.keyvault.secrets.SecretClientBuilder;
import com.azure.security.keyvault.secrets.models.KeyVaultSecret;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
@@ -61,11 +57,12 @@ public class KeyVaultProducer extends DefaultProducer {
}
private void createSecret(Exchange exchange) throws InvalidPayloadException {
- final String secretName = exchange.getMessage().getHeader(KeyVaultConstants.SECRET_NAME, String.class);
+ final String secretName = exchange.getMessage().getHeader(KeyVaultConstants.SECRET_NAME, String.class);
if (ObjectHelper.isEmpty(secretName)) {
throw new IllegalArgumentException("Secret Name must be specified for createSecret Operation");
}
- KeyVaultSecret p = getEndpoint().getSecretClient().setSecret(new KeyVaultSecret(secretName, exchange.getMessage().getMandatoryBody(String.class)));
+ KeyVaultSecret p = getEndpoint().getSecretClient()
+ .setSecret(new KeyVaultSecret(secretName, exchange.getMessage().getMandatoryBody(String.class)));
Message message = getMessageForResponse(exchange);
message.setBody(p);
}
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 23e8e15..de8c49c 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
@@ -41,6 +41,7 @@ aws2-sts
aws2-translate
azure-cosmosdb
azure-eventhubs
+azure-key-vault
azure-servicebus
azure-storage-blob
azure-storage-datalake
diff --git a/docs/components/modules/ROOT/examples/json/azure-key-vault.json b/docs/components/modules/ROOT/examples/json/azure-key-vault.json
new file mode 120000
index 0000000..0599a6a
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/azure-key-vault.json
@@ -0,0 +1 @@
+../../../../../../components/camel-azure/camel-azure-key-vault/src/generated/resources/org/apache/camel/component/azure/key/vault/azure-key-vault.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index e076097..44d6f71 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -46,6 +46,7 @@
** xref:azure-summary.adoc[Azure]
*** xref:azure-cosmosdb-component.adoc[Azure CosmosDB]
*** xref:azure-eventhubs-component.adoc[Azure Event Hubs]
+*** xref:azure-key-vault-component.adoc[Azure Key Vault]
*** xref:azure-servicebus-component.adoc[Azure ServiceBus]
*** xref:azure-storage-blob-component.adoc[Azure Storage Blob Service]
*** xref:azure-storage-datalake-component.adoc[Azure Storage Datalake Service]
diff --git a/docs/components/modules/ROOT/pages/azure-key-vault-component.adoc b/docs/components/modules/ROOT/pages/azure-key-vault-component.adoc
new file mode 120000
index 0000000..7b9ca6e
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/azure-key-vault-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-azure/camel-azure-key-vault/src/main/docs/azure-key-vault-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 0950b9e..4fb21ce 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
@@ -621,6 +621,19 @@ public interface ComponentsBuilderFactory {
return org.apache.camel.builder.component.dsl.AzureEventhubsComponentBuilderFactory.azureEventhubs();
}
/**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * @return the dsl builder
+ */
+ static org.apache.camel.builder.component.dsl.AzureKeyVaultComponentBuilderFactory.AzureKeyVaultComponentBuilder azureKeyVault() {
+ return org.apache.camel.builder.component.dsl.AzureKeyVaultComponentBuilderFactory.azureKeyVault();
+ }
+ /**
* Azure ServiceBus (camel-azure-servicebus)
* Send and receive messages to/from Azure Event Bus.
*
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureKeyVaultComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureKeyVaultComponentBuilderFactory.java
new file mode 100644
index 0000000..364457d
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureKeyVaultComponentBuilderFactory.java
@@ -0,0 +1,144 @@
+/*
+ * 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.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.azure.key.vault.KeyVaultComponent;
+
+/**
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface AzureKeyVaultComponentBuilderFactory {
+
+ /**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * @return the dsl builder
+ */
+ static AzureKeyVaultComponentBuilder azureKeyVault() {
+ return new AzureKeyVaultComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the Azure Key Vault component.
+ */
+ interface AzureKeyVaultComponentBuilder
+ extends
+ ComponentBuilder<KeyVaultComponent> {
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default AzureKeyVaultComponentBuilder bridgeErrorHandler(
+ boolean bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ 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 is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AzureKeyVaultComponentBuilder 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 AzureKeyVaultComponentBuilder autowiredEnabled(
+ boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ }
+
+ class AzureKeyVaultComponentBuilderImpl
+ extends
+ AbstractComponentBuilder<KeyVaultComponent>
+ implements
+ AzureKeyVaultComponentBuilder {
+ @Override
+ protected KeyVaultComponent buildConcreteComponent() {
+ return new KeyVaultComponent();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "bridgeErrorHandler": ((KeyVaultComponent) component).setBridgeErrorHandler((boolean) value); return true;
+ case "lazyStartProducer": ((KeyVaultComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "autowiredEnabled": ((KeyVaultComponent) component).setAutowiredEnabled((boolean) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index 7ae8d74..840a36c 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -950,6 +950,28 @@
"producerOnly": false,
"lenientProperties": false
},
+ "AzureKeyVaultComponentBuilderFactory": {
+ "kind": "component",
+ "name": "azure-key-vault",
+ "title": "Azure Key Vault",
+ "description": "Manage secrets and keys in Azure Key Vault Service",
+ "deprecated": false,
+ "firstVersion": "3.17.0",
+ "label": "cloud,cloud",
+ "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-azure-key-vault",
+ "version": "3.17.0-SNAPSHOT",
+ "scheme": "azure-key-vault",
+ "extendsScheme": "",
+ "syntax": "azure-key-vault:vaultName",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": false,
+ "lenientProperties": false
+ },
"AzureServicebusComponentBuilderFactory": {
"kind": "component",
"name": "azure-servicebus",
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 3e96fe2..6eec0ff 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
@@ -205,6 +205,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.KMS2Builders,
org.apache.camel.builder.endpoint.dsl.KafkaEndpointBuilderFactory.KafkaBuilders,
org.apache.camel.builder.endpoint.dsl.KameletEndpointBuilderFactory.KameletBuilders,
+ org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory.KeyVaultBuilders,
org.apache.camel.builder.endpoint.dsl.KeystoneEndpointBuilderFactory.KeystoneBuilders,
org.apache.camel.builder.endpoint.dsl.Kinesis2EndpointBuilderFactory.Kinesis2Builders,
org.apache.camel.builder.endpoint.dsl.KinesisFirehose2EndpointBuilderFactory.KinesisFirehose2Builders,
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 55179a8..b97ccb7 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
@@ -202,6 +202,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.KafkaEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.KameletEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.KeystoneEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.Kinesis2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.KinesisFirehose2EndpointBuilderFactory,
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 cf523de..7929785 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
@@ -1956,6 +1956,49 @@ public class StaticEndpointBuilders {
return org.apache.camel.builder.endpoint.dsl.EventHubsEndpointBuilderFactory.endpointBuilder(componentName, path);
}
/**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * Syntax: <code>azure-key-vault:vaultName</code>
+ *
+ * Path parameter: vaultName
+ * Vault Name to be used
+ *
+ * @param path vaultName
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory.KeyVaultEndpointBuilder azureKeyVault(
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory.endpointBuilder("azure-key-vault", path);
+ }
+ /**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * Syntax: <code>azure-key-vault:vaultName</code>
+ *
+ * Path parameter: vaultName
+ * Vault Name to be used
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path vaultName
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory.KeyVaultEndpointBuilder azureKeyVault(
+ String componentName,
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.KeyVaultEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ /**
* Azure ServiceBus (camel-azure-servicebus)
* Send and receive messages to/from Azure Event Bus.
*
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
new file mode 100644
index 0000000..4676409
--- /dev/null
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
@@ -0,0 +1,491 @@
+/*
+ * 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.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface KeyVaultEndpointBuilderFactory {
+
+
+ /**
+ * Builder for endpoint consumers for the Azure Key Vault component.
+ */
+ public interface KeyVaultEndpointConsumerBuilder
+ extends
+ EndpointConsumerBuilder {
+ default AdvancedKeyVaultEndpointConsumerBuilder advanced() {
+ return (AdvancedKeyVaultEndpointConsumerBuilder) this;
+ }
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointConsumerBuilder bridgeErrorHandler(
+ boolean bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ return this;
+ }
+ /**
+ * Allows for bridging the consumer to the Camel routing Error Handler,
+ * which mean any exceptions occurred while the consumer is trying to
+ * pickup incoming messages, or the likes, will now be processed as a
+ * message and handled by the routing Error Handler. By default the
+ * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
+ * with exceptions, that will be logged at WARN or ERROR level and
+ * ignored.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: consumer
+ *
+ * @param bridgeErrorHandler the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointConsumerBuilder bridgeErrorHandler(
+ String bridgeErrorHandler) {
+ doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
+ return this;
+ }
+ /**
+ * Client Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointConsumerBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * Client Secret to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointConsumerBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * Tenant Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointConsumerBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint consumers for the Azure Key Vault
+ * component.
+ */
+ public interface AdvancedKeyVaultEndpointConsumerBuilder
+ extends
+ EndpointConsumerBuilder {
+ default KeyVaultEndpointConsumerBuilder basic() {
+ return (KeyVaultEndpointConsumerBuilder) this;
+ }
+ /**
+ * To let the consumer use a custom ExceptionHandler. Notice if the
+ * option bridgeErrorHandler is enabled then this option is not in use.
+ * By default the consumer will deal with exceptions, that will be
+ * logged at WARN or ERROR level and ignored.
+ *
+ * The option is a:
+ * <code>org.apache.camel.spi.ExceptionHandler</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exceptionHandler the value to set
+ * @return the dsl builder
+ */
+ default AdvancedKeyVaultEndpointConsumerBuilder exceptionHandler(
+ org.apache.camel.spi.ExceptionHandler exceptionHandler) {
+ doSetProperty("exceptionHandler", exceptionHandler);
+ return this;
+ }
+ /**
+ * To let the consumer use a custom ExceptionHandler. Notice if the
+ * option bridgeErrorHandler is enabled then this option is not in use.
+ * By default the consumer will deal with exceptions, that will be
+ * logged at WARN or ERROR level and ignored.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.spi.ExceptionHandler</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exceptionHandler the value to set
+ * @return the dsl builder
+ */
+ default AdvancedKeyVaultEndpointConsumerBuilder exceptionHandler(
+ String exceptionHandler) {
+ doSetProperty("exceptionHandler", exceptionHandler);
+ return this;
+ }
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange.
+ *
+ * The option is a:
+ * <code>org.apache.camel.ExchangePattern</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exchangePattern the value to set
+ * @return the dsl builder
+ */
+ default AdvancedKeyVaultEndpointConsumerBuilder exchangePattern(
+ org.apache.camel.ExchangePattern exchangePattern) {
+ doSetProperty("exchangePattern", exchangePattern);
+ return this;
+ }
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.ExchangePattern</code> type.
+ *
+ * Group: consumer (advanced)
+ *
+ * @param exchangePattern the value to set
+ * @return the dsl builder
+ */
+ default AdvancedKeyVaultEndpointConsumerBuilder exchangePattern(
+ String exchangePattern) {
+ doSetProperty("exchangePattern", exchangePattern);
+ return this;
+ }
+ }
+
+ /**
+ * Builder for endpoint producers for the Azure Key Vault component.
+ */
+ public interface KeyVaultEndpointProducerBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedKeyVaultEndpointProducerBuilder advanced() {
+ return (AdvancedKeyVaultEndpointProducerBuilder) 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
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder 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
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder lazyStartProducer(
+ String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * Operation to be performed.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.azure.key.vault.KeyVaultOperation</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder operation(
+ org.apache.camel.component.azure.key.vault.KeyVaultOperation operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Operation to be performed.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.azure.key.vault.KeyVaultOperation</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Client Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * Client Secret to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * Tenant Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointProducerBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint producers for the Azure Key Vault
+ * component.
+ */
+ public interface AdvancedKeyVaultEndpointProducerBuilder
+ extends
+ EndpointProducerBuilder {
+ default KeyVaultEndpointProducerBuilder basic() {
+ return (KeyVaultEndpointProducerBuilder) this;
+ }
+ }
+
+ /**
+ * Builder for endpoint for the Azure Key Vault component.
+ */
+ public interface KeyVaultEndpointBuilder
+ extends
+ KeyVaultEndpointConsumerBuilder,
+ KeyVaultEndpointProducerBuilder {
+ default AdvancedKeyVaultEndpointBuilder advanced() {
+ return (AdvancedKeyVaultEndpointBuilder) this;
+ }
+ /**
+ * Client Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointBuilder clientId(String clientId) {
+ doSetProperty("clientId", clientId);
+ return this;
+ }
+ /**
+ * Client Secret to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param clientSecret the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointBuilder clientSecret(String clientSecret) {
+ doSetProperty("clientSecret", clientSecret);
+ return this;
+ }
+ /**
+ * Tenant Id to be used.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Required: true
+ * Group: security
+ *
+ * @param tenantId the value to set
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointBuilder tenantId(String tenantId) {
+ doSetProperty("tenantId", tenantId);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the Azure Key Vault component.
+ */
+ public interface AdvancedKeyVaultEndpointBuilder
+ extends
+ AdvancedKeyVaultEndpointConsumerBuilder,
+ AdvancedKeyVaultEndpointProducerBuilder {
+ default KeyVaultEndpointBuilder basic() {
+ return (KeyVaultEndpointBuilder) this;
+ }
+ }
+
+ public interface KeyVaultBuilders {
+ /**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * Syntax: <code>azure-key-vault:vaultName</code>
+ *
+ * Path parameter: vaultName
+ * Vault Name to be used
+ *
+ * @param path vaultName
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointBuilder azureKeyVault(String path) {
+ return KeyVaultEndpointBuilderFactory.endpointBuilder("azure-key-vault", path);
+ }
+ /**
+ * Azure Key Vault (camel-azure-key-vault)
+ * Manage secrets and keys in Azure Key Vault Service
+ *
+ * Category: cloud,cloud
+ * Since: 3.17
+ * Maven coordinates: org.apache.camel:camel-azure-key-vault
+ *
+ * Syntax: <code>azure-key-vault:vaultName</code>
+ *
+ * Path parameter: vaultName
+ * Vault Name to be used
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path vaultName
+ * @return the dsl builder
+ */
+ default KeyVaultEndpointBuilder azureKeyVault(
+ String componentName,
+ String path) {
+ return KeyVaultEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ }
+ static KeyVaultEndpointBuilder endpointBuilder(
+ String componentName,
+ String path) {
+ class KeyVaultEndpointBuilderImpl extends AbstractEndpointBuilder implements KeyVaultEndpointBuilder, AdvancedKeyVaultEndpointBuilder {
+ public KeyVaultEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new KeyVaultEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointConsumerDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointConsumerDeserializersResolver.java
index f73edd3..060dad1 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointConsumerDeserializersResolver.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointConsumerDeserializersResolver.java
@@ -36,6 +36,7 @@ public final class EndpointConsumerDeserializersResolver implements YamlDeserial
case "aws2-sqs":
case "azure-cosmosdb":
case "azure-eventhubs":
+ case "azure-key-vault":
case "azure-servicebus":
case "azure-storage-blob":
case "azure-storage-datalake":
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointProducerDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointProducerDeserializersResolver.java
index 5e023bf..215bb15 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointProducerDeserializersResolver.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointProducerDeserializersResolver.java
@@ -56,6 +56,7 @@ public final class EndpointProducerDeserializersResolver implements YamlDeserial
case "aws2-translate":
case "azure-cosmosdb":
case "azure-eventhubs":
+ case "azure-key-vault":
case "azure-servicebus":
case "azure-storage-blob":
case "azure-storage-datalake":
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index 27de3bc..f8254dd 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -49,7 +49,8 @@ public final class MojoHelper {
case "camel-azure":
return Arrays.asList(dir.resolve("camel-azure-eventhubs"), dir.resolve("camel-azure-storage-blob"),
dir.resolve("camel-azure-storage-datalake"), dir.resolve("camel-azure-cosmosdb"),
- dir.resolve("camel-azure-storage-queue"), dir.resolve("camel-azure-servicebus"), dir.resolve("camel-azure-key-vault"));
+ dir.resolve("camel-azure-storage-queue"), dir.resolve("camel-azure-servicebus"),
+ dir.resolve("camel-azure-key-vault"));
case "camel-google":
return Arrays.asList(dir.resolve("camel-google-bigquery"), dir.resolve("camel-google-calendar"),
dir.resolve("camel-google-drive"), dir.resolve("camel-google-mail"), dir.resolve("camel-google-pubsub"),