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

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


The following commit(s) were added to refs/heads/main by this push:
     new 1aaa9406196e CAMEL-27916: camel-hashicorp-vault - accept 
sslContextParameters on the endpoint (#31182)
1aaa9406196e is described below

commit 1aaa9406196edf7453c1dd8e69336d4cfd756f51
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Dec 1 17:29:50 2026 +0100

    CAMEL-27916: camel-hashicorp-vault - accept sslContextParameters on the 
endpoint (#31182)
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../camel/catalog/components/hashicorp-vault.json  |  10 +-
 .../catalog/docs/hashicorp-vault-component.adoc    |   9 ++
 .../vault/HashicorpVaultComponentConfigurer.java   |   6 ++
 .../vault/HashicorpVaultEndpointConfigurer.java    |   6 ++
 .../vault/HashicorpVaultEndpointUriFactory.java    |   3 +-
 .../component/hashicorp/vault/hashicorp-vault.json |  10 +-
 .../src/main/docs/hashicorp-vault-component.adoc   |   9 ++
 .../hashicorp/vault/HashicorpVaultClient.java      |  29 ++++--
 .../vault/HashicorpVaultClientSettings.java        |  14 +++
 .../hashicorp/vault/HashicorpVaultComponent.java   |  26 ++++-
 .../vault/HashicorpVaultConfiguration.java         |  17 ++++
 .../hashicorp/vault/HashicorpVaultEndpoint.java    |   1 +
 .../hashicorp/vault/HashicorpVaultTls.java         |  23 ++++-
 .../hashicorp/vault/HashicorpVaultTlsTest.java     | 113 ++++++++++++++++++++-
 .../dsl/HashicorpVaultComponentBuilderFactory.java |  19 ++++
 .../dsl/HashicorpVaultEndpointBuilderFactory.java  |  40 ++++++++
 16 files changed, 312 insertions(+), 23 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json
index 2b3b2911021e..72534b06d1c2 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json
@@ -26,7 +26,8 @@
   },
   "componentProperties": {
     "lazyStartProducer": { "index": 0, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
-    "autowiredEnabled": { "index": 1, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "autowiredEnabled": { "index": 1, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "useGlobalSslContextParameters": { "index": 2, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters, for an endpoint that sets neither sslContextParameters nor 
trustStore and keyStore." }
   },
   "headers": {
     "CamelHashicorpVaultProducerOperation": { "index": 0, "kind": "header", 
"displayName": "", "group": "producer", "label": "producer", "required": false, 
"javaType": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation", "enum": [ 
"createSecret", "getSecret", "deleteSecret", "listSecrets" ], "deprecated": 
false, "autowired": false, "secret": false, "description": "The operation to 
perform: createSecret, getSecret, deleteSecret or listSecrets. Overrides the 
operation opti [...]
@@ -62,8 +63,9 @@
     "role": { "index": 21, "kind": "parameter", "displayName": "Role", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault role 
to log in as, for the kubernetes, jwt, cert, aws-iam, azure-msi and gcp-gce  
[...]
     "roleId": { "index": 22, "kind": "parameter", "displayName": "Role Id", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The role ID of the 
AppRole, for the approle login" },
     "secretId": { "index": 23, "kind": "parameter", "displayName": "Secret 
Id", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The secret ID of the 
AppRole, for the approle login" },
-    "token": { "index": 24, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault 
token, for the token login, sent with every request to Vau [...]
-    "trustStore": { "index": 25, "kind": "parameter", "displayName": "Trust 
Store", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The file with the 
certificates to trust for the TLS connection to HashiCorp Vault, such  [...]
-    "trustStorePassword": { "index": 26, "kind": "parameter", "displayName": 
"Trust Store Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The password of the 
trust store, when it is a PKCS [...]
+    "sslContextParameters": { "index": 24, "kind": "parameter", "displayName": 
"Ssl Context Parameters", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The TLS configuration of 
the conn [...]
+    "token": { "index": 25, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault 
token, for the token login, sent with every request to Vau [...]
+    "trustStore": { "index": 26, "kind": "parameter", "displayName": "Trust 
Store", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The file with the 
certificates to trust for the TLS connection to HashiCorp Vault, such  [...]
+    "trustStorePassword": { "index": 27, "kind": "parameter", "displayName": 
"Trust Store Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The password of the 
trust store, when it is a PKCS [...]
   }
 }
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hashicorp-vault-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hashicorp-vault-component.adoc
index b6f17d77c451..bc4e16700ebf 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hashicorp-vault-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hashicorp-vault-component.adoc
@@ -124,6 +124,15 @@ To present a client certificate to Vault, for the `cert` 
login or for a Vault th
 key. The key of a PEM file is not encrypted, in PKCS#8 (`-----BEGIN PRIVATE 
KEY-----`) or, for an RSA key, in PKCS#1
 (`-----BEGIN RSA PRIVATE KEY-----`).
 
+The endpoint also takes the TLS configuration of the
+xref:manual::camel-configuration-utilities.adoc[Camel JSSE Configuration 
Utility] instead: `sslContextParameters`.
+Its trust managers verify the certificate of Vault, and its key managers give 
the client certificate. With the
+component option `useGlobalSslContextParameters`, an endpoint that sets 
neither `sslContextParameters` nor
+`trustStore` and `keyStore` takes the global `SSLContextParameters` of the 
CamelContext (`camel.ssl`). An endpoint
+that sets both `sslContextParameters` and `trustStore` or `keyStore` fails to 
start. The properties function and the
+secret refresh task take `trustStore` and `keyStore` only, since they can 
start before the `camel.ssl` options are
+bound.
+
 The trust store and the key store are read when the client is created, when 
the endpoint, the properties function or
 the secret refresh task starts. A certificate replaced in its file, such as a 
client certificate renewed before it
 expires, is used after a restart.
diff --git 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponentConfigurer.java
 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponentConfigurer.java
index 496940a1a89c..7d67c3feb357 100644
--- 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponentConfigurer.java
+++ 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponentConfigurer.java
@@ -28,6 +28,8 @@ public class HashicorpVaultComponentConfigurer extends 
PropertyConfigurerSupport
         case "autowiredEnabled": 
target.setAutowiredEnabled(property(camelContext, boolean.class, value)); 
return true;
         case "lazystartproducer":
         case "lazyStartProducer": 
target.setLazyStartProducer(property(camelContext, boolean.class, value)); 
return true;
+        case "useglobalsslcontextparameters":
+        case "useGlobalSslContextParameters": 
target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, 
value)); return true;
         default: return false;
         }
     }
@@ -39,6 +41,8 @@ public class HashicorpVaultComponentConfigurer extends 
PropertyConfigurerSupport
         case "autowiredEnabled": return boolean.class;
         case "lazystartproducer":
         case "lazyStartProducer": return boolean.class;
+        case "useglobalsslcontextparameters":
+        case "useGlobalSslContextParameters": return boolean.class;
         default: return null;
         }
     }
@@ -51,6 +55,8 @@ public class HashicorpVaultComponentConfigurer extends 
PropertyConfigurerSupport
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
+        case "useglobalsslcontextparameters":
+        case "useGlobalSslContextParameters": return 
target.isUseGlobalSslContextParameters();
         default: return null;
         }
     }
diff --git 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointConfigurer.java
 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointConfigurer.java
index 938a441c1e07..022b8ea36dc2 100644
--- 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointConfigurer.java
+++ 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointConfigurer.java
@@ -59,6 +59,8 @@ public class HashicorpVaultEndpointConfigurer extends 
PropertyConfigurerSupport
         case "secretId": 
target.getConfiguration().setSecretId(property(camelContext, 
java.lang.String.class, value)); return true;
         case "secretpath":
         case "secretPath": 
target.getConfiguration().setSecretPath(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "sslcontextparameters":
+        case "sslContextParameters": 
target.getConfiguration().setSslContextParameters(property(camelContext, 
org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
         case "token": 
target.getConfiguration().setToken(property(camelContext, 
java.lang.String.class, value)); return true;
         case "truststore":
         case "trustStore": 
target.getConfiguration().setTrustStore(property(camelContext, 
java.lang.String.class, value)); return true;
@@ -113,6 +115,8 @@ public class HashicorpVaultEndpointConfigurer extends 
PropertyConfigurerSupport
         case "secretId": return java.lang.String.class;
         case "secretpath":
         case "secretPath": return java.lang.String.class;
+        case "sslcontextparameters":
+        case "sslContextParameters": return 
org.apache.camel.support.jsse.SSLContextParameters.class;
         case "token": return java.lang.String.class;
         case "truststore":
         case "trustStore": return java.lang.String.class;
@@ -163,6 +167,8 @@ public class HashicorpVaultEndpointConfigurer extends 
PropertyConfigurerSupport
         case "secretId": return target.getConfiguration().getSecretId();
         case "secretpath":
         case "secretPath": return target.getConfiguration().getSecretPath();
+        case "sslcontextparameters":
+        case "sslContextParameters": return 
target.getConfiguration().getSslContextParameters();
         case "token": return target.getConfiguration().getToken();
         case "truststore":
         case "trustStore": return target.getConfiguration().getTrustStore();
diff --git 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointUriFactory.java
 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointUriFactory.java
index 0f6a4466cd4a..6728c5ae9635 100644
--- 
a/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointUriFactory.java
+++ 
b/components/camel-hashicorp-vault/src/generated/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpointUriFactory.java
@@ -24,7 +24,7 @@ public class HashicorpVaultEndpointUriFactory extends 
org.apache.camel.support.c
     private static final Set<String> ENDPOINT_IDENTITY_PROPERTY_NAMES;
     private static final Map<String, String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(27);
+        Set<String> props = new HashSet<>(28);
         props.add("authMountPath");
         props.add("authentication");
         props.add("awsIamServerId");
@@ -48,6 +48,7 @@ public class HashicorpVaultEndpointUriFactory extends 
org.apache.camel.support.c
         props.add("secretId");
         props.add("secretPath");
         props.add("secretsEngine");
+        props.add("sslContextParameters");
         props.add("token");
         props.add("trustStore");
         props.add("trustStorePassword");
diff --git 
a/components/camel-hashicorp-vault/src/generated/resources/META-INF/org/apache/camel/component/hashicorp/vault/hashicorp-vault.json
 
b/components/camel-hashicorp-vault/src/generated/resources/META-INF/org/apache/camel/component/hashicorp/vault/hashicorp-vault.json
index 2b3b2911021e..72534b06d1c2 100644
--- 
a/components/camel-hashicorp-vault/src/generated/resources/META-INF/org/apache/camel/component/hashicorp/vault/hashicorp-vault.json
+++ 
b/components/camel-hashicorp-vault/src/generated/resources/META-INF/org/apache/camel/component/hashicorp/vault/hashicorp-vault.json
@@ -26,7 +26,8 @@
   },
   "componentProperties": {
     "lazyStartProducer": { "index": 0, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
-    "autowiredEnabled": { "index": 1, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "autowiredEnabled": { "index": 1, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "useGlobalSslContextParameters": { "index": 2, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters, for an endpoint that sets neither sslContextParameters nor 
trustStore and keyStore." }
   },
   "headers": {
     "CamelHashicorpVaultProducerOperation": { "index": 0, "kind": "header", 
"displayName": "", "group": "producer", "label": "producer", "required": false, 
"javaType": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation", "enum": [ 
"createSecret", "getSecret", "deleteSecret", "listSecrets" ], "deprecated": 
false, "autowired": false, "secret": false, "description": "The operation to 
perform: createSecret, getSecret, deleteSecret or listSecrets. Overrides the 
operation opti [...]
@@ -62,8 +63,9 @@
     "role": { "index": 21, "kind": "parameter", "displayName": "Role", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault role 
to log in as, for the kubernetes, jwt, cert, aws-iam, azure-msi and gcp-gce  
[...]
     "roleId": { "index": 22, "kind": "parameter", "displayName": "Role Id", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The role ID of the 
AppRole, for the approle login" },
     "secretId": { "index": 23, "kind": "parameter", "displayName": "Secret 
Id", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The secret ID of the 
AppRole, for the approle login" },
-    "token": { "index": 24, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault 
token, for the token login, sent with every request to Vau [...]
-    "trustStore": { "index": 25, "kind": "parameter", "displayName": "Trust 
Store", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The file with the 
certificates to trust for the TLS connection to HashiCorp Vault, such  [...]
-    "trustStorePassword": { "index": 26, "kind": "parameter", "displayName": 
"Trust Store Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The password of the 
trust store, when it is a PKCS [...]
+    "sslContextParameters": { "index": 24, "kind": "parameter", "displayName": 
"Ssl Context Parameters", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The TLS configuration of 
the conn [...]
+    "token": { "index": 25, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The HashiCorp Vault 
token, for the token login, sent with every request to Vau [...]
+    "trustStore": { "index": 26, "kind": "parameter", "displayName": "Trust 
Store", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The file with the 
certificates to trust for the TLS connection to HashiCorp Vault, such  [...]
+    "trustStorePassword": { "index": 27, "kind": "parameter", "displayName": 
"Trust Store Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", 
"configurationField": "configuration", "description": "The password of the 
trust store, when it is a PKCS [...]
   }
 }
diff --git 
a/components/camel-hashicorp-vault/src/main/docs/hashicorp-vault-component.adoc 
b/components/camel-hashicorp-vault/src/main/docs/hashicorp-vault-component.adoc
index b6f17d77c451..bc4e16700ebf 100644
--- 
a/components/camel-hashicorp-vault/src/main/docs/hashicorp-vault-component.adoc
+++ 
b/components/camel-hashicorp-vault/src/main/docs/hashicorp-vault-component.adoc
@@ -124,6 +124,15 @@ To present a client certificate to Vault, for the `cert` 
login or for a Vault th
 key. The key of a PEM file is not encrypted, in PKCS#8 (`-----BEGIN PRIVATE 
KEY-----`) or, for an RSA key, in PKCS#1
 (`-----BEGIN RSA PRIVATE KEY-----`).
 
+The endpoint also takes the TLS configuration of the
+xref:manual::camel-configuration-utilities.adoc[Camel JSSE Configuration 
Utility] instead: `sslContextParameters`.
+Its trust managers verify the certificate of Vault, and its key managers give 
the client certificate. With the
+component option `useGlobalSslContextParameters`, an endpoint that sets 
neither `sslContextParameters` nor
+`trustStore` and `keyStore` takes the global `SSLContextParameters` of the 
CamelContext (`camel.ssl`). An endpoint
+that sets both `sslContextParameters` and `trustStore` or `keyStore` fails to 
start. The properties function and the
+secret refresh task take `trustStore` and `keyStore` only, since they can 
start before the `camel.ssl` options are
+bound.
+
 The trust store and the key store are read when the client is created, when 
the endpoint, the properties function or
 the secret refresh task starts. A certificate replaced in its file, such as a 
client certificate renewed before it
 expires, is used after a restart.
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClient.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClient.java
index ebf473477f7d..fab96d09f7df 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClient.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClient.java
@@ -117,7 +117,7 @@ public final class HashicorpVaultClient implements 
Closeable {
      */
     public static HashicorpVaultClient create(CamelContext camelContext, 
Object source, HashicorpVaultClientSettings settings) {
         ExecutorServiceManager executorServiceManager = 
camelContext.getExecutorServiceManager();
-        return create(settings, false,
+        return create(camelContext, settings, false,
                 () -> 
executorServiceManager.newSingleThreadScheduledExecutor(source, RENEWAL_THREAD),
                 executorServiceManager::shutdownNow);
     }
@@ -135,7 +135,7 @@ public final class HashicorpVaultClient implements 
Closeable {
      * @since                           4.24
      */
     public static HashicorpVaultClient create(HashicorpVaultClientSettings 
settings) {
-        return create(settings, true, () -> 
Executors.newSingleThreadScheduledExecutor(runnable -> {
+        return create(null, settings, true, () -> 
Executors.newSingleThreadScheduledExecutor(runnable -> {
             Thread thread = new Thread(runnable, "Camel " + RENEWAL_THREAD);
             // the renewal does not keep the JVM running
             thread.setDaemon(true);
@@ -144,19 +144,21 @@ public final class HashicorpVaultClient implements 
Closeable {
     }
 
     /**
-     * @param shortUse whether the client is for a short use: it then logs in 
once, and uses a given token without
-     *                 looking it up
+     * @param camelContext the context that creates the TLS context of the 
sslContextParameters of the settings, null
+     *                     for a client without a CamelContext
+     * @param shortUse     whether the client is for a short use: it then logs 
in once, and uses a given token without
+     *                     looking it up
      */
     private static HashicorpVaultClient create(
-            HashicorpVaultClientSettings settings, boolean shortUse, 
Supplier<ScheduledExecutorService> renewals,
-            Consumer<ScheduledExecutorService> shutdown) {
+            CamelContext camelContext, HashicorpVaultClientSettings settings, 
boolean shortUse,
+            Supplier<ScheduledExecutorService> renewals, 
Consumer<ScheduledExecutorService> shutdown) {
         validate(settings);
         VaultEndpoint endpoint = new VaultEndpoint();
         endpoint.setHost(settings.getHost());
         endpoint.setPort(Integer.parseInt(settings.getPort()));
         endpoint.setScheme(settings.getScheme());
 
-        SimpleClientHttpRequestFactory requestFactory = 
requestFactory(HashicorpVaultTls.sslContext(settings));
+        SimpleClientHttpRequestFactory requestFactory = 
requestFactory(HashicorpVaultTls.sslContext(settings, camelContext));
         VaultClient client = vaultClient(endpoint, requestFactory, null);
         // on HashiCorp Cloud the login methods are in the namespace, while 
Camel reads the secrets with the namespace in
         // their path: so only the login, and the renewal and revocation of 
its token, are sent to the namespace
@@ -207,6 +209,12 @@ public final class HashicorpVaultClient implements 
Closeable {
         } catch (NumberFormatException e) {
             throw new IllegalArgumentException("The port of HashiCorp Vault 
must be a number: " + settings.getPort(), e);
         }
+        if (settings.getSslContextParameters() != null
+                && (ObjectHelper.isNotEmpty(settings.getTrustStore()) || 
ObjectHelper.isNotEmpty(settings.getKeyStore()))) {
+            throw new IllegalArgumentException(
+                    "The TLS connection to HashiCorp Vault takes either 
sslContextParameters, or trustStore and keyStore,"
+                                               + " not both");
+        }
         switch (HashicorpVaultAuthentication.of(settings.getAuthentication())) 
{
             case TOKEN -> {
                 if (ObjectHelper.isEmpty(settings.getToken())) {
@@ -229,8 +237,11 @@ public final class HashicorpVaultClient implements 
Closeable {
                 validateJwt(settings, "jwt");
             }
             case CERT -> {
-                if (ObjectHelper.isEmpty(settings.getKeyStore())) {
-                    throw new IllegalArgumentException("The cert login needs a 
key store with the client certificate");
+                if (ObjectHelper.isEmpty(settings.getKeyStore()) && 
(settings.getSslContextParameters() == null
+                        || settings.getSslContextParameters().getKeyManagers() 
== null)) {
+                    throw new IllegalArgumentException(
+                            "The cert login needs the client certificate: a 
key store, or sslContextParameters with key"
+                                                       + " managers");
                 }
                 if (!"https".equalsIgnoreCase(settings.getScheme())) {
                     // the client certificate is presented in the TLS handshake
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClientSettings.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClientSettings.java
index 2c34812d8a62..eabacbfb4ed2 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClientSettings.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClientSettings.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.hashicorp.vault;
 import java.util.List;
 import java.util.function.UnaryOperator;
 
+import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.vault.HashicorpVaultConfiguration;
 
@@ -74,6 +75,7 @@ public final class HashicorpVaultClientSettings {
     private String trustStorePassword;
     private String keyStore;
     private String keyStorePassword;
+    private SSLContextParameters sslContextParameters;
     private String awsIamServerId;
     private String awsRegion;
     private String awsStsEndpoint;
@@ -305,6 +307,18 @@ public final class HashicorpVaultClientSettings {
         this.keyStorePassword = keyStorePassword;
     }
 
+    /**
+     * The TLS configuration of the connection to HashiCorp Vault, instead of 
the trust store and the key store: only on
+     * the endpoint, whose CamelContext creates the TLS context from it
+     */
+    public SSLContextParameters getSslContextParameters() {
+        return sslContextParameters;
+    }
+
+    public void setSslContextParameters(SSLContextParameters 
sslContextParameters) {
+        this.sslContextParameters = sslContextParameters;
+    }
+
     public String getAwsIamServerId() {
         return awsIamServerId;
     }
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponent.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponent.java
index 6c4f3a1e2a1e..e333f98c8f45 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponent.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultComponent.java
@@ -20,17 +20,21 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.util.ObjectHelper;
 
 /**
  * HashiCorp Vault component
  */
 @Component("hashicorp-vault")
-public class HashicorpVaultComponent extends DefaultComponent {
+public class HashicorpVaultComponent extends DefaultComponent implements 
SSLContextParametersAware {
     @Metadata
     private HashicorpVaultConfiguration configuration = new 
HashicorpVaultConfiguration();
+    @Metadata(label = "security")
+    private boolean useGlobalSslContextParameters;
 
     public HashicorpVaultComponent() {
     }
@@ -54,6 +58,12 @@ public class HashicorpVaultComponent extends 
DefaultComponent {
         final HashicorpVaultEndpoint endpoint = new 
HashicorpVaultEndpoint(uri, this, epConfiguration);
         setProperties(endpoint, parameters);
 
+        if (epConfiguration.getSslContextParameters() == null && 
ObjectHelper.isEmpty(epConfiguration.getTrustStore())
+                && ObjectHelper.isEmpty(epConfiguration.getKeyStore())) {
+            // the global TLS configuration, unless the endpoint has one of 
its own
+            
epConfiguration.setSslContextParameters(retrieveGlobalSslContextParameters());
+        }
+
         if (epConfiguration.getVaultTemplate() == null) {
             // without a vault template the endpoint logs in itself, with the 
login it is configured with
             HashicorpVaultClient.validate(endpoint.clientSettings());
@@ -61,4 +71,18 @@ public class HashicorpVaultComponent extends 
DefaultComponent {
 
         return endpoint;
     }
+
+    @Override
+    public boolean isUseGlobalSslContextParameters() {
+        return this.useGlobalSslContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters, for an endpoint that 
sets neither sslContextParameters nor
+     * trustStore and keyStore.
+     */
+    @Override
+    public void setUseGlobalSslContextParameters(boolean 
useGlobalSslContextParameters) {
+        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
+    }
 }
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultConfiguration.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultConfiguration.java
index f30ea46d999d..25c598d692ce 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultConfiguration.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultConfiguration.java
@@ -21,6 +21,7 @@ import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.jsse.SSLContextParameters;
 import org.springframework.vault.core.VaultTemplate;
 
 @UriParams
@@ -76,6 +77,8 @@ public class HashicorpVaultConfiguration implements Cloneable 
{
     @UriParam(label = "security", security = "secret")
     private String keyStorePassword;
     @UriParam(label = "security")
+    private SSLContextParameters sslContextParameters;
+    @UriParam(label = "security")
     private String awsIamServerId;
     @UriParam(label = "security")
     private String awsRegion;
@@ -265,6 +268,20 @@ public class HashicorpVaultConfiguration implements 
Cloneable {
         this.keyStorePassword = keyStorePassword;
     }
 
+    /**
+     * The TLS configuration of the connection to HashiCorp Vault, as a JSSE 
SSLContextParameters, instead of trustStore
+     * and keyStore: its trust managers verify the certificate of Vault, and 
its key managers give the client
+     * certificate, for the cert login or for a Vault that requires client 
certificates. It cannot be set together with
+     * trustStore or keyStore.
+     */
+    public SSLContextParameters getSslContextParameters() {
+        return sslContextParameters;
+    }
+
+    public void setSslContextParameters(SSLContextParameters 
sslContextParameters) {
+        this.sslContextParameters = sslContextParameters;
+    }
+
     /**
      * The value of the X-Vault-AWS-IAM-Server-ID header of the aws-iam login, 
when the AWS login of HashiCorp Vault
      * requires one (iam_server_id_header_value)
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpoint.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpoint.java
index ca60c0d6a075..14ae0ed4b675 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpoint.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultEndpoint.java
@@ -120,6 +120,7 @@ public class HashicorpVaultEndpoint extends DefaultEndpoint 
{
         settings.setTrustStorePassword(configuration.getTrustStorePassword());
         settings.setKeyStore(configuration.getKeyStore());
         settings.setKeyStorePassword(configuration.getKeyStorePassword());
+        
settings.setSslContextParameters(configuration.getSslContextParameters());
         settings.setAwsIamServerId(configuration.getAwsIamServerId());
         settings.setAwsRegion(configuration.getAwsRegion());
         settings.setAwsStsEndpoint(configuration.getAwsStsEndpoint());
diff --git 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTls.java
 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTls.java
index a1e7cbea06af..fe997cc79aff 100644
--- 
a/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTls.java
+++ 
b/components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTls.java
@@ -42,6 +42,8 @@ import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
 
+import org.apache.camel.CamelContext;
+import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.util.ObjectHelper;
 import org.springframework.vault.support.PemObject;
 
@@ -62,12 +64,27 @@ final class HashicorpVaultTls {
     }
 
     /**
-     * The TLS context of the trust store and key store of the settings, or 
null when neither is set, so that the client
-     * trusts the server as any other TLS connection of the JVM.
+     * The TLS context of the settings: of their sslContextParameters, or of 
their trust store and key store, or null
+     * when none is set, so that the client trusts the server as any other TLS 
connection of the JVM.
      *
+     * @param  camelContext             the context that creates the TLS 
context of sslContextParameters, may be null
+     *                                  when they are not set
      * @throws IllegalArgumentException when a store cannot be read
      */
-    static SSLContext sslContext(HashicorpVaultClientSettings settings) {
+    static SSLContext sslContext(HashicorpVaultClientSettings settings, 
CamelContext camelContext) {
+        SSLContextParameters parameters = settings.getSslContextParameters();
+        if (parameters != null) {
+            if (camelContext == null) {
+                throw new IllegalArgumentException(
+                        "The sslContextParameters of HashiCorp Vault need a 
CamelContext to create the TLS context");
+            }
+            try {
+                return parameters.createSSLContext(camelContext);
+            } catch (GeneralSecurityException | IOException e) {
+                throw new IllegalArgumentException(
+                        "Cannot create the TLS context of HashiCorp Vault from 
sslContextParameters: " + e.getMessage(), e);
+            }
+        }
         if (ObjectHelper.isEmpty(settings.getTrustStore()) && 
ObjectHelper.isEmpty(settings.getKeyStore())) {
             return null;
         }
diff --git 
a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTlsTest.java
 
b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTlsTest.java
index 128cc8650bd6..895097d32774 100644
--- 
a/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTlsTest.java
+++ 
b/components/camel-hashicorp-vault/src/test/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultTlsTest.java
@@ -24,8 +24,13 @@ import javax.net.ssl.SSLHandshakeException;
 import javax.net.ssl.X509KeyManager;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.component.hashicorp.vault.FakeVault.Request;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.support.jsse.KeyManagersParameters;
+import org.apache.camel.support.jsse.KeyStoreParameters;
+import org.apache.camel.support.jsse.SSLContextParameters;
+import org.apache.camel.support.jsse.TrustManagersParameters;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -34,6 +39,7 @@ import org.springframework.vault.support.VaultResponse;
 import static org.apache.camel.component.hashicorp.vault.FakeVault.tlsFile;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -144,7 +150,15 @@ class HashicorpVaultTlsTest {
         settings.setAuthentication("cert");
         IllegalArgumentException e
                 = assertThrows(IllegalArgumentException.class, () -> 
HashicorpVaultClient.validate(settings));
-        assertEquals("The cert login needs a key store with the client 
certificate", e.getMessage());
+        assertEquals("The cert login needs the client certificate: a key 
store, or sslContextParameters with key managers",
+                e.getMessage());
+
+        // the key managers of sslContextParameters give the client certificate
+        settings.setSslContextParameters(sslContextParameters(false));
+        e = assertThrows(IllegalArgumentException.class, () -> 
HashicorpVaultClient.validate(settings));
+        assertEquals("The cert login needs the client certificate: a key 
store, or sslContextParameters with key managers",
+                e.getMessage());
+        settings.setSslContextParameters(null);
 
         settings.setKeyStore(tlsFile("client.pem"));
         settings.setScheme("http");
@@ -152,6 +166,73 @@ class HashicorpVaultTlsTest {
         assertEquals("The cert login needs the https scheme", e.getMessage());
     }
 
+    @Test
+    void trustsVaultWithSslContextParameters() {
+        HashicorpVaultClientSettings settings = token();
+        settings.setSslContextParameters(sslContextParameters(false));
+        client = HashicorpVaultClient.create(context, this, settings);
+
+        assertEquals("pw", readPassword());
+        
assertNull(vault.requests("secret/data/api").get(0).clientCertificate(), "no 
key managers, no client certificate");
+    }
+
+    @Test
+    void certLoginPresentsTheClientCertificateOfSslContextParameters() {
+        vault.on("auth/cert/login", request -> FakeVault.login("cert-token", 
3600));
+        HashicorpVaultClientSettings settings = token();
+        settings.setToken(null);
+        settings.setAuthentication("cert");
+        settings.setSslContextParameters(sslContextParameters(true));
+        client = HashicorpVaultClient.create(context, this, settings);
+
+        assertEquals("pw", readPassword());
+        assertEquals("CN=camel-client", 
vault.requests("auth/cert/login").get(0).clientCertificate());
+        assertEquals("cert-token", 
vault.requests("secret/data/api").get(0).token());
+    }
+
+    @Test
+    void sslContextParametersCannotBeSetWithTheStores() {
+        HashicorpVaultClientSettings settings = token();
+        settings.setSslContextParameters(sslContextParameters(false));
+        settings.setTrustStore(tlsFile("ca.pem"));
+        IllegalArgumentException e
+                = assertThrows(IllegalArgumentException.class, () -> 
HashicorpVaultClient.validate(settings));
+        assertEquals("The TLS connection to HashiCorp Vault takes either 
sslContextParameters, or trustStore and keyStore,"
+                     + " not both",
+                e.getMessage());
+
+        settings.setTrustStore(null);
+        settings.setKeyStore(tlsFile("client.pem"));
+        assertThrows(IllegalArgumentException.class, () -> 
HashicorpVaultClient.validate(settings));
+    }
+
+    @Test
+    void anEndpointWithBothSslContextParametersAndATrustStoreFailsToStart() {
+        context.getRegistry().bind("tls", sslContextParameters(false));
+
+        ResolveEndpointFailedException e = 
assertThrows(ResolveEndpointFailedException.class,
+                () -> context.getEndpoint(endpointUri() + 
"&sslContextParameters=#tls&trustStore=" + tlsFile("ca.pem")));
+        assertTrue(e.getCause().getMessage().contains("either 
sslContextParameters, or trustStore and keyStore"),
+                e.getCause().getMessage());
+    }
+
+    @Test
+    void anEndpointWithoutTlsOptionsTakesTheGlobalSslContextParameters() {
+        SSLContextParameters global = sslContextParameters(false);
+        context.setSSLContextParameters(global);
+        context.getComponent("hashicorp-vault", 
HashicorpVaultComponent.class).setUseGlobalSslContextParameters(true);
+
+        HashicorpVaultEndpoint endpoint = context.getEndpoint(endpointUri(), 
HashicorpVaultEndpoint.class);
+        endpoint.start();
+        assertSame(global, 
endpoint.getConfiguration().getSslContextParameters());
+        VaultResponse response = 
endpoint.getVaultTemplate().read("secret/data/api");
+        assertEquals("pw", ((Map<?, ?>) 
response.getData().get("data")).get("password"));
+
+        HashicorpVaultEndpoint own
+                = context.getEndpoint(endpointUri() + "&trustStore=" + 
tlsFile("ca.pem"), HashicorpVaultEndpoint.class);
+        assertNull(own.getConfiguration().getSslContextParameters(), "an 
endpoint with a trust store of its own keeps it");
+    }
+
     @Test
     void readsAnEcKeyInPkcs8() {
         KeyManager[] managers = 
HashicorpVaultTls.keyManagers(tlsFile("client-ec.pem"), null);
@@ -210,6 +291,36 @@ class HashicorpVaultTlsTest {
         return settings;
     }
 
+    private String endpointUri() {
+        return "hashicorp-vault:secret?host=localhost&port=" + vault.port() + 
"&scheme=https&token=my-token";
+    }
+
+    /**
+     * The JSSE configuration that trusts the test CA, and with 
withClientCertificate presents the client certificate
+     * camel-client
+     */
+    private static SSLContextParameters sslContextParameters(boolean 
withClientCertificate) {
+        TrustManagersParameters trustManagers = new TrustManagersParameters();
+        trustManagers.setKeyStore(keyStore("truststore.p12"));
+        SSLContextParameters parameters = new SSLContextParameters();
+        parameters.setTrustManagers(trustManagers);
+        if (withClientCertificate) {
+            KeyManagersParameters keyManagers = new KeyManagersParameters();
+            keyManagers.setKeyStore(keyStore("client.p12"));
+            keyManagers.setKeyPassword("changeit");
+            parameters.setKeyManagers(keyManagers);
+        }
+        return parameters;
+    }
+
+    private static KeyStoreParameters keyStore(String name) {
+        KeyStoreParameters keyStore = new KeyStoreParameters();
+        keyStore.setResource("file:" + tlsFile(name));
+        keyStore.setPassword("changeit");
+        keyStore.setType("PKCS12");
+        return keyStore;
+    }
+
     private String readPassword() {
         VaultResponse response = 
client.getVaultTemplate().read("secret/data/api");
         return ((Map<?, ?>) 
response.getData().get("data")).get("password").toString();
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java
index 2e022249e98c..03f3f53130a1 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java
@@ -98,6 +98,24 @@ public interface HashicorpVaultComponentBuilderFactory {
             doSetProperty("autowiredEnabled", autowiredEnabled);
             return this;
         }
+    
+        
+        /**
+         * Enable usage of global SSL context parameters, for an endpoint that
+         * sets neither sslContextParameters nor trustStore and keyStore.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: security
+         * 
+         * @param useGlobalSslContextParameters the value to set
+         * @return the dsl builder
+         */
+        default HashicorpVaultComponentBuilder 
useGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
+            doSetProperty("useGlobalSslContextParameters", 
useGlobalSslContextParameters);
+            return this;
+        }
     }
 
     class HashicorpVaultComponentBuilderImpl
@@ -115,6 +133,7 @@ public interface HashicorpVaultComponentBuilderFactory {
             switch (name) {
             case "lazyStartProducer": ((HashicorpVaultComponent) 
component).setLazyStartProducer((boolean) value); return true;
             case "autowiredEnabled": ((HashicorpVaultComponent) 
component).setAutowiredEnabled((boolean) value); return true;
+            case "useGlobalSslContextParameters": ((HashicorpVaultComponent) 
component).setUseGlobalSslContextParameters((boolean) value); return true;
             default: return false;
             }
         }
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java
index c164efdc329b..0bdb5a544313 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java
@@ -479,6 +479,46 @@ public interface HashicorpVaultEndpointBuilderFactory {
             doSetProperty("secretId", secretId);
             return this;
         }
+        /**
+         * The TLS configuration of the connection to HashiCorp Vault, as a 
JSSE
+         * SSLContextParameters, instead of trustStore and keyStore: its trust
+         * managers verify the certificate of Vault, and its key managers give
+         * the client certificate, for the cert login or for a Vault that
+         * requires client certificates. It cannot be set together with
+         * trustStore or keyStore.
+         * 
+         * The option is a:
+         * <code>org.apache.camel.support.jsse.SSLContextParameters</code> 
type.
+         * 
+         * Group: security
+         * 
+         * @param sslContextParameters the value to set
+         * @return the dsl builder
+         */
+        default HashicorpVaultEndpointBuilder 
sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters 
sslContextParameters) {
+            doSetProperty("sslContextParameters", sslContextParameters);
+            return this;
+        }
+        /**
+         * The TLS configuration of the connection to HashiCorp Vault, as a 
JSSE
+         * SSLContextParameters, instead of trustStore and keyStore: its trust
+         * managers verify the certificate of Vault, and its key managers give
+         * the client certificate, for the cert login or for a Vault that
+         * requires client certificates. It cannot be set together with
+         * trustStore or keyStore.
+         * 
+         * The option will be converted to a
+         * <code>org.apache.camel.support.jsse.SSLContextParameters</code> 
type.
+         * 
+         * Group: security
+         * 
+         * @param sslContextParameters the value to set
+         * @return the dsl builder
+         */
+        default HashicorpVaultEndpointBuilder sslContextParameters(String 
sslContextParameters) {
+            doSetProperty("sslContextParameters", sslContextParameters);
+            return this;
+        }
         /**
          * The HashiCorp Vault token, for the token login, sent with every
          * request to Vault. A renewable token is renewed before it expires, 
but

Reply via email to