This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 85cf222c37 Add hashicorp-vault native support
85cf222c37 is described below

commit 85cf222c379d69c389360cf2945aeca5164bd2b0
Author: James Netherton <[email protected]>
AuthorDate: Mon Sep 2 14:18:05 2024 +0100

    Add hashicorp-vault native support
    
    Fixes #6402
---
 .../ROOT/examples/components/hashicorp-vault.yml   |   6 +-
 .../reference/extensions/hashicorp-vault.adoc      |  54 ++++++-
 .../vault/deployment/HashicorpVaultProcessor.java  |  46 ------
 extensions-jvm/pom.xml                             |   1 -
 .../hashicorp-vault/deployment/pom.xml             |   8 +
 .../vault/deployment/HashicorpVaultProcessor.java  |  54 +++++++
 .../hashicorp-vault/pom.xml                        |   2 +-
 .../hashicorp-vault/runtime/pom.xml                |   9 ++
 .../runtime/src/main/doc/usage.adoc                |  35 +++++
 .../main/resources/META-INF/quarkus-extension.yaml |   3 +-
 extensions/pom.xml                                 |   1 +
 .../hashicorp/vault/it/HashicorpVaultResource.java |  90 ------------
 .../hashicorp/vault/it/HashicorpVaultTest.java     |  72 ---------
 integration-tests-jvm/pom.xml                      |   1 -
 .../hashicorp-vault/pom.xml                        |  31 ++++
 .../vault/it/HashicorpVaultProducers.java          |  48 ++++++
 .../hashicorp/vault/it/HashicorpVaultResource.java | 129 ++++++++++++++++
 .../hashicorp/vault/it/HashicorpVaultRoutes.java   |  23 ++-
 .../component/hashicorp/vault/it/SecretPojo.java   |  68 +++++++++
 .../hashicorp/vault/it/HashicorpVaultIT.java       |  24 +++
 .../hashicorp/vault/it/HashicorpVaultTest.java     | 163 +++++++++++++++++++++
 .../vault/it/HashicorpVaultTestResource.java       |   1 +
 integration-tests/pom.xml                          |   1 +
 tooling/scripts/test-categories.yaml               |   1 +
 24 files changed, 647 insertions(+), 224 deletions(-)

diff --git a/docs/modules/ROOT/examples/components/hashicorp-vault.yml 
b/docs/modules/ROOT/examples/components/hashicorp-vault.yml
index b0370c6378..4d2c4dc86d 100644
--- a/docs/modules/ROOT/examples/components/hashicorp-vault.yml
+++ b/docs/modules/ROOT/examples/components/hashicorp-vault.yml
@@ -2,11 +2,11 @@
 # This file was generated by 
camel-quarkus-maven-plugin:update-extension-doc-page
 cqArtifactId: camel-quarkus-hashicorp-vault
 cqArtifactIdBase: hashicorp-vault
-cqNativeSupported: false
-cqStatus: Preview
+cqNativeSupported: true
+cqStatus: Stable
 cqDeprecated: false
 cqJvmSince: 2.11.0
-cqNativeSince: n/a
+cqNativeSince: 3.15.0
 cqCamelPartName: hashicorp-vault
 cqCamelPartTitle: Hashicorp Vault
 cqCamelPartDescription: Manage secrets in Hashicorp Vault Service
diff --git a/docs/modules/ROOT/pages/reference/extensions/hashicorp-vault.adoc 
b/docs/modules/ROOT/pages/reference/extensions/hashicorp-vault.adoc
index 5621dbe7d2..2649168ddd 100644
--- a/docs/modules/ROOT/pages/reference/extensions/hashicorp-vault.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/hashicorp-vault.adoc
@@ -4,17 +4,17 @@
 = Hashicorp Vault
 :linkattrs:
 :cq-artifact-id: camel-quarkus-hashicorp-vault
-:cq-native-supported: false
-:cq-status: Preview
-:cq-status-deprecation: Preview
+:cq-native-supported: true
+:cq-status: Stable
+:cq-status-deprecation: Stable
 :cq-description: Manage secrets in Hashicorp Vault Service
 :cq-deprecated: false
 :cq-jvm-since: 2.11.0
-:cq-native-since: n/a
+:cq-native-since: 3.15.0
 
 ifeval::[{doc-show-badges} == true]
 [.badges]
-[.badge-key]##JVM since##[.badge-supported]##2.11.0## 
[.badge-key]##Native##[.badge-unsupported]##unsupported##
+[.badge-key]##JVM since##[.badge-supported]##2.11.0## [.badge-key]##Native 
since##[.badge-supported]##3.15.0##
 endif::[]
 
 Manage secrets in Hashicorp Vault Service
@@ -29,6 +29,10 @@ Please refer to the above link for usage and configuration 
details.
 [id="extensions-hashicorp-vault-maven-coordinates"]
 == Maven coordinates
 
+https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-hashicorp-vault[Create
 a new project with this extension on {link-quarkus-code-generator}, 
window="_blank"]
+
+Or add the coordinates to your existing project:
+
 [source,xml]
 ----
 <dependency>
@@ -39,3 +43,43 @@ Please refer to the above link for usage and configuration 
details.
 ifeval::[{doc-show-user-guide-link} == true]
 Check the xref:user-guide/index.adoc[User guide] for more information about 
writing Camel Quarkus applications.
 endif::[]
+
+[id="extensions-hashicorp-vault-usage"]
+== Usage
+[id="extensions-hashicorp-vault-usage-using-a-pojo-for-the-createsecret-operation-in-native-mode"]
+=== Using a POJO for the `createSecret` operation in native mode
+
+It is possible to use a POJO as the message body for the `createSecret` 
operation.
+In native mode, you must register any such POJO classes for reflection. E.g. 
via the `@RegisterForReflection`
+annotation or configuration property 
`quarkus.camel.native.reflection.include-patterns`.
+
+For example.
+
+[source,java]
+----
+@RegisterForReflection
+public class Credentials {
+    private String username;
+    private String password;
+
+    // Getters & setters
+}
+----
+
+[source,java]
+----
+from("direct:createSecret")
+    .process(new Processor() {
+        @Override
+        public void process(Exchange exchange) {
+            Credentials credentials = new Credentials();
+            credentials.setUsername("admin");
+            credentials.setPassword("2s3cr3t");
+            exchange.getMessage().setBody(credentials);
+        }
+    })
+    
.to("hashicorp-vault:secret?operation=createSecret&token=my-token&secretPath=my-secret")
+----
+
+Refer to the xref:user-guide/native-mode.adoc#reflection[Native mode] user 
guide for more information.
+
diff --git 
a/extensions-jvm/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
 
b/extensions-jvm/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
deleted file mode 100644
index b76a71e6f0..0000000000
--- 
a/extensions-jvm/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.hashicorp.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.NativeOrNativeSourcesBuild;
-import org.apache.camel.quarkus.core.JvmOnlyRecorder;
-import org.jboss.logging.Logger;
-
-class HashicorpVaultProcessor {
-
-    private static final Logger LOG = 
Logger.getLogger(HashicorpVaultProcessor.class);
-    private static final String FEATURE = "camel-hashicorp-vault";
-
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
-    }
-
-    /**
-     * Remove this once this extension starts supporting the native mode.
-     */
-    @BuildStep(onlyIf = NativeOrNativeSourcesBuild.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/pom.xml b/extensions-jvm/pom.xml
index d36186eac2..13aae3e13f 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -65,7 +65,6 @@
         <module>google-functions</module>
         <module>google-secret-manager</module>
         <module>guava-eventbus</module>
-        <module>hashicorp-vault</module>
         <module>huaweicloud-smn</module>
         <module>iec60870</module>
         <module>ignite</module>
diff --git a/extensions-jvm/hashicorp-vault/deployment/pom.xml 
b/extensions/hashicorp-vault/deployment/pom.xml
similarity index 88%
rename from extensions-jvm/hashicorp-vault/deployment/pom.xml
rename to extensions/hashicorp-vault/deployment/pom.xml
index 1c85eaac5f..dbc7c2c1dc 100644
--- a/extensions-jvm/hashicorp-vault/deployment/pom.xml
+++ b/extensions/hashicorp-vault/deployment/pom.xml
@@ -30,10 +30,18 @@
     <name>Camel Quarkus :: Hashicorp Vault :: Deployment</name>
 
     <dependencies>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-jackson-deployment</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-core-deployment</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            
<artifactId>camel-quarkus-support-jackson-dataformat-xml-deployment</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-support-spring-deployment</artifactId>
diff --git 
a/extensions/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
 
b/extensions/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
new file mode 100644
index 0000000000..9ae02ac64a
--- /dev/null
+++ 
b/extensions/hashicorp-vault/deployment/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/deployment/HashicorpVaultProcessor.java
@@ -0,0 +1,54 @@
+/*
+ * 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.hashicorp.vault.deployment;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
+import org.springframework.vault.support.VaultResponseSupport;
+
+class HashicorpVaultProcessor {
+    private static final String FEATURE = "camel-hashicorp-vault";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    IndexDependencyBuildItem indexDependencies() {
+        return new IndexDependencyBuildItem("org.springframework.vault", 
"spring-vault-core");
+    }
+
+    @BuildStep
+    void registerForReflection(CombinedIndexBuildItem combinedIndex, 
BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
+        String[] vaultResponseClasses = combinedIndex.getIndex()
+                .getAllKnownSubclasses(VaultResponseSupport.class)
+                .stream()
+                .map(ClassInfo::name)
+                .map(DotName::toString)
+                .toArray(String[]::new);
+
+        
reflectiveClass.produce(ReflectiveClassBuildItem.builder(VaultResponseSupport.class).methods(true).build());
+        
reflectiveClass.produce(ReflectiveClassBuildItem.builder(vaultResponseClasses).methods(true).build());
+    }
+}
diff --git a/extensions-jvm/hashicorp-vault/pom.xml 
b/extensions/hashicorp-vault/pom.xml
similarity index 96%
rename from extensions-jvm/hashicorp-vault/pom.xml
rename to extensions/hashicorp-vault/pom.xml
index 6146e0a0f2..f6b30ffcf2 100644
--- a/extensions-jvm/hashicorp-vault/pom.xml
+++ b/extensions/hashicorp-vault/pom.xml
@@ -21,7 +21,7 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.camel.quarkus</groupId>
-        <artifactId>camel-quarkus-extensions-jvm</artifactId>
+        <artifactId>camel-quarkus-extensions</artifactId>
         <version>3.15.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
diff --git a/extensions-jvm/hashicorp-vault/runtime/pom.xml 
b/extensions/hashicorp-vault/runtime/pom.xml
similarity index 88%
rename from extensions-jvm/hashicorp-vault/runtime/pom.xml
rename to extensions/hashicorp-vault/runtime/pom.xml
index c2bb267cd6..2e7a0ee3ca 100644
--- a/extensions-jvm/hashicorp-vault/runtime/pom.xml
+++ b/extensions/hashicorp-vault/runtime/pom.xml
@@ -32,13 +32,22 @@
 
     <properties>
         <camel.quarkus.jvmSince>2.11.0</camel.quarkus.jvmSince>
+        <camel.quarkus.nativeSince>3.15.0</camel.quarkus.nativeSince>
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-jackson</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            
<artifactId>camel-quarkus-support-jackson-dataformat-xml</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-support-spring</artifactId>
diff --git a/extensions/hashicorp-vault/runtime/src/main/doc/usage.adoc 
b/extensions/hashicorp-vault/runtime/src/main/doc/usage.adoc
new file mode 100644
index 0000000000..c04191de34
--- /dev/null
+++ b/extensions/hashicorp-vault/runtime/src/main/doc/usage.adoc
@@ -0,0 +1,35 @@
+=== Using a POJO for the `createSecret` operation in native mode
+
+It is possible to use a POJO as the message body for the `createSecret` 
operation.
+In native mode, you must register any such POJO classes for reflection. E.g. 
via the `@RegisterForReflection`
+annotation or configuration property 
`quarkus.camel.native.reflection.include-patterns`.
+
+For example.
+
+[source,java]
+----
+@RegisterForReflection
+public class Credentials {
+    private String username;
+    private String password;
+
+    // Getters & setters
+}
+----
+
+[source,java]
+----
+from("direct:createSecret")
+    .process(new Processor() {
+        @Override
+        public void process(Exchange exchange) {
+            Credentials credentials = new Credentials();
+            credentials.setUsername("admin");
+            credentials.setPassword("2s3cr3t");
+            exchange.getMessage().setBody(credentials);
+        }
+    })
+    
.to("hashicorp-vault:secret?operation=createSecret&token=my-token&secretPath=my-secret")
+----
+
+Refer to the xref:user-guide/native-mode.adoc#reflection[Native mode] user 
guide for more information.
diff --git 
a/extensions-jvm/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 
b/extensions/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
similarity index 97%
rename from 
extensions-jvm/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
rename to 
extensions/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 30f0a2290f..8a4ec6c57b 100644
--- 
a/extensions-jvm/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ 
b/extensions/hashicorp-vault/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -25,9 +25,8 @@ name: "Camel Hashicorp Vault"
 description: "Manage secrets in Hashicorp Vault Service"
 metadata:
   icon-url: 
"https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg";
-  unlisted: true
   guide: 
"https://camel.apache.org/camel-quarkus/latest/reference/extensions/hashicorp-vault.html";
   categories:
   - "integration"
   status:
-  - "preview"
+  - "stable"
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 4f0cad2f3d..e40582e683 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -124,6 +124,7 @@
         <module>groovy-dsl</module>
         <module>grpc</module>
         <module>gson</module>
+        <module>hashicorp-vault</module>
         <module>hazelcast</module>
         <module>headersmap</module>
         <module>hl7</module>
diff --git 
a/integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
 
b/integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
deleted file mode 100644
index 9af43911b8..0000000000
--- 
a/integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.hashicorp.vault.it;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.DELETE;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.POST;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.QueryParam;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-import org.apache.camel.ProducerTemplate;
-
-@Path("/hashicorp-vault")
-@ApplicationScoped
-public class HashicorpVaultResource {
-    @Inject
-    ProducerTemplate producerTemplate;
-
-    @Path("/secret")
-    @POST
-    public Response createSecret(@QueryParam("key") String key, 
@QueryParam("value") String value) throws Exception {
-        producerTemplate.sendBody("direct:createSecret", Map.of(key, value));
-        return Response.created(new URI("https://camel.apache.org/";)).build();
-    }
-
-    @SuppressWarnings("unchecked")
-    @Path("/secret")
-    @GET
-    @Produces(MediaType.TEXT_PLAIN)
-    public Response getSecret(@QueryParam("key") String key) {
-        try {
-            Map<String, Map<String, String>> map = 
producerTemplate.requestBody("direct:getSecret", null, Map.class);
-            if (map.containsKey("data")) {
-                Map<String, String> data = map.get("data");
-                if (data.containsKey(key)) {
-                    return Response.ok(data.get(key)).build();
-                }
-            }
-            return Response.status(404).build();
-        } catch (Exception e) {
-            return Response.status(404).build();
-        }
-    }
-
-    @Path("/secret/placeholder")
-    @GET
-    @Produces(MediaType.TEXT_PLAIN)
-    public String getSecretFromPropertyPlaceholder() {
-        return producerTemplate.requestBody("direct:propertyPlaceholder", 
null, String.class);
-    }
-
-    @Path("/secret")
-    @DELETE
-    public void deleteSecret() {
-        producerTemplate.sendBody("direct:deleteSecret", null);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Path("/secret/list/all")
-    @GET
-    public String listSecrets() {
-        List<String> secrets = 
producerTemplate.requestBody("direct:listSecrets", null, List.class);
-        if (secrets.size() == 1) {
-            return secrets.get(0);
-        }
-        throw new IllegalStateException("Expected a list containing 1 secret, 
but found " + secrets.size());
-    }
-}
diff --git 
a/integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
 
b/integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
deleted file mode 100644
index c90180a227..0000000000
--- 
a/integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.hashicorp.vault.it;
-
-import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
-
-import static 
org.apache.camel.quarkus.component.hashicorp.vault.it.HashicorpVaultRoutes.TEST_SECRET_NAME;
-import static 
org.apache.camel.quarkus.component.hashicorp.vault.it.HashicorpVaultRoutes.TEST_SECRET_PATH;
-import static org.hamcrest.Matchers.is;
-
-@QuarkusTest
-@QuarkusTestResource(HashicorpVaultTestResource.class)
-class HashicorpVaultTest {
-    @Test
-    void secretCRUD() {
-        String secretValue = "2s3cr3t";
-
-        RestAssured.given()
-                .queryParam("key", TEST_SECRET_NAME)
-                .queryParam("value", secretValue)
-                .post("/hashicorp-vault/secret")
-                .then()
-                .statusCode(201);
-
-        RestAssured.given()
-                .queryParam("key", TEST_SECRET_NAME)
-                .get("/hashicorp-vault/secret")
-                .then()
-                .statusCode(200)
-                .body(is(secretValue));
-
-        RestAssured.given()
-                .get("/hashicorp-vault/secret/placeholder")
-                .then()
-                .statusCode(200)
-                .body(is(secretValue));
-
-        RestAssured.given()
-                .get("/hashicorp-vault/secret/list/all")
-                .then()
-                .statusCode(200)
-                .body(is(TEST_SECRET_PATH));
-
-        RestAssured.given()
-                .delete("/hashicorp-vault/secret")
-                .then()
-                .statusCode(204);
-
-        RestAssured.given()
-                .queryParam("key", TEST_SECRET_NAME)
-                .get("/hashicorp-vault/secret")
-                .then()
-                .statusCode(404);
-    }
-}
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index 71417c1091..71c1c86ed2 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -64,7 +64,6 @@
         <module>google-functions</module>
         <module>google-secret-manager</module>
         <module>guava-eventbus</module>
-        <module>hashicorp-vault</module>
         <module>huaweicloud-smn</module>
         <module>iec60870</module>
         <module>ignite</module>
diff --git a/integration-tests-jvm/hashicorp-vault/pom.xml 
b/integration-tests/hashicorp-vault/pom.xml
similarity index 81%
rename from integration-tests-jvm/hashicorp-vault/pom.xml
rename to integration-tests/hashicorp-vault/pom.xml
index 7faadfc360..f0b0abbc71 100644
--- a/integration-tests-jvm/hashicorp-vault/pom.xml
+++ b/integration-tests/hashicorp-vault/pom.xml
@@ -43,6 +43,10 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy-jsonb</artifactId>
+        </dependency>
 
         <!-- test dependencies -->
         <dependency>
@@ -122,5 +126,32 @@
                 <skipTests>true</skipTests>
             </properties>
         </profile>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <properties>
+                <quarkus.native.enabled>true</quarkus.native.enabled>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git 
a/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultProducers.java
 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultProducers.java
new file mode 100644
index 0000000000..62a08d42ae
--- /dev/null
+++ 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultProducers.java
@@ -0,0 +1,48 @@
+/*
+ * 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.hashicorp.vault.it;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Named;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.springframework.vault.authentication.TokenAuthentication;
+import org.springframework.vault.client.VaultEndpoint;
+import org.springframework.vault.core.VaultTemplate;
+
+@ApplicationScoped
+public class HashicorpVaultProducers {
+    @ConfigProperty(name = "camel.vault.hashicorp.scheme")
+    String scheme;
+
+    @ConfigProperty(name = "camel.vault.hashicorp.host")
+    String host;
+
+    @ConfigProperty(name = "camel.vault.hashicorp.port")
+    int port;
+
+    @ConfigProperty(name = "camel.vault.hashicorp.token")
+    String token;
+
+    @Named("customVaultTemplate")
+    VaultTemplate customVaultTemplate() {
+        VaultEndpoint endpoint = new VaultEndpoint();
+        endpoint.setScheme(scheme);
+        endpoint.setHost(host);
+        endpoint.setPort(port);
+        return new VaultTemplate(endpoint, new TokenAuthentication(token));
+    }
+}
diff --git 
a/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
new file mode 100644
index 0000000000..d1264f20c9
--- /dev/null
+++ 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultResource.java
@@ -0,0 +1,129 @@
+/*
+ * 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.hashicorp.vault.it;
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.util.ObjectHelper;
+
+import static 
org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants.SECRET_PATH;
+import static 
org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants.SECRET_VERSION;
+
+@Path("/hashicorp-vault")
+@ApplicationScoped
+public class HashicorpVaultResource {
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Path("/secret")
+    @POST
+    public Response createSecret(
+            @QueryParam("endpointUri") String endpointUri,
+            @QueryParam("key") String key,
+            @QueryParam("value") String value) throws Exception {
+
+        producerTemplate.sendBody(endpointUri, Map.of(key, value));
+        return Response.created(new URI("https://camel.apache.org/";)).build();
+    }
+
+    @Path("/secret/pojo")
+    @POST
+    public Response createSecretFromPojo(
+            @QueryParam("secretA") String secretA,
+            @QueryParam("secretB") String secretB,
+            @QueryParam("secretC") String secretC) throws Exception {
+
+        SecretPojo pojo = new SecretPojo();
+        pojo.setSecretA(secretA);
+        pojo.setSecretB(secretB);
+        pojo.setSecretC(secretC);
+
+        producerTemplate.sendBody("direct:createSecret", pojo);
+        return Response.created(new URI("https://camel.apache.org/";)).build();
+    }
+
+    @SuppressWarnings("unchecked")
+    @Path("/secret")
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response getSecret(
+            @QueryParam("endpointUri") String endpointUri,
+            @QueryParam("secretPath") String secretPath,
+            @QueryParam("version") String version) {
+        try {
+            if (ObjectHelper.isEmpty(endpointUri)) {
+                endpointUri = "direct:getSecret";
+            }
+
+            Map<String, Object> headers = new HashMap<>();
+            headers.put(SECRET_PATH, secretPath);
+            if (version != null) {
+                headers.put(SECRET_VERSION, version);
+            }
+
+            Map<String, Map<String, String>> map = 
producerTemplate.requestBodyAndHeaders(endpointUri, null, headers,
+                    Map.class);
+            if (map != null && map.containsKey("data")) {
+                Map<String, String> data = map.get("data");
+                return Response.ok(data).build();
+            }
+            return Response.status(404).build();
+        } catch (Exception e) {
+            return Response.status(404).build();
+        }
+    }
+
+    @Path("/secret/placeholder")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getSecretFromPropertyPlaceholder(@QueryParam("secretPath") 
String secretPath,
+            @QueryParam("version") String version) {
+        Map<String, Object> headers = new HashMap<>();
+        headers.put(SECRET_PATH, secretPath);
+        if (version != null) {
+            headers.put(SECRET_VERSION, version);
+        }
+        return 
producerTemplate.requestBodyAndHeaders("direct:propertyPlaceholder", null, 
headers, String.class);
+    }
+
+    @Path("/secret")
+    @DELETE
+    public void deleteSecret() {
+        producerTemplate.sendBody("direct:deleteSecret", null);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Path("/secret/list/all")
+    @GET
+    public List<String> listSecrets() {
+        return producerTemplate.requestBody("direct:listSecrets", null, 
List.class);
+    }
+}
diff --git 
a/integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
similarity index 72%
rename from 
integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
rename to 
integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
index cd9ca33bb7..1c02ef393b 100644
--- 
a/integration-tests-jvm/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
+++ 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultRoutes.java
@@ -21,14 +21,18 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants;
 import org.apache.camel.spi.PropertiesComponent;
+import org.apache.camel.util.ObjectHelper;
 import org.eclipse.microprofile.config.inject.ConfigProperty;
 
+import static 
org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants.SECRET_PATH;
+import static 
org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants.SECRET_VERSION;
+
 @ApplicationScoped
 public class HashicorpVaultRoutes extends RouteBuilder {
     public static final String TEST_SECRET_NAME = "my-secret";
     public static final String TEST_SECRET_PATH = "camel-quarkus-secret";
+    public static final String TEST_VERSIONED_SECRET_PATH = 
"camel-quarkus-secret-versioned";
 
     @ConfigProperty(name = "camel.vault.hashicorp.host")
     String host;
@@ -45,10 +49,16 @@ public class HashicorpVaultRoutes extends RouteBuilder {
                 
.toF("hashicorp-vault:secret?operation=createSecret&scheme=http&host=%s&port=%d&token=%s&secretPath=%s",
 host,
                         port, token, TEST_SECRET_PATH);
 
+        from("direct:createVersionedSecret")
+                
.toF("hashicorp-vault:secret?operation=createSecret&scheme=http&host=%s&port=%d&token=%s&secretPath=%s",
 host,
+                        port, token, TEST_VERSIONED_SECRET_PATH);
+
         from("direct:getSecret")
-                
.setHeader(HashicorpVaultConstants.SECRET_PATH).constant(TEST_SECRET_PATH)
                 
.toF("hashicorp-vault:secret?operation=getSecret&scheme=http&host=%s&port=%d&token=%s",
 host, port, token);
 
+        from("direct:getSecretWithCustomVaultTemplate")
+                
.to("hashicorp-vault:secret?operation=getSecret&vaultTemplate=#customVaultTemplate");
+
         from("direct:deleteSecret")
                 
.toF("hashicorp-vault:secret?operation=deleteSecret&scheme=http&host=%s&port=%d&token=%s&secretPath=%s",
 host,
                         port, token, TEST_SECRET_PATH);
@@ -62,8 +72,15 @@ public class HashicorpVaultRoutes extends RouteBuilder {
                     @Override
                     public void process(Exchange exchange) throws Exception {
                         Message message = exchange.getMessage();
+                        String path = message.getHeader(SECRET_PATH, 
String.class);
+                        String version = message.getHeader(SECRET_VERSION, 
String.class);
+                        String versionSuffix = "";
+                        if (ObjectHelper.isNotEmpty(version)) {
+                            versionSuffix = "@" + version;
+                        }
+
                         PropertiesComponent component = 
exchange.getContext().getPropertiesComponent();
-                        component.resolveProperty("hashicorp:secret:" + 
TEST_SECRET_PATH).ifPresent(value -> {
+                        component.resolveProperty("hashicorp:secret:" + path + 
versionSuffix).ifPresent(value -> {
                             message.setBody(value.replaceAll("[{}]", 
"").split("=")[1]);
                         });
                     }
diff --git 
a/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/SecretPojo.java
 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/SecretPojo.java
new file mode 100644
index 0000000000..a476a892c8
--- /dev/null
+++ 
b/integration-tests/hashicorp-vault/src/main/java/org/apache/camel/quarkus/component/hashicorp/vault/it/SecretPojo.java
@@ -0,0 +1,68 @@
+/*
+ * 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.hashicorp.vault.it;
+
+import java.util.Objects;
+
+import io.quarkus.runtime.annotations.RegisterForReflection;
+
+@RegisterForReflection(fields = false)
+public class SecretPojo {
+    private String secretA;
+    private String secretB;
+    private String secretC;
+
+    public String getSecretA() {
+        return secretA;
+    }
+
+    public void setSecretA(String secretA) {
+        this.secretA = secretA;
+    }
+
+    public String getSecretB() {
+        return secretB;
+    }
+
+    public void setSecretB(String secretB) {
+        this.secretB = secretB;
+    }
+
+    public String getSecretC() {
+        return secretC;
+    }
+
+    public void setSecretC(String secretC) {
+        this.secretC = secretC;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())
+            return false;
+        SecretPojo that = (SecretPojo) o;
+        return Objects.equals(secretA, that.secretA) && 
Objects.equals(secretB, that.secretB)
+                && Objects.equals(secretC, that.secretC);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(secretA, secretB, secretC);
+    }
+}
diff --git 
a/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultIT.java
 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultIT.java
new file mode 100644
index 0000000000..17ce70e157
--- /dev/null
+++ 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultIT.java
@@ -0,0 +1,24 @@
+/*
+ * 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.hashicorp.vault.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class HashicorpVaultIT extends HashicorpVaultTest {
+
+}
diff --git 
a/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
new file mode 100644
index 0000000000..1bd85ef29e
--- /dev/null
+++ 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTest.java
@@ -0,0 +1,163 @@
+/*
+ * 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.hashicorp.vault.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static 
org.apache.camel.quarkus.component.hashicorp.vault.it.HashicorpVaultRoutes.TEST_SECRET_NAME;
+import static 
org.apache.camel.quarkus.component.hashicorp.vault.it.HashicorpVaultRoutes.TEST_SECRET_PATH;
+import static 
org.apache.camel.quarkus.component.hashicorp.vault.it.HashicorpVaultRoutes.TEST_VERSIONED_SECRET_PATH;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+
+@QuarkusTest
+@QuarkusTestResource(HashicorpVaultTestResource.class)
+class HashicorpVaultTest {
+    public static final String SECRET_VALUE = "2s3cr3t";
+
+    @Test
+    void secretCRUD() {
+        RestAssured.given()
+                .queryParam("endpointUri", "direct:createSecret")
+                .queryParam("key", TEST_SECRET_NAME)
+                .queryParam("value", SECRET_VALUE)
+                .post("/hashicorp-vault/secret")
+                .then()
+                .statusCode(201);
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_SECRET_PATH)
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(200)
+                .body(TEST_SECRET_NAME, is(SECRET_VALUE));
+
+        RestAssured.given()
+                .queryParam("endpointUri", 
"direct:getSecretWithCustomVaultTemplate")
+                .queryParam("secretPath", TEST_SECRET_PATH)
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(200)
+                .body(TEST_SECRET_NAME, is(SECRET_VALUE));
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_SECRET_PATH)
+                .get("/hashicorp-vault/secret/placeholder")
+                .then()
+                .statusCode(200)
+                .body(is(SECRET_VALUE));
+
+        RestAssured.given()
+                .get("/hashicorp-vault/secret/list/all")
+                .then()
+                .statusCode(200)
+                .body(containsString(TEST_SECRET_PATH));
+
+        RestAssured.given()
+                .delete("/hashicorp-vault/secret")
+                .then()
+                .statusCode(204);
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_SECRET_PATH)
+                .queryParam("key", TEST_SECRET_NAME)
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(404);
+    }
+
+    @Test
+    void secretPojo() {
+        String secretA = "Test Secret A";
+        String secretB = "Test Secret B";
+        String secretC = "Test Secret C";
+
+        RestAssured.given()
+                .queryParam("endpointUri", "direct:createSecret")
+                .queryParam("secretA", secretA)
+                .queryParam("secretB", secretB)
+                .queryParam("secretC", secretC)
+                .post("/hashicorp-vault/secret/pojo")
+                .then()
+                .statusCode(201);
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_SECRET_PATH)
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(200)
+                .body(
+                        "secretA", is(secretA),
+                        "secretB", is(secretB),
+                        "secretC", is(secretC));
+    }
+
+    @Test
+    void versionedSecret() {
+        RestAssured.given()
+                .queryParam("endpointUri", "direct:createVersionedSecret")
+                .queryParam("key", TEST_SECRET_NAME)
+                .queryParam("value", SECRET_VALUE)
+                .post("/hashicorp-vault/secret")
+                .then()
+                .statusCode(201);
+
+        String newSecretVersion = SECRET_VALUE + " version 2";
+        RestAssured.given()
+                .queryParam("endpointUri", "direct:createVersionedSecret")
+                .queryParam("key", TEST_SECRET_NAME)
+                .queryParam("value", newSecretVersion)
+                .post("/hashicorp-vault/secret")
+                .then()
+                .statusCode(201);
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_VERSIONED_SECRET_PATH)
+                .queryParam("version", "1")
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(200)
+                .body(TEST_SECRET_NAME, is(SECRET_VALUE));
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_VERSIONED_SECRET_PATH)
+                .queryParam("version", "2")
+                .get("/hashicorp-vault/secret")
+                .then()
+                .statusCode(200)
+                .body(TEST_SECRET_NAME, is(newSecretVersion));
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_VERSIONED_SECRET_PATH)
+                .queryParam("version", "1")
+                .get("/hashicorp-vault/secret/placeholder")
+                .then()
+                .statusCode(200)
+                .body(is(SECRET_VALUE));
+
+        RestAssured.given()
+                .queryParam("secretPath", TEST_VERSIONED_SECRET_PATH)
+                .queryParam("version", "2")
+                .get("/hashicorp-vault/secret/placeholder")
+                .then()
+                .statusCode(200)
+                .body(is(newSecretVersion));
+    }
+}
diff --git 
a/integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
similarity index 96%
rename from 
integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
rename to 
integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
index 8eb74e89c9..d98494fc48 100644
--- 
a/integration-tests-jvm/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
+++ 
b/integration-tests/hashicorp-vault/src/test/java/org/apache/camel/quarkus/component/hashicorp/vault/it/HashicorpVaultTestResource.java
@@ -43,6 +43,7 @@ public class HashicorpVaultTestResource implements 
QuarkusTestResourceLifecycleM
         container.start();
 
         return Map.of(
+                "camel.component.hashicorp-vault.autowired-enabled", "false",
                 "camel.vault.hashicorp.token", VAULT_TOKEN,
                 "camel.vault.hashicorp.host", container.getHost(),
                 "camel.vault.hashicorp.port", 
String.valueOf(container.getMappedPort(VAULT_PORT)),
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 55e1952a9c..0c700a213e 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -106,6 +106,7 @@
         <module>groovy</module>
         <module>groovy-dsl</module>
         <module>grpc</module>
+        <module>hashicorp-vault</module>
         <module>hazelcast</module>
         <module>headersmap</module>
         <module>hl7</module>
diff --git a/tooling/scripts/test-categories.yaml 
b/tooling/scripts/test-categories.yaml
index 6a57ba5ea0..4090308988 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -102,6 +102,7 @@ group-05:
 group-06:
   - exec
   - file
+  - hashicorp-vault
   - headersmap
   - jsonpath
   - kamelet

Reply via email to