Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterize PKI certs location #667

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open

Parameterize PKI certs location #667

wants to merge 20 commits into from

Conversation

mansishr
Copy link
Collaborator

@mansishr mansishr commented Dec 27, 2022

For manual PKI exchange, certificates are stored under 'cert' directory inside workspace by default. This PR decouples the location of certificates from workspace in that the user can now specify certificate path to store certs which can reside outside the workspace.

  • For CA, cert_dir can be passed, where all CA certs and keys can reside. To store signing-ca.crt, certificate chain (cert_chain.crt) and signing-ca.key, use cert_pathand key_path to specify locations.
  • For both aggregator and collaborator, use cert_path and key_path to store aggregator (or collaborator) certificate and key, respectively.
  • Introducing fx workspace participants that let's the CA/aggregator select a subset of certified collaborators for a federation by modifying plan/cols.yaml.

@mansishr mansishr changed the title WIP: Parameterize PKI certs location Parameterize PKI certs location Jan 2, 2023
tests/github/test_pki_cert_location.sh Outdated Show resolved Hide resolved
openfl/interface/workspace.py Outdated Show resolved Hide resolved
openfl/interface/workspace.py Outdated Show resolved Hide resolved
openfl/interface/aggregator.py Outdated Show resolved Hide resolved
@@ -36,7 +36,13 @@ def aggregator(context):
default='plan/cols.yaml', type=ClickPath(exists=True))
@option('-s', '--secure', required=False,
help='Enable Intel SGX Enclave', is_flag=True, default=False)
def start_(plan, authorized_cols, secure):
@option('-c', '--cert_path',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we allow user to provide paths to certificates and keys? This way we do not implicitly rely on the user certificate folder to replicate our internal structure. For example, we will not expect aggregator private key be in format {CERT_DIR}/server/agg_{common_name}.key

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to keep the certs structure consistent but we can do that too. It would also involve users to provide a path where certs will be stored {CERT_DIR}/agg_{common_name}.key. @psfoley @itrushkin @aleksandr-mokrov what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not force users to keep our internal PKI folder structure. I think it is better to split this argument and use paths for each file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added separate paths to certs and keys to not rely on internal PKI folder structure.

Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
@psfoley psfoley added this to the v1.6 milestone Jan 13, 2023
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Signed-off-by: Mansi Sharma <mansi.sharma@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants