-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: securing gRPC HTTP connections #20
Comments
After further research, The XHR replacement transport for react-native doesn't implement streams yet: https://github.com/connectrpc/examples-es/blob/main/react-native/custom-transport.ts Also, |
Using the Berty's handshake protocol for gRPC authentication checks all the boxes:
|
To secure the React Native gRPC connection, we implement a transport that uses native calls to make the gRPC calls instead of a TCP connection. Only the server streaming is implemented in this PR (we don't need the client streaming). Flow: React-Native gRPC client <-> native (Android/iOS) <-> golang gRPC client (UDS) <-> golang gRPC server fixes #20 --------- Signed-off-by: D4ryl00 <[email protected]>
We want to provide a gRPC client to React-Native to communicate with the Gnomobile service, which implements the gRPC server.
We have two choices:
bridge
, which converts stream calls to unary calls so we will be able to pass them in the native and Go parts. It looks like Berty does with theBridge Service Client
: berty bridge.This works fine but in a hacky way for mobile. In the future, we want to port the React-Native client to the desktop, so without native parts (Java, Swift), which will add some additional work to make it compatible.
A solution is to determine if we can create a new transport that allows us to perform native binding still using that gRPC web client.
Because number 2 is a cleaner and future-proof way, we could implement a secure authentication to our Go gRPC server to enable us to use standard gRPC clients through HTTP connections, without the need of creating hacky transports for the clients.
The text was updated successfully, but these errors were encountered: