embulk-executor-remoteserver 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e3e581f4610b6a718fba908cdac5a526bc78775
4
- data.tar.gz: 8ed2e998e2715585c10530626b3d0770cad8cc1f
3
+ metadata.gz: f28395ebbd29d2028501114573e227c225fd8b6c
4
+ data.tar.gz: ab865e0e32d2c4d4b56057497278ab61ee1d64be
5
5
  SHA512:
6
- metadata.gz: 7ccde0fe8ccb9f5189da433a8822cb9d3035d1f612474a3e1f5eb00ffe1bfc30f219c6e185299c058843cd4d97c20d7a1df78dfd4c9f89c6582c539474349315
7
- data.tar.gz: ffac80497a0e036476db4c17e2ffe0f6a3b9322352c8a2000c2477598d9ec5ca33a27992947cdee8ea20c6e98588c33bc5531e5fe0a5795b3cd9a6d81aebc545
6
+ metadata.gz: 7de676f12a5aab6ff29d4b43c191b06637f40901037e21bf05a9c98432bff45766e67626d6d6d7cb097d7f065a92e3fe4924b2abaa22fc497d7b530f60a43112
7
+ data.tar.gz: 7dc8342789e19402d7a1d61f25bb7525aaed2525496eb93d482f42b078e25ba2ce387c78e35785788c0a89898c3ce99d074692fa99fd5f000f04372a3d10dc3f
data/README.md CHANGED
@@ -14,11 +14,11 @@ Embulk executor plugin to run Embulk tasks on remote servers.
14
14
 
15
15
  - **hosts**: List of remote servers (`hostname` or `hostname:port`, default port is `30001`). If not specified, the executor runs as the local mode, which starts an Embulk server on its own process (array of string)
16
16
  - **timeout_seconds**: Timeout seconds of the whole execution (integer, default: `3600`)
17
- - **tls**: Enable to connect server over TLS (boolean, default: `false`)
18
- - **key_store_p12**: Information of a P12 file used as a [KeyManager](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/KeyManager.html) to register your client certificate. It would be needed when client auth mode is enabled on Embulk server.
17
+ - **use_tls**: Enable to connect server over TLS (boolean, default: `false`)
18
+ - **cert_p12_file**: Information of a P12 file used as your client certificate. It would be needed when client authentication is enabled on Embulk server.
19
19
  - **path**: Path of the file (string, required)
20
20
  - **password**: Password of the file (string, required)
21
- - **trust_store_p12**: Information of a P12 file used as a [TrustManager](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/TrustManager.html) to register a CA certificate. It would be needed when Embulk server uses unknown CA's certificate.
21
+ - **ca_p12_file**: Information of a P12 file used as CA certificate. It would be needed when Embulk server uses a certificate in which unknown CA signed.
22
22
  - **path**: Path of the file (string, required)
23
23
  - **password**: Password of the file (string, required)
24
24
 
@@ -49,12 +49,10 @@ There are some environment variables to configure the server
49
49
 
50
50
  - `BIND_ADDRESS`: Bind address of the server (default: `0.0.0.0`)
51
51
  - `PORT`: Port number to listen (default: `30001`)
52
- - `ENABLE_TLS`: Try to connect to client via TLS if `true` (default: `false`)
53
- - `ENABLE_TLS_CLIENT_AUTH`: Require client authentication if `true` (default: `false`)
54
- - `KEY_P12_PATH`: Path of the P12 file used as a KeyManager
55
- - `KEY_P12_PASSWORD`: Password of the Key P12 file
56
- - `TRUST_P12_PATH`: Path of the P12 file used as a TrustManager
57
- - `TRUST_P12_PASSWORD`: Password of the Trust P12 file
52
+ - `USE_TLS`: Try to connect to client via TLS if `true` (default: `false`)
53
+ - `REQUIRE_TLS_CLIENT_AUTH`: Require client authentication if `true` (default: `false`)
54
+ - `CERT_P12_PATH`, `CERT_P12_PASSWORD`: Path and password of the P12 file for server certificate. Ignored unless both is set.
55
+ - `CA_P12_PATH`, `CA_P12_PASSWORD`: Path and password of the P12 file for CA certificate. Ignored unless both is set.
58
56
 
59
57
  ## Build
60
58
 
data/gradle.properties CHANGED
@@ -1 +1 @@
1
- version=0.3.1
1
+ version=0.3.2
@@ -20,24 +20,24 @@ public class Launcher {
20
20
  }
21
21
 
22
22
  private static TLSConfig createTLSConfig(Map<String, String> envVars) {
23
- if (!"true".equals(envVars.get("ENABLE_TLS"))) {
23
+ if (!"true".equals(envVars.get("USE_TLS"))) {
24
24
  return null;
25
25
  }
26
26
 
27
27
  TLSConfig tlsConfig = new TLSConfig();
28
- String keyP12Path = envVars.get("KEY_P12_PATH");
29
- String keyP12Password = envVars.get("KEY_P12_PASSWORD");
28
+ String keyP12Path = envVars.get("CERT_P12_PATH");
29
+ String keyP12Password = envVars.get("CERT_P12_PASSWORD");
30
30
  if (keyP12Path != null && keyP12Password != null) {
31
31
  tlsConfig.keyStore(new P12File(keyP12Path, keyP12Password));
32
32
  }
33
33
 
34
- String trustP12Path = envVars.get("TRUST_P12_PATH");
35
- String trustP12Password = envVars.get("TRUST_P12_PASSWORD");
34
+ String trustP12Path = envVars.get("CA_P12_PATH");
35
+ String trustP12Password = envVars.get("CA_P12_PASSWORD");
36
36
  if (trustP12Path != null && trustP12Password != null) {
37
37
  tlsConfig.trustStore(new P12File(trustP12Path, trustP12Password));
38
38
  }
39
39
 
40
- if ("true".equals(envVars.get("ENABLE_TLS_CLIENT_AUTH"))) {
40
+ if ("true".equals(envVars.get("REQUIRE_TLS_CLIENT_AUTH"))) {
41
41
  tlsConfig.enableClientAuth(true);
42
42
  }
43
43
  return tlsConfig;
@@ -43,33 +43,33 @@ public class RemoteServerExecutor implements ExecutorPlugin {
43
43
  @ConfigDefault("3600")
44
44
  int getTimeoutSeconds();
45
45
 
46
- @Config("tls")
46
+ @Config("use_tls")
47
47
  @ConfigDefault("false")
48
- boolean getTLS();
48
+ boolean getUseTls();
49
49
 
50
- @Config("key_store_p12")
50
+ @Config("cert_p12_file")
51
51
  @ConfigDefault("null")
52
- Optional<P12File> getKeyStoreP12();
52
+ Optional<P12File> getCertP12File();
53
53
 
54
- @Config("trust_store_p12")
54
+ @Config("ca_p12_file")
55
55
  @ConfigDefault("null")
56
- Optional<P12File> getTrustStoreP12();
56
+ Optional<P12File> getCaP12File();
57
57
 
58
58
  @ConfigInject
59
59
  ModelManager getModelManager();
60
60
 
61
61
  // Used for the local mode (mainly for testing)
62
- @Config("__server_key_store_p12")
62
+ @Config("__server_cert_p12_file")
63
63
  @ConfigDefault("null")
64
- Optional<P12File> getServerKeyStoreP12();
64
+ Optional<P12File> getServerCertP12File();
65
65
 
66
- @Config("__server_trust_store_p12")
66
+ @Config("__server_ca_p12_file")
67
67
  @ConfigDefault("null")
68
- Optional<P12File> getServerTrustStoreP12();
68
+ Optional<P12File> getServerCaP12File();
69
69
 
70
- @Config("__server_enable_client_auth")
70
+ @Config("__server_require_tls_client_auth")
71
71
  @ConfigDefault("false")
72
- boolean getServerEnableClientAuth();
72
+ boolean getServerRequireTlsClientAuth();
73
73
  }
74
74
 
75
75
  @Inject
@@ -131,10 +131,10 @@ public class RemoteServerExecutor implements ExecutorPlugin {
131
131
  systemConfigJson, pluginTaskJson, processTaskJson, gemSpecs, pluginArchiveBytes, state, inputTaskCount, modelManager);
132
132
 
133
133
  TLSConfig tlsConfig = null;
134
- if (pluginTask.getTLS()) {
134
+ if (pluginTask.getUseTls()) {
135
135
  tlsConfig = new TLSConfig();
136
- pluginTask.getKeyStoreP12().ifPresent(tlsConfig::keyStore);
137
- pluginTask.getTrustStoreP12().ifPresent(tlsConfig::trustStore);
136
+ pluginTask.getCertP12File().ifPresent(tlsConfig::keyStore);
137
+ pluginTask.getCaP12File().ifPresent(tlsConfig::trustStore);
138
138
  }
139
139
 
140
140
  try (EmbulkClient client = EmbulkClient.open(session, hosts, tlsConfig)) {
@@ -169,11 +169,11 @@ public class RemoteServerExecutor implements ExecutorPlugin {
169
169
 
170
170
  private EmbulkServer startEmbulkServer(PluginTask task) throws IOException {
171
171
  TLSConfig tlsConfig = null;
172
- if (task.getTLS()) {
172
+ if (task.getUseTls()) {
173
173
  tlsConfig = new TLSConfig();
174
- task.getServerKeyStoreP12().ifPresent(tlsConfig::keyStore);
175
- task.getServerTrustStoreP12().ifPresent(tlsConfig::trustStore);
176
- if (task.getServerEnableClientAuth()) {
174
+ task.getServerCertP12File().ifPresent(tlsConfig::keyStore);
175
+ task.getServerCaP12File().ifPresent(tlsConfig::trustStore);
176
+ if (task.getServerRequireTlsClientAuth()) {
177
177
  tlsConfig.enableClientAuth(true);
178
178
  }
179
179
  }
@@ -3,11 +3,11 @@ timeout_seconds: 5
3
3
  hosts:
4
4
  - localhost:30003
5
5
  - localhost:30004
6
- tls: true
7
- key_store_p12:
6
+ use_tls: true
7
+ cert_p12_file:
8
8
  path: tmp/certs/client.p12
9
9
  password: fghij
10
- trust_store_p12:
10
+ ca_p12_file:
11
11
  path: tmp/certs/ca-chain.p12
12
12
  password: p@ssw0rd
13
13
 
@@ -20,12 +20,12 @@ services:
20
20
  <<: *server
21
21
  environment:
22
22
  LOG_LEVEL: debug
23
- ENABLE_TLS: "true"
24
- ENABLE_TLS_CLIENT_AUTH: "true"
25
- KEY_P12_PATH: /certs/embulk-server.local.p12
26
- KEY_P12_PASSWORD: abcde
27
- TRUST_P12_PATH: /certs/ca-chain.p12
28
- TRUST_P12_PASSWORD: p@ssw0rd
23
+ USE_TLS: "true"
24
+ REQUIRE_TLS_CLIENT_AUTH: "true"
25
+ CERT_P12_PATH: /certs/embulk-server.local.p12
26
+ CERT_P12_PASSWORD: abcde
27
+ CA_P12_PATH: /certs/ca-chain.p12
28
+ CA_P12_PASSWORD: p@ssw0rd
29
29
  ports:
30
30
  - "30003:30001"
31
31
  volumes:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-executor-remoteserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi Ishimura
@@ -51,7 +51,7 @@ files:
51
51
  - LICENSE
52
52
  - README.md
53
53
  - build.gradle
54
- - classpath/embulk-executor-remoteserver-0.3.1.jar
54
+ - classpath/embulk-executor-remoteserver-0.3.2.jar
55
55
  - classpath/msgpack-core-0.8.16.jar
56
56
  - classpath/nsocket-0.3.4.jar
57
57
  - classpath/slf4j-api-1.7.26.jar