project-oak / oak

Meaningful control of data in distributed systems.
Apache License 2.0
1.32k stars 113 forks source link

Implement gRPC client pseudo-node in Rust runtime #844

Closed tiziano88 closed 4 years ago

tiziano88 commented 4 years ago

Similar to the existing C++ implementation: https://github.com/project-oak/oak/blob/2f257f2b32286bef1615c44bceb3a413346c5919/oak/server/grpc_client_node.h .

@ipetr0v have you looked into this already by any chance, as part of the gRPC server pseudo-node work?

ipetr0v commented 4 years ago

I haven't looked much into this yet, but I think we will be able to use tonic::client

ipetr0v commented 4 years ago

Since tonic uses rustls (that doesn't support checking certificates using IP addresses yet: https://github.com/ctz/rustls/issues/184), we will always need to have a domain name defined for an external gRPC service: https://github.com/hyperium/tonic/blob/f6ecaff0de76de16cb1f680dc3473c8cf2bbaddd/examples/src/tls/client.rs#L13-L15

ipetr0v commented 4 years ago

Also, do we need to authenticate a gRPC client Node to for an external gRPC service? Probably can be a separate PR (if we need this feature).