Skip to content

Commit 43bfefe

Browse files
committed
SAE progress
1 parent 4feb7b3 commit 43bfefe

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

common/configuration.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,17 @@ def parse_configuration_file(filename: str = DEFAULT_CONFIGURATION_FILE):
5454
"name": {"type": "string"},
5555
},
5656
}
57+
encryptor_schema = {
58+
"type": "dict",
59+
"schema": {
60+
"name": {"type": "string"},
61+
},
62+
}
5763
client_schema = {
5864
"type": "dict",
5965
"schema": {
6066
"name": {"type": "string"},
67+
"encryptors": {"type": "list", "schema": encryptor_schema},
6168
},
6269
}
6370
schema = {

manager.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ def find_kme_node_for_sae(self, sae_id: str) -> Node:
317317
"""
318318
Given an SAE ID, find the KME node that is associated with it.
319319
"""
320-
# For now we make the simplifying assumption that there is only one SAE (encryptor) attached
321-
# to each KME (client), and that the SAE has the same name as the KME. This makes the code
322-
# simpler, since the KMEs don't need to keep track of which SAEs are attached to them.
320+
# $$$
323321
for node in self._nodes:
324322
if node.type == NodeType.CLIENT and node.name == sae_id:
325323
return node

topology.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ hubs:
66
- name: hugo
77
clients:
88
- name: carol
9+
encryptors:
10+
- name: sam
911
- name: celia
12+
encryptors:
13+
- name: serena
1014
- name: cindy
15+
encryptors:
16+
- name: sia
1117
- name: connie
18+
encryptors:
19+
- name: sofia
1220
- name: curtis
21+
encryptors:
22+
- name: sunny
23+
- name: susan

0 commit comments

Comments
 (0)