diff --git a/k8/client/client_deployment.yaml b/k8/client/client_deployment.yaml index 7666ce3..31010d9 100644 --- a/k8/client/client_deployment.yaml +++ b/k8/client/client_deployment.yaml @@ -46,4 +46,4 @@ spec: value: "keystore" - name: PASSWORD - value: 'helloworld' \ No newline at end of file + value: "WeshoulduseSealedSecretsSometime" \ No newline at end of file diff --git a/k8/level_sites/level_site_01_deployment.yaml b/k8/level_sites/level_site_01_deployment.yaml index 4468e73..c743255 100644 --- a/k8/level_sites/level_site_01_deployment.yaml +++ b/k8/level_sites/level_site_01_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_02_deployment.yaml b/k8/level_sites/level_site_02_deployment.yaml index e371512..bb00a38 100644 --- a/k8/level_sites/level_site_02_deployment.yaml +++ b/k8/level_sites/level_site_02_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_03_deployment.yaml b/k8/level_sites/level_site_03_deployment.yaml index 8f6a243..c88682b 100644 --- a/k8/level_sites/level_site_03_deployment.yaml +++ b/k8/level_sites/level_site_03_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_04_deployment.yaml b/k8/level_sites/level_site_04_deployment.yaml index 4befe39..d626557 100644 --- a/k8/level_sites/level_site_04_deployment.yaml +++ b/k8/level_sites/level_site_04_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_05_deployment.yaml b/k8/level_sites/level_site_05_deployment.yaml index 26d9051..cc2feea 100644 --- a/k8/level_sites/level_site_05_deployment.yaml +++ b/k8/level_sites/level_site_05_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_06_deployment.yaml b/k8/level_sites/level_site_06_deployment.yaml index cce66b0..fd0422b 100644 --- a/k8/level_sites/level_site_06_deployment.yaml +++ b/k8/level_sites/level_site_06_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_07_deployment.yaml b/k8/level_sites/level_site_07_deployment.yaml index 44f16ec..c857e81 100644 --- a/k8/level_sites/level_site_07_deployment.yaml +++ b/k8/level_sites/level_site_07_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_08_deployment.yaml b/k8/level_sites/level_site_08_deployment.yaml index 1aa4323..bddff61 100644 --- a/k8/level_sites/level_site_08_deployment.yaml +++ b/k8/level_sites/level_site_08_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_09_deployment.yaml b/k8/level_sites/level_site_09_deployment.yaml index 6cbac3b..a4f4cc9 100644 --- a/k8/level_sites/level_site_09_deployment.yaml +++ b/k8/level_sites/level_site_09_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/level_sites/level_site_10_deployment.yaml b/k8/level_sites/level_site_10_deployment.yaml index 4b69272..bb0f062 100644 --- a/k8/level_sites/level_site_10_deployment.yaml +++ b/k8/level_sites/level_site_10_deployment.yaml @@ -27,8 +27,8 @@ spec: - name: PORT_NUM value: "9000" - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file + - name: KEYSTORE + value: "keystore" + + - name: PASSWORD + value: "WeshoulduseSealedSecretsSometime" diff --git a/k8/server-deploy/server_deployment.yaml b/k8/server-deploy/server_deployment.yaml index f71427c..ce78a59 100644 --- a/k8/server-deploy/server_deployment.yaml +++ b/k8/server-deploy/server_deployment.yaml @@ -43,4 +43,4 @@ spec: value: "keystore" - name: PASSWORD - value: 'helloworld' + value: "WeshoulduseSealedSecretsSometime" diff --git a/src/main/java/weka/finito/level_site_server.java b/src/main/java/weka/finito/level_site_server.java index fd68eab..0bac079 100644 --- a/src/main/java/weka/finito/level_site_server.java +++ b/src/main/java/weka/finito/level_site_server.java @@ -1,15 +1,12 @@ package weka.finito; import weka.finito.structs.level_order_site; - -import javax.crypto.NoSuchPaddingException; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSocket; import java.io.IOException; import java.lang.System; -import java.security.NoSuchAlgorithmException; import static weka.finito.utils.shared.cipher_suites; import static weka.finito.utils.shared.protocols; @@ -21,14 +18,11 @@ public class level_site_server implements Runnable { protected boolean isStopped = false; protected Thread runningThread= null; protected level_order_site level_site_parameters = null; - protected int precision; protected SSLServerSocketFactory factory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); - public static void main(String[] args) throws NoSuchPaddingException, NoSuchAlgorithmException { + public static void main(String[] args) { int our_port = 0; - int our_precision = 0; - String AES_Pass = System.getenv("AES_PASS"); try { our_port = Integer.parseInt(System.getenv("PORT_NUM")); @@ -36,11 +30,7 @@ public static void main(String[] args) throws NoSuchPaddingException, NoSuchAlgo System.out.println("Port is not defined."); System.exit(1); } - if(AES_Pass == null || AES_Pass.isEmpty()) { - System.out.println("AES_PASS is empty."); - System.exit(1); - } - level_site_server server = new level_site_server(our_port, our_precision); + level_site_server server = new level_site_server(our_port); new Thread(server).start(); System.out.println("LEVEL SITE SERVER STARTED!"); while (true) { @@ -53,9 +43,8 @@ public static void main(String[] args) throws NoSuchPaddingException, NoSuchAlgo server.stop(); } - public level_site_server (int port, int precision) { + public level_site_server (int port) { this.serverPort = port; - this.precision = precision; } public void run() { diff --git a/src/main/java/weka/finito/level_site_thread.java b/src/main/java/weka/finito/level_site_thread.java index b2690d4..68426ca 100644 --- a/src/main/java/weka/finito/level_site_thread.java +++ b/src/main/java/weka/finito/level_site_thread.java @@ -72,7 +72,6 @@ private void closeClientConnection() throws IOException { // This will run the communication with client and next level site public final void run() { - int get_previous_index; long start_time = System.nanoTime(); try { diff --git a/src/test/java/PrivacyTest.java b/src/test/java/PrivacyTest.java index ee4811b..28d3793 100644 --- a/src/test/java/PrivacyTest.java +++ b/src/test/java/PrivacyTest.java @@ -133,7 +133,7 @@ public static String test_level_site(String training_data, String features_file, for (int i = 0; i < level_sites.length; i++) { String port_string = level_site_ports_string[i].replaceAll("[^0-9]", ""); level_site_ports[i] = Integer.parseInt(port_string); - level_sites[i] = new level_site_server(level_site_ports[i], precision); + level_sites[i] = new level_site_server(level_site_ports[i]); new Thread(level_sites[i]).start(); }