From da5df3957ba41d28256ab8183aae0dd3b6e0dcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sun, 12 Jan 2020 21:05:28 +0100 Subject: Add query signer architecture --- build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index d7909f7..c557cad 100644 --- a/build.gradle +++ b/build.gradle @@ -46,6 +46,10 @@ ext.UDUPServerBufsize = { return System.getProperty("bufsize") ?: 512; } +ext.querySignerHostname = { + return System.getProperty("querySignerHostname") ?: "localhost" +} + /* Possible options: RoundRobinExp @@ -110,6 +114,7 @@ task runAgent(type: JavaExec) { systemProperty 'UDUPServer.bufsize', UDUPServerBufsize() systemProperty 'Gossip.zone_strategy', zoneSelectionStrategy() systemProperty 'zone_path', zonePath() + systemProperty 'query_signer_hostname', querySignerHostname() } task runClient(type: JavaExec) { @@ -117,6 +122,7 @@ task runClient(type: JavaExec) { main = 'pl.edu.mimuw.cloudatlas.client.Client' systemProperty 'agent_hostname', hostname() systemProperty 'zone_path', zonePath() + systemProperty 'query_signer_hostname', querySignerHostname() } task runFetcher(type: JavaExec) { @@ -131,3 +137,9 @@ task runInterpreter(type: JavaExec) { main = 'pl.edu.mimuw.cloudatlas.interpreter.Main' standardInput = System.in } + +task runQuerySigner(type: JavaExec) { + classpath = sourceSets.main.runtimeClasspath + main = 'pl.edu.mimuw.cloudatlas.querysigner.QuerySigner' + systemProperty 'query_signer_hostname', querySignerHostname() +} -- cgit v1.2.3 From 81d1abbbad1f1e9c7774c7162b23fc804f7989a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Mon, 13 Jan 2020 20:56:01 +0100 Subject: Add reading keys from file --- build.gradle | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index c557cad..27279d4 100644 --- a/build.gradle +++ b/build.gradle @@ -65,6 +65,14 @@ ext.zonePath = { return System.getProperty("zonePath") ?: "/uw/violet07" } +ext.publicKeyFilename = { + return System.getProperty("publicKeyFilename") ?: "build/tmp/query_signer.pub" +} + +ext.privateKeyFilename = { + return System.getProperty("privateKeyFilename") ?: "build/tmp/query_signer" +} + repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. @@ -114,7 +122,7 @@ task runAgent(type: JavaExec) { systemProperty 'UDUPServer.bufsize', UDUPServerBufsize() systemProperty 'Gossip.zone_strategy', zoneSelectionStrategy() systemProperty 'zone_path', zonePath() - systemProperty 'query_signer_hostname', querySignerHostname() + systemProperty 'public_key_file', publicKeyFilename() } task runClient(type: JavaExec) { @@ -142,4 +150,12 @@ task runQuerySigner(type: JavaExec) { classpath = sourceSets.main.runtimeClasspath main = 'pl.edu.mimuw.cloudatlas.querysigner.QuerySigner' systemProperty 'query_signer_hostname', querySignerHostname() + systemProperty 'public_key_file', publicKeyFilename() + systemProperty 'private_key_file', privateKeyFilename() +} + +task runKeyGenerator(type: JavaExec) { + classpath = sourceSets.main.runtimeClasspath + main = 'pl.edu.mimuw.cloudatlas.KeyGenerator' + systemProperty 'query_signer_hostname', querySignerHostname() } -- cgit v1.2.3 From 8103eb7e174c7c0bb33316ae9499bbc0fbb62ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Mon, 13 Jan 2020 21:54:45 +0100 Subject: Fix key generation and reading --- build.gradle | 6 ------ 1 file changed, 6 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 27279d4..c6ebcae 100644 --- a/build.gradle +++ b/build.gradle @@ -153,9 +153,3 @@ task runQuerySigner(type: JavaExec) { systemProperty 'public_key_file', publicKeyFilename() systemProperty 'private_key_file', privateKeyFilename() } - -task runKeyGenerator(type: JavaExec) { - classpath = sourceSets.main.runtimeClasspath - main = 'pl.edu.mimuw.cloudatlas.KeyGenerator' - systemProperty 'query_signer_hostname', querySignerHostname() -} -- cgit v1.2.3