summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-02-17 23:31:02 +0100
committerMagnus Ahltorp <map@kth.se>2017-02-17 23:31:02 +0100
commit88a9c02a19a9dabc375a40da8c8ed36c44807b65 (patch)
tree61a8c34bd16bf06ef7561f1093a2f0fe68d9634c /tools/compileconfig.py
parent320e7346ab80feb58a75703e2fa79fb31887394d (diff)
Support requirement that storage servers sign stored entries
Make SCT cache mandatory. The signature server now requires signatures from the storage nodes, so if SCT is not present in the cache, always send entries to storage servers to collect signatures. Also send SCT when committing entry to storage servers.
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-xtools/compileconfig.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index fd77b90..9973a95 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -257,8 +257,7 @@ def gen_config(nodename, config, localconfig):
if nodetype & set(["frontendnodes", "mergenodes"]):
catlfishconfig.append((Symbol("known_roots_path"), localconfig["paths"]["knownroots"]))
if "frontendnodes" in nodetype:
- if "sctcaching" in options:
- catlfishconfig.append((Symbol("sctcache_root_path"), paths["db"] + "sctcache/"))
+ plopconfig.append((Symbol("sptcache_root_path"), paths["db"] + "sctcache"))
if "ratelimits" in localconfig:
ratelimits = map(parse_ratelimit, localconfig["ratelimits"].items())
catlfishconfig.append((Symbol("ratelimits"), ratelimits))
@@ -312,6 +311,8 @@ def gen_config(nodename, config, localconfig):
(Symbol("sendsth_verified_path"), paths["db"] + "sendsth-verified"),
(Symbol("entryhash_from_entry"),
(Symbol("catlfish"), Symbol("entryhash_from_entry"))),
+ (Symbol("spt_data"),
+ (Symbol("catlfish"), Symbol("spt_data"))),
]
if "storagenodes" in nodetype:
plopconfig += [
@@ -340,12 +341,14 @@ def gen_config(nodename, config, localconfig):
allowed_clients = []
allowed_servers = []
+ storagenodenames = [node["name"] for node in config["storagenodes"]]
services = set()
+ storage_sign_quorum = config.get("storage-sign-quorum-size", 0)
if "frontendnodes" in nodetype:
- storagenodenames = [node["name"] for node in config["storagenodes"]]
reloadableplopconfig.append((Symbol("storage_nodes"), storagenodeaddresses))
reloadableplopconfig.append((Symbol("storage_nodes_quorum"), config["storage-quorum-size"]))
+ reloadableplopconfig.append((Symbol("storage_sign_quorum"), storage_sign_quorum))
services.add(Symbol("ht"))
allowed_clients += allowed_clients_frontend(mergenodenames, primarymergenodename)
allowed_clients += allowed_clients_public()
@@ -353,6 +356,7 @@ def gen_config(nodename, config, localconfig):
if "storagenodes" in nodetype:
allowed_clients += allowed_clients_storage(frontendnodenames, mergenodenames)
if "signingnodes" in nodetype:
+ reloadableplopconfig.append((Symbol("storage_sign_quorum"), storage_sign_quorum))
allowed_clients += allowed_clients_signing(frontendnodenames, primarymergenodename)
services = [Symbol("sign")]
if "mergenodes" in nodetype:
@@ -409,6 +413,7 @@ def gen_config(nodename, config, localconfig):
reloadableplopconfig += [
(Symbol("allowed_clients"), list(allowed_clients)),
(Symbol("allowed_servers"), list(allowed_servers)),
+ (Symbol("storage_node_names"), list(storagenodenames)),
(Symbol("apikeys"), apikeys),
(Symbol("version"), config["version"]),
]