@@ -135,9 +135,15 @@ def parse(plan_config_path: Path, cols_config_path: Path = None,
135135 gandlf_config ['output_dir' ] = gandlf_config .get ('output_dir' , '.' )
136136 plan .config ['task_runner' ]['settings' ]['gandlf_config' ] = gandlf_config
137137
138- plan . authorized_cols = Plan .load (cols_config_path ).get (
138+ cols_info = Plan .load (cols_config_path ).get (
139139 'collaborators' , []
140140 )
141+ if isinstance (cols_info , list ):
142+ plan .cn_mapping = {col : col for col in cols_info }
143+ plan .authorized_cols = cols_info
144+ else :
145+ plan .cn_mapping = cols_info
146+ plan .authorized_cols = list (cols_info .keys ())
141147
142148 # TODO: Does this need to be a YAML file? Probably want to use key
143149 # value as the plan hash
@@ -223,6 +229,7 @@ def __init__(self):
223229 """Initialize."""
224230 self .config = {} # dictionary containing patched plan definition
225231 self .authorized_cols = [] # authorized collaborator list
232+ self .cn_mapping = {} # expected cert common name for each collaborator
226233 self .cols_data_paths = {} # collaborator data paths dict
227234
228235 self .collaborator_ = None # collaborator object
@@ -338,6 +345,7 @@ def get_aggregator(self, tensor_dict=None):
338345 defaults [SETTINGS ]['aggregator_uuid' ] = self .aggregator_uuid
339346 defaults [SETTINGS ]['federation_uuid' ] = self .federation_uuid
340347 defaults [SETTINGS ]['authorized_cols' ] = self .authorized_cols
348+ defaults [SETTINGS ]['cn_mapping' ] = self .cn_mapping
341349 defaults [SETTINGS ]['assigner' ] = self .get_assigner ()
342350 defaults [SETTINGS ]['compression_pipeline' ] = self .get_tensor_pipe ()
343351 defaults [SETTINGS ]['straggler_handling_policy' ] = self .get_straggler_handling_policy ()
0 commit comments