This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch azure-key-vault in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 9309dc7726da5c6ab19d9107bc619dee03342017 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon May 23 18:41:08 2022 +0200 Create an Azure Key Vault Extension --- catalog/pom.xml | 13 +++ .../ROOT/examples/components/azure-key-vault.yml | 13 +++ docs/modules/ROOT/nav.adoc | 1 + .../reference/extensions/azure-key-vault.adoc | 35 +++++++ .../camel/quarkus/core/FastCamelContext.java | 2 +- extensions-jvm/azure-key-vault/deployment/pom.xml | 63 +++++++++++++ .../vault/deployment/AzureKeyVaultProcessor.java | 46 +++++++++ extensions-jvm/azure-key-vault/pom.xml | 39 ++++++++ extensions-jvm/azure-key-vault/runtime/pom.xml | 100 ++++++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 32 +++++++ extensions-jvm/pom.xml | 1 + integration-tests-jvm/azure-key-vault/pom.xml | 103 +++++++++++++++++++++ .../azure/key/vault/it/AzureKeyVaultResource.java | 51 ++++++++++ .../azure/key/vault/it/AzureKeyVaultTest.java | 34 +++++++ integration-tests-jvm/pom.xml | 1 + integration-tests/compression-grouped/pom.xml | 10 +- poms/bom/pom.xml | 15 +++ poms/bom/src/main/generated/flattened-full-pom.xml | 15 +++ .../src/main/generated/flattened-reduced-pom.xml | 20 ++++ .../generated/flattened-reduced-verbose-pom.xml | 20 ++++ 20 files changed, 608 insertions(+), 6 deletions(-) diff --git a/catalog/pom.xml b/catalog/pom.xml index 15c575e152..635b7ba2e8 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -539,6 +539,19 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-azure-servicebus</artifactId> diff --git a/docs/modules/ROOT/examples/components/azure-key-vault.yml b/docs/modules/ROOT/examples/components/azure-key-vault.yml new file mode 100644 index 0000000000..d958b4acd3 --- /dev/null +++ b/docs/modules/ROOT/examples/components/azure-key-vault.yml @@ -0,0 +1,13 @@ +# Do not edit directly! +# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page +cqArtifactId: camel-quarkus-azure-key-vault +cqArtifactIdBase: azure-key-vault +cqNativeSupported: false +cqStatus: Preview +cqDeprecated: false +cqJvmSince: 2.10.0 +cqNativeSince: n/a +cqCamelPartName: azure-key-vault +cqCamelPartTitle: Azure Key Vault +cqCamelPartDescription: Manage secrets and keys in Azure Key Vault Service +cqExtensionPageTitle: Azure Key Vault diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 31d326093f..fa47d99fe7 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -60,6 +60,7 @@ *** xref:reference/extensions/avro-rpc.adoc[Avro RPC] *** xref:reference/extensions/azure-cosmosdb.adoc[Azure CosmosDB] *** xref:reference/extensions/azure-eventhubs.adoc[Azure Event Hubs] +*** xref:reference/extensions/azure-key-vault.adoc[Azure Key Vault] *** xref:reference/extensions/azure-servicebus.adoc[Azure ServiceBus] *** xref:reference/extensions/azure-storage-blob.adoc[Azure Storage Blob Service] *** xref:reference/extensions/azure-storage-queue.adoc[Azure Storage Queue Service] diff --git a/docs/modules/ROOT/pages/reference/extensions/azure-key-vault.adoc b/docs/modules/ROOT/pages/reference/extensions/azure-key-vault.adoc new file mode 100644 index 0000000000..7e0915b2d1 --- /dev/null +++ b/docs/modules/ROOT/pages/reference/extensions/azure-key-vault.adoc @@ -0,0 +1,35 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page += Azure Key Vault +:linkattrs: +:cq-artifact-id: camel-quarkus-azure-key-vault +:cq-native-supported: false +:cq-status: Preview +:cq-status-deprecation: Preview +:cq-description: Manage secrets and keys in Azure Key Vault Service +:cq-deprecated: false +:cq-jvm-since: 2.10.0 +:cq-native-since: n/a + +[.badges] +[.badge-key]##JVM since##[.badge-supported]##2.10.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## + +Manage secrets and keys in Azure Key Vault Service + +== What's inside + +* xref:{cq-camel-components}::azure-key-vault-component.adoc[Azure Key Vault component], URI syntax: `azure-key-vault:vaultName` + +Please refer to the above link for usage and configuration details. + +== Maven coordinates + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> +</dependency> +---- + +Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java index 1dccaf3fb4..95c5254919 100644 --- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java +++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java @@ -147,7 +147,7 @@ public class FastCamelContext extends DefaultCamelContext implements CatalogCame @Override protected PropertiesComponent createPropertiesComponent() { org.apache.camel.component.properties.PropertiesComponent pc = new org.apache.camel.component.properties.PropertiesComponent(); - pc.setAutoDiscoverPropertiesSources(false); + pc.setAutoDiscoverPropertiesSources(true); pc.addPropertiesSource(new CamelMicroProfilePropertiesSource()); return pc; } diff --git a/extensions-jvm/azure-key-vault/deployment/pom.xml b/extensions-jvm/azure-key-vault/deployment/pom.xml new file mode 100644 index 0000000000..178823e40c --- /dev/null +++ b/extensions-jvm/azure-key-vault/deployment/pom.xml @@ -0,0 +1,63 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault-parent</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId> + <name>Camel Quarkus :: Azure Key Vault :: Deployment</name> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/extensions-jvm/azure-key-vault/deployment/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/deployment/AzureKeyVaultProcessor.java b/extensions-jvm/azure-key-vault/deployment/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/deployment/AzureKeyVaultProcessor.java new file mode 100644 index 0000000000..efe3fd7795 --- /dev/null +++ b/extensions-jvm/azure-key-vault/deployment/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/deployment/AzureKeyVaultProcessor.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.quarkus.component.azure.key.vault.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.pkg.steps.NativeBuild; +import org.apache.camel.quarkus.core.JvmOnlyRecorder; +import org.jboss.logging.Logger; + +class AzureKeyVaultProcessor { + + private static final Logger LOG = Logger.getLogger(AzureKeyVaultProcessor.class); + private static final String FEATURE = "camel-azure-key-vault"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + /** + * Remove this once this extension starts supporting the native mode. + */ + @BuildStep(onlyIf = NativeBuild.class) + @Record(value = ExecutionTime.RUNTIME_INIT) + void warnJvmInNative(JvmOnlyRecorder recorder) { + JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time + recorder.warnJvmInNative(FEATURE); // warn at runtime + } +} diff --git a/extensions-jvm/azure-key-vault/pom.xml b/extensions-jvm/azure-key-vault/pom.xml new file mode 100644 index 0000000000..2b12e0a2f8 --- /dev/null +++ b/extensions-jvm/azure-key-vault/pom.xml @@ -0,0 +1,39 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-extensions-jvm</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-azure-key-vault-parent</artifactId> + <name>Camel Quarkus :: Azure Key Vault</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions-jvm/azure-key-vault/runtime/pom.xml b/extensions-jvm/azure-key-vault/runtime/pom.xml new file mode 100644 index 0000000000..73ba244221 --- /dev/null +++ b/extensions-jvm/azure-key-vault/runtime/pom.xml @@ -0,0 +1,100 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault-parent</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-azure-key-vault</artifactId> + <name>Camel Quarkus :: Azure Key Vault :: Runtime</name> + <description>Manage secrets and keys in Azure Key Vault Service</description> + + <properties> + <camel.quarkus.jvmSince>2.10.0</camel.quarkus.jvmSince> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-azure-key-vault</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-bootstrap-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + + + <profiles> + <profile> + <id>full</id> + <activation> + <property> + <name>!quickly</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-maven-plugin</artifactId> + <executions> + <execution> + <id>update-extension-doc-page</id> + <goals> + <goal>update-extension-doc-page</goal> + </goals> + <phase>process-classes</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> diff --git a/extensions-jvm/azure-key-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/azure-key-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000000..10c8894211 --- /dev/null +++ b/extensions-jvm/azure-key-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,32 @@ +# +# 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. +# + +# This is a generated file. Do not edit directly! +# To re-generate, run the following command from the top level directory: +# +# mvn -N cq:update-quarkus-metadata +# +--- +name: "Camel Azure Key Vault" +description: "Manage secrets and keys in Azure Key Vault Service" +metadata: + unlisted: true + guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/azure-key-vault.html" + categories: + - "integration" + status: + - "preview" diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index 74fc9473ee..2c408a84a9 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -41,6 +41,7 @@ <module>aws-secrets-manager</module> <module>aws-xray</module> <module>azure-cosmosdb</module> + <module>azure-key-vault</module> <module>azure-servicebus</module> <module>azure-storage-datalake</module> <module>barcode</module> diff --git a/integration-tests-jvm/azure-key-vault/pom.xml b/integration-tests-jvm/azure-key-vault/pom.xml new file mode 100644 index 0000000000..6d2a37e457 --- /dev/null +++ b/integration-tests-jvm/azure-key-vault/pom.xml @@ -0,0 +1,103 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-build-parent-it</artifactId> + <version>2.10.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent-it/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-integration-test-azure-key-vault</artifactId> + <name>Camel Quarkus :: Integration Tests :: Azure Key Vault</name> + <description>Integration tests for Camel Quarkus Azure Key Vault extension</description> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>${quarkus.platform.group-id}</groupId> + <artifactId>${quarkus.platform.artifact-id}</artifactId> + <version>${quarkus.platform.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom-test</artifactId> + <version>${camel-quarkus.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-resteasy</artifactId> + </dependency> + + <!-- test dependencies --> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-junit5</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.rest-assured</groupId> + <artifactId>rest-assured</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <profiles> + <profile> + <id>virtualDependencies</id> + <activation> + <property> + <name>!noVirtualDependencies</name> + </property> + </activation> + <dependencies> + <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory --> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </profile> + </profiles> +</project> diff --git a/integration-tests-jvm/azure-key-vault/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultResource.java b/integration-tests-jvm/azure-key-vault/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultResource.java new file mode 100644 index 0000000000..6756998cd4 --- /dev/null +++ b/integration-tests-jvm/azure-key-vault/src/main/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultResource.java @@ -0,0 +1,51 @@ +/* + * 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.quarkus.component.azure.key.vault.it; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import org.apache.camel.CamelContext; +import org.jboss.logging.Logger; + +@Path("/azure-key-vault") +@ApplicationScoped +public class AzureKeyVaultResource { + + private static final Logger LOG = Logger.getLogger(AzureKeyVaultResource.class); + + private static final String COMPONENT_AZURE_KEY_VAULT = "azure-key-vault"; + @Inject + CamelContext context; + + @Path("/load/component/azure-key-vault") + @GET + @Produces(MediaType.TEXT_PLAIN) + public Response loadComponentAzureKeyVault() throws Exception { + /* This is an autogenerated test */ + if (context.getComponent(COMPONENT_AZURE_KEY_VAULT) != null) { + return Response.ok().build(); + } + LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_AZURE_KEY_VAULT); + return Response.status(500, COMPONENT_AZURE_KEY_VAULT + " could not be loaded from the Camel context").build(); + } +} diff --git a/integration-tests-jvm/azure-key-vault/src/test/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultTest.java b/integration-tests-jvm/azure-key-vault/src/test/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultTest.java new file mode 100644 index 0000000000..d20f8bc47f --- /dev/null +++ b/integration-tests-jvm/azure-key-vault/src/test/java/org/apache/camel/quarkus/component/azure/key/vault/it/AzureKeyVaultTest.java @@ -0,0 +1,34 @@ +/* + * 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.quarkus.component.azure.key.vault.it; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import org.junit.jupiter.api.Test; + +@QuarkusTest +class AzureKeyVaultTest { + + @Test + public void loadComponentAzureKeyVault() { + /* A simple autogenerated test */ + RestAssured.get("/azure-key-vault/load/component/azure-key-vault") + .then() + .statusCode(200); + } + +} diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml index d6eae3bb9f..3d5d12f150 100644 --- a/integration-tests-jvm/pom.xml +++ b/integration-tests-jvm/pom.xml @@ -39,6 +39,7 @@ <module>aws-secrets-manager</module> <module>aws-xray</module> <module>azure-cosmosdb</module> + <module>azure-key-vault</module> <module>azure-servicebus</module> <module>azure-storage-datalake</module> <module>barcode</module> diff --git a/integration-tests/compression-grouped/pom.xml b/integration-tests/compression-grouped/pom.xml index 840eb0c8f6..b581a74e2d 100644 --- a/integration-tests/compression-grouped/pom.xml +++ b/integration-tests/compression-grouped/pom.xml @@ -32,7 +32,7 @@ <!-- Regenerate the dependencies via `mvn process-resources -Pformat -N` from the source tree root directory --> <dependencies> - <dependency> + <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> </dependency> @@ -48,17 +48,17 @@ <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jsonb</artifactId> </dependency> - <dependency> + <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-direct</artifactId> </dependency> - <dependency> + <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-mock</artifactId> + <artifactId>camel-quarkus-lzf</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-lzf</artifactId> + <artifactId>camel-quarkus-mock</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index e09b990409..dc4f6e6737 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -916,6 +916,11 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-azure-key-vault</artifactId> + <version>${camel.version}</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-azure-servicebus</artifactId> @@ -6265,6 +6270,16 @@ <artifactId>camel-quarkus-azure-eventhubs-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-azure-servicebus</artifactId> diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index 93d603a1dc..af7f8b71dd 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -862,6 +862,11 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-azure-key-vault</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.17.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-azure-servicebus</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6209,6 +6214,16 @@ <artifactId>camel-quarkus-azure-eventhubs-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-azure-key-vault</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-azure-servicebus</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml index 05b4ed064e..f1d2f30bfb 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -862,6 +862,11 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-azure-key-vault</artifactId> + <version>3.17.0</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-azure-servicebus</artifactId> @@ -6209,6 +6214,16 @@ <artifactId>camel-quarkus-azure-eventhubs-deployment</artifactId> <version>2.10.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault</artifactId> + <version>2.10.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId> + <version>2.10.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-azure-servicebus</artifactId> @@ -10225,6 +10240,11 @@ <artifactId>azure-messaging-servicebus</artifactId> <version>7.8.0</version> </dependency> + <dependency> + <groupId>com.azure</groupId> + <artifactId>azure-security-keyvault-secrets</artifactId> + <version>4.4.1</version> + </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml index 84ca7e1151..0abeae9764 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -862,6 +862,11 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-azure-key-vault</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.17.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-azure-servicebus</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -6209,6 +6214,16 @@ <artifactId>camel-quarkus-azure-eventhubs-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-azure-key-vault</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-azure-key-vault-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>2.10.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-azure-servicebus</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -10225,6 +10240,11 @@ <artifactId>azure-messaging-servicebus</artifactId><!-- com.azure:azure-sdk-bom:1.2.1 --> <version>7.8.0</version><!-- com.azure:azure-sdk-bom:1.2.1 --> </dependency> + <dependency> + <groupId>com.azure</groupId><!-- com.azure:azure-sdk-bom:1.2.1 --> + <artifactId>azure-security-keyvault-secrets</artifactId><!-- com.azure:azure-sdk-bom:1.2.1 --> + <version>4.4.1</version><!-- com.azure:azure-sdk-bom:1.2.1 --> + </dependency> <dependency> <groupId>com.azure</groupId><!-- com.azure:azure-sdk-bom:1.2.1 --> <artifactId>azure-storage-blob</artifactId><!-- com.azure:azure-sdk-bom:1.2.1 -->