-
Notifications
You must be signed in to change notification settings - Fork 36
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
Refactor/SK-936 | Clean up certs and remove /add_combiner logic #653
Conversation
Note to self: not good that mongo client starts on import from shared.py |
I guess you need to obtain an admin token to post to /add_combiner? |
In what scenario? This is something the user can configure. JWT tokens are not enabled by default. |
I was thinking about Studio - it seems like adding a combiner should be the project admin / API token privilege? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
This PR cleans up the old cert managment of sending certs via REST from controller to combiner and clients. Certs for gRPC clients can now fully be controlled via environment variables FEDN_GRPC_CERT_PATH which will be read and included as ssl credential in gRPC channels. To control different certs for mutiple combiners one can use FEDN_GRPC_CERT_PATH_"COMBINER NAME" where COMBINER NAME is as stored in the statestore.
Certs (and the private key) is no longer stored in the statestore (risky), and is not sent over http(s). The server (combiner) can setup certs via "cert_path" and "key_path" which can be provided in the config file. Obs that this is only for gRPC and not REST.
The logic for adding a combiner to the network has changed. Previously, the combiner had to post to the endpoint /add_combiner of the REST API which then returns statestore and modelstore configs (inluding password/access secrets, which is very risky) and added the combiner to statestore. This logic has been removed and instead the combiner requires configs (file) from admin at server start, the combiner will then directly communicate with the statestore server to add the combiner. The combiner in the state does no longer store the certs. However, storage(model) configs is still stored in the statestore (inluding password). This should be removed in a future PR.
Additional: