opendut icon indicating copy to clipboard operation
opendut copied to clipboard

Create GRPC endpoint to retrieve CLEO setup string

Open reimarstier opened this issue 1 year ago • 0 comments

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.proto
    rpc 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.rs
    • opendut-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 the OpenIdConnectClientManager to 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.

reimarstier avatar Apr 12 '24 08:04 reimarstier