Mentions légales du service

Skip to content

Certificate creation and registration for MP-SPDZ

MR description

This merge request contains following changes:

  • Refactoring Environ class:

    • Converting Environ class to an abstract singleton class that creates config file and contains common environ variables
    • Creating ResearcherEnviron and NodeEnviron classes that inherits Environ class
  • Adding new command just to create configuration file without being obliged to start node or researcher.

  • Adding functionality to create certificate and port_increment for component when it is created for the first time.

  • CertificateManager:

    • Creating certificates (private key and public key) for MP-SPDZ
    • Registering certificates of other parties in in database
    • Introduces a database for researcher.
  • CommonCLI to generate and register certificates, please see --help for details:

    • Class for common commands that are used for Node and Researcher components.
    • fedbiomed_run node certificate -h
    • fedbiomed_run researcher certificate -h
    • certificate-dev-setup command:
      • fedbiomed-run certificate-dev-setup: Creates dev environment for secure aggregation by registering certificates of each component created in single clone
    • registration-instructions: Print certificate and instructions to share it with other parties for registration.

For testing CLI you can follow the commands bellow:

  1. Clean your environment
  2. fedbiomed_run node config config-n1.ini configuration create -> config file for node 1
  3. fedbiomed_run node config config-n2.ini configuration create -> config file for node 2
  4. fedbiomed_run researcher configuration create -> create configuration file for researcher
  5. Test certificate re-genereation fedbiomed_run researcher certificate generate or for nodes
  6. Test certificate registration please see help -> fedbiomed_run researcher certificate register -h
  7. Test upsert by registering a certificate for the party already registered fedbiomed_run researcher certificate register [all other options] --upsert
  8. Test dev magic to see certificates of each component are registered for every component in the single clone. Command fedbiomed_run certificate-dev-setup

Developer Certificate Of Origin (DCO)

By opening this merge request, you agree the Developer Certificate of Origin (DCO)

This DCO essentially means that:

  • you offer the changes under the same license agreement as the project, and
  • you have the right to do that,
  • you did not steal somebody else’s work.

License

Project code files should begin with these comment lines to help trace their origin:

# This file is originally part of Fed-BioMed
# SPDX-License-Identifier: Apache-2.0

Code files can be reused from another project with a compatible non-contaminating license. They shall retain the original license and copyright mentions. The CREDIT.md file and credit/ directory shall be completed and updated accordingly.

Guidelines for MR review

General:

Specific to some cases:

  • update all conda envs consistently (development and vpn, Linux and MacOS)
  • if modified researcher (eg new attributes in classes) check if breakpoint needs update (breakpoint/load_breakpoint in Experiment(), save_state/load_state in aggregators, strategies, secagg, etc.)
Edited by VESIN Marc

Merge request reports