This is an automated email from the ASF dual-hosted git repository. Croway pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 281c730555fc43896523c5b49f943035c6ea3f47 Author: croway <[email protected]> AuthorDate: Thu Nov 12 12:23:04 2026 +0100 CAMEL-25675: camel-spring-boot - Hashicorp Vault TLS trust store and client certificate options Adds camel.vault.hashicorp.trust-store, trust-store-password, key-store and key-store-password, which Camel added to HashicorpVaultConfiguration together with the cert login, so that VaultConfigurationPropertiesMappingTest passes again. The authentication option now lists cert as well. --- .../src/main/docs/spring-boot.json | 26 ++++++++- .../HashicorpVaultConfigurationProperties.java | 63 ++++++++++++++++++++-- 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json b/core/camel-spring-boot/src/main/docs/spring-boot.json index 04add558693..8b6ed383967 100644 --- a/core/camel-spring-boot/src/main/docs/spring-boot.json +++ b/core/camel-spring-boot/src/main/docs/spring-boot.json @@ -1953,7 +1953,7 @@ { "name": "camel.vault.hashicorp.authentication", "type": "java.lang.String", - "description": "How to log in to hashicorp vault: token (a fixed token), approle (a role ID and a secret ID), kubernetes (the service account token of the pod) or jwt (a JWT, such as a workload identity token). Camel renews the token before it expires, and logs in again when the token can no longer be renewed.", + "description": "How to log in to hashicorp vault: token (a fixed token), approle (a role ID and a secret ID), kubernetes (the service account token of the pod), jwt (a JWT, such as a workload identity token) or cert (the TLS client certificate of the keyStore). Camel renews the token before it expires, and logs in again when the token can no longer be renewed.", "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties", "defaultValue": "token" }, @@ -1982,6 +1982,18 @@ "description": "The file to read the JWT from at every login, for the jwt and kubernetes logins. The kubernetes login reads \/var\/run\/secrets\/kubernetes.io\/serviceaccount\/token when neither jwt nor jwtFile is set.", "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" }, + { + "name": "camel.vault.hashicorp.key-store", + "type": "java.lang.String", + "description": "The file with the TLS client certificate and its private key, which Camel presents to hashicorp vault: for the cert login, or for a Vault that requires client certificates. A PKCS12 or JKS key store, or PEM with the certificate and the PKCS#8 private key.", + "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" + }, + { + "name": "camel.vault.hashicorp.key-store-password", + "type": "java.lang.String", + "description": "The password of the key store and of its private key, when it is a PKCS12 or JKS key store", + "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" + }, { "name": "camel.vault.hashicorp.namespace", "type": "java.lang.String", @@ -2044,6 +2056,18 @@ "description": "The Hashicorp Vault Token for accessing the service", "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" }, + { + "name": "camel.vault.hashicorp.trust-store", + "type": "java.lang.String", + "description": "The file with the certificates to trust for the TLS connection to hashicorp vault, such as the CA certificate of a private CA: a PKCS12 or JKS trust store, or PEM certificates. When not set, the JVM trusts the certificate as for any other TLS connection.", + "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" + }, + { + "name": "camel.vault.hashicorp.trust-store-password", + "type": "java.lang.String", + "description": "The password of the trust store, when it is a PKCS12 or JKS trust store", + "sourceType": "org.apache.camel.spring.boot.vault.HashicorpVaultConfigurationProperties" + }, { "name": "camel.vault.ibm.event-stream-bootstrap-servers", "type": "java.lang.String", diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/HashicorpVaultConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/HashicorpVaultConfigurationProperties.java index f08bc2038b9..80e4e138030 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/HashicorpVaultConfigurationProperties.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/HashicorpVaultConfigurationProperties.java @@ -24,10 +24,11 @@ public class HashicorpVaultConfigurationProperties { /** * How to log in to hashicorp vault: token (a fixed token), approle (a role ID and a secret ID), kubernetes (the - * service account token of the pod) or jwt (a JWT, such as a workload identity token). Camel renews the token - * before it expires, and logs in again when the token can no longer be renewed. + * service account token of the pod), jwt (a JWT, such as a workload identity token) or cert (the TLS client + * certificate of the keyStore). Camel renews the token before it expires, and logs in again when the token can no + * longer be renewed. */ - @Metadata(defaultValue = "token", enums = "token,approle,kubernetes,jwt") + @Metadata(defaultValue = "token", enums = "token,approle,kubernetes,jwt,cert") private String authentication = "token"; /** @@ -69,6 +70,30 @@ public class HashicorpVaultConfigurationProperties { */ private String authMountPath; + /** + * The file with the certificates to trust for the TLS connection to hashicorp vault, such as the CA certificate of + * a private CA: a PKCS12 or JKS trust store, or PEM certificates. When not set, the JVM trusts the certificate as + * for any other TLS connection. + */ + private String trustStore; + + /** + * The password of the trust store, when it is a PKCS12 or JKS trust store + */ + private String trustStorePassword; + + /** + * The file with the TLS client certificate and its private key, which Camel presents to hashicorp vault: for the + * cert login, or for a Vault that requires client certificates. A PKCS12 or JKS key store, or PEM with the + * certificate and the PKCS#8 private key. + */ + private String keyStore; + + /** + * The password of the key store and of its private key, when it is a PKCS12 or JKS key store + */ + private String keyStorePassword; + /** * The Hashicorp Vault Host for accessing the service */ @@ -173,6 +198,38 @@ public class HashicorpVaultConfigurationProperties { this.authMountPath = authMountPath; } + public String getTrustStore() { + return trustStore; + } + + public void setTrustStore(String trustStore) { + this.trustStore = trustStore; + } + + public String getTrustStorePassword() { + return trustStorePassword; + } + + public void setTrustStorePassword(String trustStorePassword) { + this.trustStorePassword = trustStorePassword; + } + + public String getKeyStore() { + return keyStore; + } + + public void setKeyStore(String keyStore) { + this.keyStore = keyStore; + } + + public String getKeyStorePassword() { + return keyStorePassword; + } + + public void setKeyStorePassword(String keyStorePassword) { + this.keyStorePassword = keyStorePassword; + } + public String getHost() { return host; }
