Closed windsource closed 3 months ago
The project https://github.com/eclipse/kuksa.val also uses gRPC between client and databroker via TLS so maybe we can check that before.
I think we should first evaluate if we really need TLS.
I think we need confidentiality at least for the CLI connecting to the Ankaios server as the CLI might be remote.
Besides using mTLS we could also use TLS + JWT (TLS for encryption + JWT for authentication and authorization). This seems to be simpler plus more flexible.
As agreed, we first need a concept and we can discuss it together to decide how to proceed.
If this issue is implemented, secure communication shall be on by default. If insecure communication shall be used (e.g. during development or evaluation of Ankaios), a parameter like --insecure
needs to be passed or a variable like ANK_INSECURE=true
for the CLI should be set.
As proposed by @christoph-hamm, we can use certificates also for scoping (later if needed) the same way Kubernetes does (via the organization and organizational unit fields).
I looked a bit into what tonic supports. There is an example on how to setup mTLS here: https://github.com/hyperium/tonic/tree/master/examples/src/tls_client_auth and it looks quite straight forward. (I'll also add the link to the description.)
Just a couple of hints:
Also also should check the permissions of the pem and key files read by server and agent and reject starting if the files are readable by group and others.
The PR with the implementation has been reviewed and merged into main.
Description
Currently the communication between server and agent via gRPC is unencrypted. In order to provide authentication and encryption mTLS shall be used.
Goals
Tasks