You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/02 14:54:00 UTC
[jira] [Updated] (CAMEL-14807) Fluent builder for configuring JSSE in Java
[ https://issues.apache.org/jira/browse/CAMEL-14807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-14807:
--------------------------------
Priority: Minor (was: Major)
> Fluent builder for configuring JSSE in Java
> -------------------------------------------
>
> Key: CAMEL-14807
> URL: https://issues.apache.org/jira/browse/CAMEL-14807
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: Future
>
>
> It would be good with a fluent builder for JSSE to setup the SSLContext stuff that is tedious to do. For example from this unit test
> {code}
> public class VertxPlatformHttpEngineTest {
> public static SSLContextParameters serverSSLParameters;
> public static SSLContextParameters clientSSLParameters;
> @BeforeAll
> public static void setUp() {
> serverSSLParameters = new SSLContextParameters();
> clientSSLParameters = new SSLContextParameters();
> KeyStoreParameters keystoreParameters = new KeyStoreParameters();
> keystoreParameters.setResource("jsse/service.jks");
> keystoreParameters.setPassword("security");
> KeyManagersParameters serviceSSLKeyManagers = new KeyManagersParameters();
> serviceSSLKeyManagers.setKeyPassword("security");
> serviceSSLKeyManagers.setKeyStore(keystoreParameters);
> serverSSLParameters.setKeyManagers(serviceSSLKeyManagers);
> KeyStoreParameters truststoreParameters = new KeyStoreParameters();
> truststoreParameters.setResource("jsse/truststore.jks");
> truststoreParameters.setPassword("storepass");
> TrustManagersParameters clientAuthServiceSSLTrustManagers = new TrustManagersParameters();
> clientAuthServiceSSLTrustManagers.setKeyStore(truststoreParameters);
> serverSSLParameters.setTrustManagers(clientAuthServiceSSLTrustManagers);
> SSLContextServerParameters clientAuthSSLContextServerParameters = new SSLContextServerParameters();
> clientAuthSSLContextServerParameters.setClientAuthentication("REQUIRE");
> serverSSLParameters.setServerParameters(clientAuthSSLContextServerParameters);
> TrustManagersParameters clientSSLTrustManagers = new TrustManagersParameters();
> clientSSLTrustManagers.setKeyStore(truststoreParameters);
> clientSSLParameters.setTrustManagers(clientSSLTrustManagers);
> KeyManagersParameters clientAuthClientSSLKeyManagers = new KeyManagersParameters();
> clientAuthClientSSLKeyManagers.setKeyPassword("security");
> clientAuthClientSSLKeyManagers.setKeyStore(keystoreParameters);
> clientSSLParameters.setKeyManagers(clientAuthClientSSLKeyManagers);
> }
> ...
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)