Marlin Pierce
Marlin Pierce

Reputation: 10081

grpc server ruby with TLS/SSL

I am trying to implement a secure gRPC TLS connection between a ruby client and a ruby server. I am unable to figure out how to configure the server to use the secure connection.

In production, our server is implemented in Go. However, we have been unable to connect to it from ruby by anything other than an insecure connection. I have been tasked with creating a reference TLS connection to show a secure connection from a ruby client will work.

I have the grpc quickstart example greeter working for ruby as an insecure connection.

In the gRPC authentication documentation the Go example replaces this

s := grpc.NewServer()

with this

creds, _ := credentials.NewServerTLSFromFile(certFile, keyFile)
s := grpc.NewServer(grpc.Creds(creds))

for ruby there is this in the quickstart greeter app

s = GRPC::RpcServer.new

but I have been unable to find how to create a secure server.

The requirements include that we must have the server validate the client's public key as trusted in order to allow access to the server. (The client will also need to trust the server's public key to validate the server.)

Upvotes: 0

Views: 599

Answers (1)

DazWilkin
DazWilkin

Reputation: 40051

I've not used Ruby w/ gRPC but am familiar with the Golang SDK.

See here for what appears to be a Ruby gRPC server w/ TLS:

https://developers.google.com/maps-booking/legacy/booking-server-code-samples/gRPC-v0-legacy/partner-api-ruby

Upvotes: 1

Related Questions