opendut
opendut copied to clipboard
Create GRPC endpoint to retrieve CLEO setup string
A user wants to manage peers in an automated workflow. For this automation she wants to use CLEO and create peers, cluster-configuration and cluster-deployments via commandline. With authentication in place, a client id and secret is required to connect to the backend OpenDuT-CARL. To assist in the setup of a new instance of CLEO a setup string should be provided.
The setup string should contain (analogue to EDGARS peer setup string):
- CLEO ID to identify the instance in the future
- Url to connect to CARL
- Certificate authority required for connecting to CARL
- Authentication config (containing client id, secret, issuer URL for keycloak)
Tasks
Extend peer manager to provide a setup string for CLEO.
- [ ] Create new GRPC service endpoint in
opendut-carl/opendut-carl-api/proto/opendut/carl/services/peer-manager.protorpc GenerateCleoSetup(GenerateCleoSetupRequest) returns (GenerateCleoSetupResponse) {} - [ ] Create CLEO setup string in
opendut-types, e.g. here:opendut-types/proto/opendut/types/peer/peer.proto - [ ] Implement GRPC service endpoint in CARL
Take a look at the peer setup present for EDGAR here:
opendut-carl/src/grpc/peer_manager.rsopendut-carl/src/actions/peers.rs
Hints
- Make sure to add client id with the
OpenIdConnectClientManager. At the moment there is a fallback configuration to send common client credentials to a peer. You may re-use theOpenIdConnectClientManagerto create secrets for CLEO. This will be further enhanced in the future to memorize the keycloak client id and use different secrets for the different clients respectively.