title: grpc server ruby with TLS/SSL
body: <p>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.</p>
  <p>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.</p>
  <p>I have the grpc quickstart example greeter working for ruby as an insecure connection.</p>
  <p>In the <a href="https://grpc.io/docs/guides/auth/" rel="nofollow noreferrer">gRPC authentication documentation</a> the Go example replaces this</p>
  <pre><code>s := grpc.NewServer()
  </code></pre>
  <p>with this</p>
  <pre><code>creds, _ := credentials.NewServerTLSFromFile(certFile, keyFile)
  s := grpc.NewServer(grpc.Creds(creds))
  </code></pre>
  <p>for ruby there is this in the quickstart greeter app</p>
  <pre><code>s = GRPC::RpcServer.new
  </code></pre>
  <p>but I have been unable to find how to create a secure server.</p>
  <p>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.)</p>