borud / tiny

Tiny example of using gRPC with mutual TLS

Repository from Github https://github.comborud/tinyRepository from Github https://github.comborud/tiny

Tiny gRPC client certificate authentication example

This is a small example of how to use mutal TLS with gRPC. It includes an example of a unary interceptor so that you can whitelist methods that do not require a valid client certificate.

This is example code so it does not include tests, has hard-coded values all over the place and includes the generated gRPC code.

Building

This project uses make for building. To ensure you have the required build dependencies installed you can perform a

make install-deps

before you execute

build

Binaries will be put in the bin subdirectory.

Running

Before you run the server you have to generate the CA, server and client keys. You can do this by running

bin/genkeys

Then you can start the server

bin/server

and then run the client

bin/client

About

Tiny example of using gRPC with mutual TLS


Languages

Language:Go 94.2%Language:Makefile 5.8%