src/main/java/org/embulk/executor/remoteserver/RemoteServerExecutor.java in embulk-executor-remoteserver-0.3.2 vs src/main/java/org/embulk/executor/remoteserver/RemoteServerExecutor.java in embulk-executor-remoteserver-0.4.0

- old
+ new

@@ -49,25 +49,25 @@ @Config("cert_p12_file") @ConfigDefault("null") Optional<P12File> getCertP12File(); - @Config("ca_p12_file") + @Config("ca_cert_path") @ConfigDefault("null") - Optional<P12File> getCaP12File(); + Optional<String> getCaCertPath(); @ConfigInject ModelManager getModelManager(); // Used for the local mode (mainly for testing) @Config("__server_cert_p12_file") @ConfigDefault("null") Optional<P12File> getServerCertP12File(); - @Config("__server_ca_p12_file") + @Config("__server_ca_cert_path") @ConfigDefault("null") - Optional<P12File> getServerCaP12File(); + Optional<String> getServerCaCertPath(); @Config("__server_require_tls_client_auth") @ConfigDefault("false") boolean getServerRequireTlsClientAuth(); } @@ -131,12 +131,12 @@ systemConfigJson, pluginTaskJson, processTaskJson, gemSpecs, pluginArchiveBytes, state, inputTaskCount, modelManager); TLSConfig tlsConfig = null; if (pluginTask.getUseTls()) { tlsConfig = new TLSConfig(); - pluginTask.getCertP12File().ifPresent(tlsConfig::keyStore); - pluginTask.getCaP12File().ifPresent(tlsConfig::trustStore); + pluginTask.getCertP12File().ifPresent(tlsConfig::setKeyStore); + pluginTask.getCaCertPath().ifPresent(tlsConfig::setCaCertPath); } try (EmbulkClient client = EmbulkClient.open(session, hosts, tlsConfig)) { client.createSession(); @@ -169,14 +169,12 @@ private EmbulkServer startEmbulkServer(PluginTask task) throws IOException { TLSConfig tlsConfig = null; if (task.getUseTls()) { tlsConfig = new TLSConfig(); - task.getServerCertP12File().ifPresent(tlsConfig::keyStore); - task.getServerCaP12File().ifPresent(tlsConfig::trustStore); - if (task.getServerRequireTlsClientAuth()) { - tlsConfig.enableClientAuth(true); - } + task.getServerCertP12File().ifPresent(tlsConfig::setKeyStore); + task.getServerCaCertPath().ifPresent(tlsConfig::setCaCertPath); + tlsConfig.setEnableClientAuth(task.getServerRequireTlsClientAuth()); } return EmbulkServer.start(DEFAULT_HOST.getName(), DEFAULT_HOST.getPort(), 1, tlsConfig); } }