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 742460de811 Camel-15211: add props to configure SSL context parameters 
(#11812)
742460de811 is described below

commit 742460de81197b2b7866ce21858221a39a3025ff
Author: Jono Morris <[email protected]>
AuthorDate: Sat Oct 28 00:44:03 2023 +1300

    Camel-15211: add props to configure SSL context parameters (#11812)
    
    * CAMEL-15211 add camel.main.ssl. parameters
    
    * CAMEL-15211 add test for camel-main
    
    * CAMEL-15211 add main tests to components
    
    * CAMEL-15211 add generated updates
    
    * CAMEL-15211 move props to camel.main.ssl.xxx
    
    * CAMEL-15211 update unit tests
    
    * CAMEL-1522 update generated files
    
    * CAMEL-15211 change camel.main.ssl to camel.ssl
    
    * CAMEL-15211 update generated files
---
 .../main/camel-main-configuration-metadata.json    |   7 +
 components/camel-jetty/pom.xml                     |   5 +
 .../camel/component/jetty/MainHttpsRouteTest.java  | 123 +++++++++++++++
 .../MainNettyGlobalSSLContextParametersTest.java   |  86 +++++++++++
 .../camel-vertx/camel-vertx-websocket/pom.xml      |   5 +
 .../vertx/websocket/MainVertxWebsocketSSLTest.java |  67 ++++++++
 .../main/SSLConfigurationPropertiesConfigurer.java |  79 ++++++++++
 .../camel-main-configuration-metadata.json         |   7 +
 ...rg.apache.camel.main.SSLConfigurationProperties |   2 +
 core/camel-main/src/main/docs/main.adoc            |  15 ++
 .../org/apache/camel/main/BaseMainSupport.java     |  65 ++++++++
 .../camel/main/MainConfigurationProperties.java    |  23 +++
 .../camel/main/SSLConfigurationProperties.java     | 171 +++++++++++++++++++++
 .../java/org/apache/camel/main/MainSSLTest.java    | 123 +++++++++++++++
 .../maven/packaging/PrepareCamelMainMojo.java      |  10 +-
 15 files changed, 787 insertions(+), 1 deletion(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 7c503cfd5be..c0694afa267 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -2,6 +2,7 @@
   "groups": [
     { "name": "camel.main", "description": "Camel Main configurations", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties" },
     { "name": "camel.server", "description": "Camel Embedded HTTP Server (only 
for standalone; not Spring Boot or Quarkus) configurations", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties" },
+    { "name": "camel.ssl", "description": "Camel SSL configurations", 
"sourceType": "org.apache.camel.main.SSLConfigurationProperties" },
     { "name": "camel.threadpool", "description": "Camel Thread Pool 
configurations", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties" },
     { "name": "camel.health", "description": "Camel Health Check 
configurations", "sourceType": 
"org.apache.camel.main.HealthConfigurationProperties" },
     { "name": "camel.rest", "description": "Camel Rest-DSL configurations", 
"sourceType": "org.apache.camel.spi.RestConfiguration" },
@@ -223,6 +224,12 @@
     { "name": "camel.server.uploadEnabled", "description": "Whether to enable 
file upload via HTTP (not intended for production use). This functionality is 
for development to be able to reload Camel routes and code with source changes 
(if reload is enabled). If enabled then you can upload\/delete files via HTTP 
PUT\/DELETE on context-path: \/q\/upload\/{name}. You must also configure the 
uploadSourceDir option.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "t [...]
     { "name": "camel.server.uploadSourceDir", "description": "Source directory 
when upload is enabled.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
     { "name": "camel.server.useGlobalSslContextParameters", "description": 
"Whether to use global SSL configuration for securing the embedded HTTP 
server.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.ssl.clientAuthentication", "description": "Sets the 
configuration for server-side client-authentication requirements", 
"sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "defaultValue": "NONE", "enum": [ 
"NONE", "WANT", "REQUIRE" ] },
+    { "name": "camel.ssl.enabled", "description": "Enables SSL in your Camel 
application.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.ssl.keyStore", "description": "Sets the SSL Keystore 
resource.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", 
"type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.ssl.keystorePassword", "description": "Sets the SSL 
Keystore password.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
+    { "name": "camel.ssl.trustStore", "description": "Sets the SSL Truststore 
resource.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", 
"type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.ssl.trustStorePassword", "description": "Sets the SSL 
Truststore password.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
     { "name": "camel.threadpool.allowCoreThreadTimeOut", "description": "Sets 
default whether to allow core threads to timeout", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "boolean", 
"javaType": "java.lang.Boolean", "defaultValue": "false" },
     { "name": "camel.threadpool.config", "description": "Adds a configuration 
for a specific thread pool profile (inherits default values)", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "object", 
"javaType": "java.util.Map" },
     { "name": "camel.threadpool.keepAliveTime", "description": "Sets the 
default keep alive time for inactive threads", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "integer", 
"javaType": "java.lang.Long" },
diff --git a/components/camel-jetty/pom.xml b/components/camel-jetty/pom.xml
index cf9a08cd7fc..c1b7fcb03fe 100644
--- a/components/camel-jetty/pom.xml
+++ b/components/camel-jetty/pom.xml
@@ -148,6 +148,11 @@
             <artifactId>camel-jaxb</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-main</artifactId>
+            <scope>test</scope>
+        </dependency>
         <!-- testing with ok http client -->
         <dependency>
             <groupId>com.squareup.okhttp3</groupId>
diff --git 
a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/MainHttpsRouteTest.java
 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/MainHttpsRouteTest.java
new file mode 100644
index 00000000000..b2926431781
--- /dev/null
+++ 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/MainHttpsRouteTest.java
@@ -0,0 +1,123 @@
+/*
+ * 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.component.jetty;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.main.Main;
+import org.apache.camel.support.jsse.ClientAuthentication;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+import org.junit.jupiter.api.parallel.ResourceLock;
+
+import static org.apache.camel.component.jetty.BaseJettyTest.SSL_SYSPROPS;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@ResourceLock(SSL_SYSPROPS)
+@DisabledOnOs(value = OS.WINDOWS, disabledReason = "does not run well on 
Windows")
+public class MainHttpsRouteTest extends BaseJettyTest {
+
+    public static final String NULL_VALUE_MARKER = 
CamelTestSupport.class.getCanonicalName();
+    protected Properties originalValues = new Properties();
+
+    @Override
+    @BeforeEach
+    public void setUp() throws Exception {
+        super.setUp();
+        URL trustStoreUrl = 
this.getClass().getClassLoader().getResource("jsse/localhost.p12");
+        setSystemProp("javax.net.ssl.trustStore", 
trustStoreUrl.toURI().getPath());
+        setSystemProp("javax.net.ssl.trustStorePassword", "changeit");
+        setSystemProp("javax.net.ssl.trustStoreType", "PKCS12");
+    }
+
+    @Override
+    @AfterEach
+    public void tearDown() throws Exception {
+        restoreSystemProperties();
+        super.tearDown();
+    }
+
+    @Test
+    public void testHelloEndpoint() throws Exception {
+        Main main = new Main();
+        main.configure().sslConfig().setEnabled(true);
+        main.configure().sslConfig().setKeyStore(
+                
this.getClass().getClassLoader().getResource("jsse/localhost.p12").toString());
+        main.configure().sslConfig().setKeystorePassword("changeit");
+        
main.configure().sslConfig().setClientAuthentication(ClientAuthentication.WANT.name());
+        
main.addProperty("camel.component.jetty.useglobalsslcontextparameters", "true");
+
+        main.configure().addRoutesBuilder(new RouteBuilder() {
+
+            public void configure() throws URISyntaxException {
+                Processor proc = exchange -> 
exchange.getMessage().setBody("<b>Hello World</b>");
+                from("jetty:https://localhost:"; + port1 + 
"/hello").process(proc);
+            }
+        });
+
+        main.start();
+        try {
+            ByteArrayOutputStream os = new ByteArrayOutputStream();
+            URL url = new URL("https://localhost:"; + port1 + "/hello");
+            HttpsURLConnection connection = (HttpsURLConnection) 
url.openConnection();
+            SSLContext ssl = SSLContext.getInstance("TLSv1.3");
+            ssl.init(null, null, null);
+            connection.setSSLSocketFactory(ssl.getSocketFactory());
+            InputStream is = connection.getInputStream();
+            int c;
+            while ((c = is.read()) >= 0) {
+                os.write(c);
+            }
+
+            String data = new String(os.toByteArray());
+            assertEquals("<b>Hello World</b>", data);
+        } finally {
+            main.stop();
+        }
+    }
+
+    protected void setSystemProp(String key, String value) {
+        String originalValue = System.setProperty(key, value);
+        originalValues.put(key, originalValue != null ? originalValue : 
NULL_VALUE_MARKER);
+    }
+
+    protected void restoreSystemProperties() {
+        for (Map.Entry<Object, Object> entry : originalValues.entrySet()) {
+            Object key = entry.getKey();
+            Object value = entry.getValue();
+            if (NULL_VALUE_MARKER.equals(value)) {
+                System.clearProperty((String) key);
+            } else {
+                System.setProperty((String) key, (String) value);
+            }
+        }
+    }
+}
diff --git 
a/components/camel-netty/src/test/java/org/apache/camel/component/netty/MainNettyGlobalSSLContextParametersTest.java
 
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/MainNettyGlobalSSLContextParametersTest.java
new file mode 100644
index 00000000000..608f404dc63
--- /dev/null
+++ 
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/MainNettyGlobalSSLContextParametersTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.component.netty;
+
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.SSLSession;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.main.Main;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.isJavaVendor;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assumptions.assumeFalse;
+
+public class MainNettyGlobalSSLContextParametersTest extends BaseNettyTest {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testSSLInOutWithNettyConsumer() throws Exception {
+        // ibm jdks dont have sun security algorithms
+        assumeFalse(isJavaVendor("ibm"));
+
+        Main main = new Main();
+        main.configure().sslConfig().setEnabled(true);
+        main.configure().sslConfig().setKeyStore(
+                
this.getClass().getClassLoader().getResource("keystore.jks").toString());
+        main.configure().sslConfig().setKeystorePassword("changeit");
+        main.configure().sslConfig().setTrustStore(
+                
this.getClass().getClassLoader().getResource("keystore.jks").toString());
+        main.configure().sslConfig().setTrustStorePassword("changeit");
+        
main.addProperty("camel.component.netty.useglobalsslcontextparameters", "true");
+
+        main.configure().addRoutesBuilder(new RouteBuilder() {
+            public void configure() {
+                // needClientAuth=true so we can get the client certificate 
details
+                from("netty:tcp://localhost:" + getPort() + 
"?sync=true&ssl=true&needClientAuth=true")
+                        .process(exchange -> {
+                            SSLSession session
+                                    = 
exchange.getIn().getHeader(NettyConstants.NETTY_SSL_SESSION, SSLSession.class);
+                            if (session != null) {
+                                X509Certificate cert = (X509Certificate) 
session.getPeerCertificates()[0];
+                                Principal principal = cert.getSubjectDN();
+                                log.info("Client Cert SubjectDN: {}", 
principal.getName());
+                                exchange.getMessage().setBody(
+                                        "When You Go Home, Tell Them Of Us And 
Say, For Your Tomorrow, We Gave Our Today.");
+                            } else {
+                                exchange.getMessage().setBody("Cannot start 
conversion without SSLSession");
+                            }
+                        });
+            }
+        });
+
+        try {
+            main.start();
+            assertThat(
+                    main.getCamelTemplate()
+                            .requestBody("netty:tcp://localhost:" + getPort() 
+ "?sync=true&ssl=true",
+                                    "Epitaph in Kohima, India marking the WWII 
Battle of Kohima and Imphal, Burma Campaign - Attributed to John Maxwell 
Edmonds",
+                                    String.class))
+                    .isEqualTo("When You Go Home, Tell Them Of Us And Say, For 
Your Tomorrow, We Gave Our Today.");
+        } finally {
+            main.stop();
+        }
+    }
+}
diff --git a/components/camel-vertx/camel-vertx-websocket/pom.xml 
b/components/camel-vertx/camel-vertx-websocket/pom.xml
index dbc4ca72871..36abf636f60 100644
--- a/components/camel-vertx/camel-vertx-websocket/pom.xml
+++ b/components/camel-vertx/camel-vertx-websocket/pom.xml
@@ -55,5 +55,10 @@
             <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-main</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git 
a/components/camel-vertx/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/MainVertxWebsocketSSLTest.java
 
b/components/camel-vertx/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/MainVertxWebsocketSSLTest.java
new file mode 100644
index 00000000000..45f235cfe75
--- /dev/null
+++ 
b/components/camel-vertx/camel-vertx-websocket/src/test/java/org/apache/camel/component/vertx/websocket/MainVertxWebsocketSSLTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.component.vertx.websocket;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.main.Main;
+import org.apache.camel.support.jsse.ClientAuthentication;
+import org.junit.jupiter.api.Test;
+
+public class MainVertxWebsocketSSLTest extends VertxWebSocketTestSupport {
+
+    @Test
+    public void testGlobalServerSSLContextParameters() throws Exception {
+
+        Main main = new Main();
+        main.configure().sslConfig().setEnabled(true);
+        main.configure().sslConfig().setKeyStore("server.jks");
+        main.configure().sslConfig().setKeystorePassword("security");
+        main.configure().sslConfig().setTrustStore("client.jks");
+        main.configure().sslConfig().setTrustStorePassword("storepass");
+        
main.configure().sslConfig().setClientAuthentication(ClientAuthentication.REQUIRE.name());
+        
main.addProperty("camel.component.vertx-websocket.useglobalsslcontextparameters",
 "true");
+
+        main.configure().addRoutesBuilder(new RouteBuilder() {
+
+            public void configure() {
+                from("direct:start")
+                        .toF("vertx-websocket:localhost:%d/echo?", port);
+
+                fromF("vertx-websocket:localhost:%d/echo?", port)
+                        .setBody(simple("Hello ${body}"))
+                        .to("mock:result");
+            }
+        });
+
+        main.start();
+        try {
+            MockEndpoint mockEndpoint = 
main.getCamelContext().getEndpoint("mock:result", MockEndpoint.class);
+            mockEndpoint.expectedBodiesReceived("Hello world");
+
+            main.getCamelTemplate().sendBody("direct:start", "world");
+
+            mockEndpoint.assertIsSatisfied();
+        } finally {
+            main.stop();
+        }
+    }
+
+    @Override
+    protected void startCamelContext() {
+    }
+}
diff --git 
a/core/camel-main/src/generated/java/org/apache/camel/main/SSLConfigurationPropertiesConfigurer.java
 
b/core/camel-main/src/generated/java/org/apache/camel/main/SSLConfigurationPropertiesConfigurer.java
new file mode 100644
index 00000000000..401a8c7da9c
--- /dev/null
+++ 
b/core/camel-main/src/generated/java/org/apache/camel/main/SSLConfigurationPropertiesConfigurer.java
@@ -0,0 +1,79 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.main;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.main.SSLConfigurationProperties;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class SSLConfigurationPropertiesConfigurer extends 
org.apache.camel.support.component.PropertyConfigurerSupport implements 
GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
+        org.apache.camel.main.SSLConfigurationProperties target = 
(org.apache.camel.main.SSLConfigurationProperties) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "clientauthentication":
+        case "ClientAuthentication": 
target.setClientAuthentication(property(camelContext, java.lang.String.class, 
value)); return true;
+        case "enabled":
+        case "Enabled": target.setEnabled(property(camelContext, 
boolean.class, value)); return true;
+        case "keystore":
+        case "KeyStore": target.setKeyStore(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "keystorepassword":
+        case "KeystorePassword": 
target.setKeystorePassword(property(camelContext, java.lang.String.class, 
value)); return true;
+        case "truststore":
+        case "TrustStore": target.setTrustStore(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "truststorepassword":
+        case "TrustStorePassword": 
target.setTrustStorePassword(property(camelContext, java.lang.String.class, 
value)); return true;
+        default: return false;
+        }
+    }
+
+    @Override
+    public Class<?> getOptionType(String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "clientauthentication":
+        case "ClientAuthentication": return java.lang.String.class;
+        case "enabled":
+        case "Enabled": return boolean.class;
+        case "keystore":
+        case "KeyStore": return java.lang.String.class;
+        case "keystorepassword":
+        case "KeystorePassword": return java.lang.String.class;
+        case "truststore":
+        case "TrustStore": return java.lang.String.class;
+        case "truststorepassword":
+        case "TrustStorePassword": return java.lang.String.class;
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+        org.apache.camel.main.SSLConfigurationProperties target = 
(org.apache.camel.main.SSLConfigurationProperties) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "clientauthentication":
+        case "ClientAuthentication": return target.getClientAuthentication();
+        case "enabled":
+        case "Enabled": return target.isEnabled();
+        case "keystore":
+        case "KeyStore": return target.getKeyStore();
+        case "keystorepassword":
+        case "KeystorePassword": return target.getKeystorePassword();
+        case "truststore":
+        case "TrustStore": return target.getTrustStore();
+        case "truststorepassword":
+        case "TrustStorePassword": return target.getTrustStorePassword();
+        default: return null;
+        }
+    }
+}
+
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 7c503cfd5be..c0694afa267 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -2,6 +2,7 @@
   "groups": [
     { "name": "camel.main", "description": "Camel Main configurations", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties" },
     { "name": "camel.server", "description": "Camel Embedded HTTP Server (only 
for standalone; not Spring Boot or Quarkus) configurations", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties" },
+    { "name": "camel.ssl", "description": "Camel SSL configurations", 
"sourceType": "org.apache.camel.main.SSLConfigurationProperties" },
     { "name": "camel.threadpool", "description": "Camel Thread Pool 
configurations", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties" },
     { "name": "camel.health", "description": "Camel Health Check 
configurations", "sourceType": 
"org.apache.camel.main.HealthConfigurationProperties" },
     { "name": "camel.rest", "description": "Camel Rest-DSL configurations", 
"sourceType": "org.apache.camel.spi.RestConfiguration" },
@@ -223,6 +224,12 @@
     { "name": "camel.server.uploadEnabled", "description": "Whether to enable 
file upload via HTTP (not intended for production use). This functionality is 
for development to be able to reload Camel routes and code with source changes 
(if reload is enabled). If enabled then you can upload\/delete files via HTTP 
PUT\/DELETE on context-path: \/q\/upload\/{name}. You must also configure the 
uploadSourceDir option.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "t [...]
     { "name": "camel.server.uploadSourceDir", "description": "Source directory 
when upload is enabled.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
     { "name": "camel.server.useGlobalSslContextParameters", "description": 
"Whether to use global SSL configuration for securing the embedded HTTP 
server.", "sourceType": 
"org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.ssl.clientAuthentication", "description": "Sets the 
configuration for server-side client-authentication requirements", 
"sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "defaultValue": "NONE", "enum": [ 
"NONE", "WANT", "REQUIRE" ] },
+    { "name": "camel.ssl.enabled", "description": "Enables SSL in your Camel 
application.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
+    { "name": "camel.ssl.keyStore", "description": "Sets the SSL Keystore 
resource.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", 
"type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.ssl.keystorePassword", "description": "Sets the SSL 
Keystore password.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
+    { "name": "camel.ssl.trustStore", "description": "Sets the SSL Truststore 
resource.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", 
"type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.ssl.trustStorePassword", "description": "Sets the SSL 
Truststore password.", "sourceType": 
"org.apache.camel.main.SSLConfigurationProperties", "type": "string", 
"javaType": "java.lang.String" },
     { "name": "camel.threadpool.allowCoreThreadTimeOut", "description": "Sets 
default whether to allow core threads to timeout", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "boolean", 
"javaType": "java.lang.Boolean", "defaultValue": "false" },
     { "name": "camel.threadpool.config", "description": "Adds a configuration 
for a specific thread pool profile (inherits default values)", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "object", 
"javaType": "java.util.Map" },
     { "name": "camel.threadpool.keepAliveTime", "description": "Sets the 
default keep alive time for inactive threads", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "integer", 
"javaType": "java.lang.Long" },
diff --git 
a/core/camel-main/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.main.SSLConfigurationProperties
 
b/core/camel-main/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.main.SSLConfigurationProperties
new file mode 100644
index 00000000000..881499a5ce1
--- /dev/null
+++ 
b/core/camel-main/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.main.SSLConfigurationProperties
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.main.SSLConfigurationPropertiesConfigurer
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index dad7ddf112a..cd8f57aea73 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -173,6 +173,21 @@ The camel.server supports 10 options, which are listed 
below.
 |===
 
 
+=== Camel SSL configurations
+The camel.ssl supports 6 options, which are listed below.
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.ssl.clientAuthentication* | Sets the configuration for server-side 
client-authentication requirements | NONE | String
+| *camel.ssl.enabled* | Enables SSL in your Camel application. | false | 
boolean
+| *camel.ssl.keyStore* | Sets the SSL Keystore resource. |  | String
+| *camel.ssl.keystorePassword* | Sets the SSL Keystore password. |  | String
+| *camel.ssl.trustStore* | Sets the SSL Truststore resource. |  | String
+| *camel.ssl.trustStorePassword* | Sets the SSL Truststore password. |  | 
String
+|===
+
+
 === Camel Thread Pool configurations
 The camel.threadpool supports 8 options, which are listed below.
 
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java 
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index bc9760e909e..81bd3e3d53f 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -73,6 +73,11 @@ import org.apache.camel.support.PluginHelper;
 import org.apache.camel.support.PropertyBindingSupport;
 import org.apache.camel.support.ResourceHelper;
 import org.apache.camel.support.SimpleEventNotifierSupport;
+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.SSLContextServerParameters;
+import org.apache.camel.support.jsse.TrustManagersParameters;
 import org.apache.camel.support.scan.PackageScanHelper;
 import org.apache.camel.support.service.BaseService;
 import org.apache.camel.support.startup.BacklogStartupStepRecorder;
@@ -948,6 +953,7 @@ public abstract class BaseMainSupport extends BaseService {
         OrderedLocationProperties devConsoleProperties = new 
OrderedLocationProperties();
         OrderedLocationProperties globalOptions = new 
OrderedLocationProperties();
         OrderedLocationProperties httpServerProperties = new 
OrderedLocationProperties();
+        OrderedLocationProperties sslProperties = new 
OrderedLocationProperties();
         for (String key : prop.stringPropertyNames()) {
             String loc = prop.getLocation(key);
             if (key.startsWith("camel.context.")) {
@@ -1028,6 +1034,12 @@ public abstract class BaseMainSupport extends 
BaseService {
                 String option = key.substring(13);
                 validateOptionAndValue(key, option, value);
                 httpServerProperties.put(loc, optionKey(option), value);
+            } else if (key.startsWith("camel.ssl.")) {
+                // grab the value
+                String value = prop.getProperty(key);
+                String option = key.substring(10);
+                validateOptionAndValue(key, option, value);
+                sslProperties.put(loc, optionKey(option), value);
             }
         }
 
@@ -1099,6 +1111,12 @@ public abstract class BaseMainSupport extends 
BaseService {
                     mainConfigurationProperties.isAutoConfigurationFailFast(),
                     autoConfiguredProperties);
         }
+        if (!sslProperties.isEmpty() || 
mainConfigurationProperties.hasSslConfiguration()) {
+            LOG.debug("Auto-configuring SSL from loaded properties: {}", 
sslProperties.size());
+            setSslProperties(camelContext, sslProperties,
+                    mainConfigurationProperties.isAutoConfigurationFailFast(),
+                    autoConfiguredProperties);
+        }
 
         // configure which requires access to the model
         MainSupportModelConfigurer.configureModelCamelContext(camelContext, 
mainConfigurationProperties,
@@ -1145,6 +1163,11 @@ public abstract class BaseMainSupport extends 
BaseService {
                 LOG.warn("Property not auto-configured: camel.health.{}={}", 
k, v);
             });
         }
+        if (!sslProperties.isEmpty()) {
+            sslProperties.forEach((k, v) -> {
+                LOG.warn("Property not auto-configured: camel.ssl.{}={}", k, 
v);
+            });
+        }
         if (!routeTemplateProperties.isEmpty()) {
             routeTemplateProperties.forEach((k, v) -> {
                 LOG.warn("Property not auto-configured: 
camel.routetemplate.{}={}", k, v);
@@ -1390,6 +1413,48 @@ public abstract class BaseMainSupport extends 
BaseService {
         }
     }
 
+    private void setSslProperties(
+            CamelContext camelContext, OrderedLocationProperties properties,
+            boolean failIfNotSet, OrderedLocationProperties 
autoConfiguredProperties) {
+
+        SSLConfigurationProperties sslConfig = 
mainConfigurationProperties.sslConfig();
+        setPropertiesOnTarget(camelContext, sslConfig, properties, 
"camel.ssl.",
+                failIfNotSet, true, autoConfiguredProperties);
+
+        if (!sslConfig.isEnabled()) {
+            return;
+        }
+
+        String password = sslConfig.getKeystorePassword();
+        KeyStoreParameters ksp = new KeyStoreParameters();
+        ksp.setResource(sslConfig.getKeyStore());
+        ksp.setPassword(password);
+
+        KeyManagersParameters kmp = new KeyManagersParameters();
+        kmp.setKeyPassword(password);
+        kmp.setKeyStore(ksp);
+
+        TrustManagersParameters tmp = null;
+        if (sslConfig.getTrustStore() != null) {
+            KeyStoreParameters tsp = new KeyStoreParameters();
+            tsp.setResource(sslConfig.getTrustStore());
+            tsp.setPassword(sslConfig.getTrustStorePassword());
+
+            tmp = new TrustManagersParameters();
+            tmp.setKeyStore(tsp);
+        }
+
+        SSLContextServerParameters scsp = new SSLContextServerParameters();
+        scsp.setClientAuthentication(sslConfig.getClientAuthentication());
+
+        SSLContextParameters sslContextParameters = new SSLContextParameters();
+        sslContextParameters.setKeyManagers(kmp);
+        sslContextParameters.setTrustManagers(tmp);
+        sslContextParameters.setServerParameters(scsp);
+
+        camelContext.setSSLContextParameters(sslContextParameters);
+    }
+
     private void bindBeansToRegistry(
             CamelContext camelContext, OrderedLocationProperties properties,
             String optionPrefix, boolean failIfNotSet, boolean logSummary, 
boolean ignoreCase,
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
index 99236072390..128c8d51fd3 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
@@ -59,6 +59,7 @@ public class MainConfigurationProperties extends 
DefaultConfigurationProperties<
     private RestConfigurationProperties restConfigurationProperties;
     private VaultConfigurationProperties vaultConfigurationProperties;
     private HttpServerConfigurationProperties 
httpServerConfigurationProperties;
+    private SSLConfigurationProperties sslConfigurationProperties;
 
     @Override
     public void close() {
@@ -94,6 +95,10 @@ public class MainConfigurationProperties extends 
DefaultConfigurationProperties<
             httpServerConfigurationProperties.close();
             httpServerConfigurationProperties = null;
         }
+        if (sslConfigurationProperties != null) {
+            sslConfigurationProperties.close();
+            sslConfigurationProperties = null;
+        }
         if (routesBuilders != null) {
             routesBuilders.clear();
             routesBuilders = null;
@@ -158,6 +163,24 @@ public class MainConfigurationProperties extends 
DefaultConfigurationProperties<
         return httpServerConfigurationProperties != null;
     }
 
+    /**
+     * To configure SSL.
+     */
+    public SSLConfigurationProperties sslConfig() {
+        if (sslConfigurationProperties == null) {
+            sslConfigurationProperties = new SSLConfigurationProperties(this);
+        }
+
+        return sslConfigurationProperties;
+    }
+
+    /**
+     * Whether there has been any SSL configuration specified.
+     */
+    public boolean hasSslConfiguration() {
+        return sslConfigurationProperties != null;
+    }
+
     /**
      * To configure thread pools
      */
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/SSLConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/SSLConfigurationProperties.java
new file mode 100644
index 00000000000..d292c99aa46
--- /dev/null
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/SSLConfigurationProperties.java
@@ -0,0 +1,171 @@
+/*
+ * 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.main;
+
+import org.apache.camel.spi.BootstrapCloseable;
+import org.apache.camel.spi.Configurer;
+import org.apache.camel.spi.Metadata;
+
+/**
+ * Global configuration for SSL.
+ */
+@Configurer(bootstrap = true)
+public class SSLConfigurationProperties implements BootstrapCloseable {
+
+    private MainConfigurationProperties parent;
+
+    @Metadata
+    private boolean enabled;
+    @Metadata
+    private String keyStore;
+    @Metadata
+    private String keystorePassword;
+    @Metadata
+    private String trustStore;
+    @Metadata
+    private String trustStorePassword;
+    @Metadata(defaultValue = "NONE", enums = "NONE,WANT,REQUIRE")
+    private String clientAuthentication = "NONE";
+
+    public SSLConfigurationProperties(MainConfigurationProperties parent) {
+        this.parent = parent;
+    }
+
+    public MainConfigurationProperties end() {
+        return parent;
+    }
+
+    @Override
+    public void close() {
+        parent = null;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    /**
+     * Enables SSL in your Camel application.
+     */
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public String getKeyStore() {
+        return keyStore;
+    }
+
+    /**
+     * Sets the SSL Keystore resource.
+     */
+    public void setKeyStore(String keyStore) {
+        this.keyStore = keyStore;
+    }
+
+    public String getKeystorePassword() {
+        return keystorePassword;
+    }
+
+    /**
+     * Sets the SSL Keystore password.
+     */
+    public void setKeystorePassword(String keystorePassword) {
+        this.keystorePassword = keystorePassword;
+    }
+
+    public String getTrustStore() {
+        return trustStore;
+    }
+
+    /**
+     * Sets the SSL Truststore resource.
+     */
+    public void setTrustStore(String trustStore) {
+        this.trustStore = trustStore;
+    }
+
+    public String getTrustStorePassword() {
+        return trustStorePassword;
+    }
+
+    /**
+     * Sets the SSL Truststore password.
+     */
+    public void setTrustStorePassword(String trustStorePassword) {
+        this.trustStorePassword = trustStorePassword;
+    }
+
+    public String getClientAuthentication() {
+        return clientAuthentication;
+    }
+
+    /**
+     * Sets the configuration for server-side client-authentication 
requirements
+     */
+    public void setClientAuthentication(String clientAuthentication) {
+        this.clientAuthentication = clientAuthentication;
+    }
+
+    /**
+     * Enables SSL in your Camel application.
+     */
+    public SSLConfigurationProperties withEnabled(boolean enabled) {
+        this.enabled = enabled;
+        return (SSLConfigurationProperties) this;
+    }
+
+    /**
+     * Sets the SSL Keystore.
+     */
+    public SSLConfigurationProperties withKeyStore(String keyStore) {
+        this.keyStore = keyStore;
+        return (SSLConfigurationProperties) this;
+    }
+
+    /**
+     * Sets the SSL Keystore password.
+     */
+    public SSLConfigurationProperties withKeystorePassword(String 
keystorePassword) {
+        this.keystorePassword = keystorePassword;
+        return (SSLConfigurationProperties) this;
+    }
+
+    /**
+     * Sets the SSL Truststore.
+     */
+    public SSLConfigurationProperties withTrustStore(String trustStore) {
+        this.trustStore = trustStore;
+        return (SSLConfigurationProperties) this;
+    }
+
+    /**
+     * Sets the SSL Truststore password.
+     */
+    public SSLConfigurationProperties withTrustStorePassword(String 
trustStorePassword) {
+        this.trustStorePassword = trustStorePassword;
+        return (SSLConfigurationProperties) this;
+    }
+
+    /**
+     * Sets the configuration for server-side client-authentication 
requirements
+     */
+    public SSLConfigurationProperties withClientAuthentication(String 
clientAuthentication) {
+        this.clientAuthentication = clientAuthentication;
+        return (SSLConfigurationProperties) this;
+    }
+
+}
diff --git 
a/core/camel-main/src/test/java/org/apache/camel/main/MainSSLTest.java 
b/core/camel-main/src/test/java/org/apache/camel/main/MainSSLTest.java
new file mode 100644
index 00000000000..549e30d4572
--- /dev/null
+++ b/core/camel-main/src/test/java/org/apache/camel/main/MainSSLTest.java
@@ -0,0 +1,123 @@
+/*
+ * 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.main;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.support.jsse.ClientAuthentication;
+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.SSLContextServerParameters;
+import org.apache.camel.support.jsse.TrustManagersParameters;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class MainSSLTest {
+
+    @Test
+    public void testMainSSLParameters() throws Exception {
+        Main main = new Main();
+
+        main.addInitialProperty("camel.ssl.enabled", "true");
+        main.addInitialProperty("camel.ssl.keyStore", "server.jks");
+        main.addInitialProperty("camel.ssl.keystorePassword", "security");
+        main.addInitialProperty("camel.ssl.trustStore", "client.jks");
+        main.addInitialProperty("camel.ssl.trustStorePassword", "storepass");
+        main.addInitialProperty("camel.ssl.clientAuthentication", "REQUIRE");
+
+        main.start();
+
+        CamelContext context = main.getCamelContext();
+        assertNotNull(context);
+
+        SSLContextParameters sslParams = context.getSSLContextParameters();
+        assertNotNull(sslParams);
+
+        KeyManagersParameters kmp = sslParams.getKeyManagers();
+        assertNotNull(kmp);
+
+        Assertions.assertEquals("security", kmp.getKeyPassword());
+
+        KeyStoreParameters ksp = kmp.getKeyStore();
+        assertNotNull(ksp);
+
+        Assertions.assertEquals("server.jks", ksp.getResource());
+        Assertions.assertEquals("security", ksp.getPassword());
+
+        TrustManagersParameters tmp = sslParams.getTrustManagers();
+        assertNotNull(tmp);
+
+        KeyStoreParameters tsp = tmp.getKeyStore();
+        Assertions.assertEquals("client.jks", tsp.getResource());
+        Assertions.assertEquals("storepass", tsp.getPassword());
+
+        SSLContextServerParameters scsp = sslParams.getServerParameters();
+        assertNotNull(scsp);
+
+        Assertions.assertEquals(ClientAuthentication.REQUIRE.name(), 
scsp.getClientAuthentication());
+
+        main.stop();
+    }
+
+    @Test
+    public void testMainSSLParametersFluent() throws Exception {
+        Main main = new Main();
+
+        main.configure().sslConfig()
+                .withEnabled(true)
+                .withKeyStore("server.jks")
+                .withKeystorePassword("security")
+                .withTrustStore("client.jks")
+                .withTrustStorePassword("storepass")
+                .withClientAuthentication("REQUIRE");
+
+        main.start();
+
+        CamelContext context = main.getCamelContext();
+        assertNotNull(context);
+
+        SSLContextParameters sslParams = context.getSSLContextParameters();
+        assertNotNull(sslParams);
+
+        KeyManagersParameters kmp = sslParams.getKeyManagers();
+        assertNotNull(kmp);
+
+        Assertions.assertEquals("security", kmp.getKeyPassword());
+
+        KeyStoreParameters ksp = kmp.getKeyStore();
+        assertNotNull(ksp);
+
+        Assertions.assertEquals("server.jks", ksp.getResource());
+        Assertions.assertEquals("security", ksp.getPassword());
+
+        TrustManagersParameters tmp = sslParams.getTrustManagers();
+        assertNotNull(tmp);
+
+        KeyStoreParameters tsp = tmp.getKeyStore();
+        Assertions.assertEquals("client.jks", tsp.getResource());
+        Assertions.assertEquals("storepass", tsp.getPassword());
+
+        SSLContextServerParameters scsp = sslParams.getServerParameters();
+        assertNotNull(scsp);
+
+        Assertions.assertEquals(ClientAuthentication.REQUIRE.name(), 
scsp.getClientAuthentication());
+
+        main.stop();
+    }
+}
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
index 69df03f5fc7..91b1cc8e866 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
@@ -211,7 +211,11 @@ public class PrepareCamelMainMojo extends 
AbstractGeneratorMojo {
                     continue;
                 } else if 
(file.getName().contains("ThreadPoolConfigurationProperties")) {
                     prefix = "camel.threadpool.";
-                } else {
+                }
+                else if 
(file.getName().contains("SSLConfigurationProperties")) {
+                    prefix = "camel.ssl.";
+                }
+                else {
                     prefix = "camel.main.";
                 }
                 final String namePrefix = prefix;
@@ -281,6 +285,10 @@ public class PrepareCamelMainMojo extends 
AbstractGeneratorMojo {
                     "camel.server",
                     "Camel Embedded HTTP Server (only for standalone; not 
Spring Boot or Quarkus) configurations",
                     
"org.apache.camel.main.HttpServerConfigurationProperties"));
+            model.getGroups()
+                    .add(new MainGroupModel(
+                            "camel.ssl", "Camel SSL configurations",
+                            
"org.apache.camel.main.SSLConfigurationProperties"));
             model.getGroups()
                     .add(new MainGroupModel(
                             "camel.threadpool", "Camel Thread Pool 
configurations",

Reply via email to