An open API service indexing awesome lists of open source software.

https://github.com/juanmachuca95/learntls_go

Learn to implement certificates TLS for gRPC Server + gRPC Gateway Server in golang
https://github.com/juanmachuca95/learntls_go

golang grpc tls

Last synced: about 2 months ago
JSON representation

Learn to implement certificates TLS for gRPC Server + gRPC Gateway Server in golang

Awesome Lists containing this project

README

          

## learnTLS_go
Implementación tls para gRPC Server + gRPC Gateway Server. Inspirado en el articulo https://medium.com/@mertkimyonsen/securing-grpc-connection-with-ssl-tls-certificate-using-go-db3852fe89dd

Gen certs
```makefile
make gen-cert
```

Gen stubs
```zsh
buf generate
```

Test with grpcurl - gRPC Server

```zsh
./grpcurl -insecure -d '{"name":"Juan"}' localhost:8080 helloworld.Greete│
r.SayHello
{
"message": "Juan world"
}
```

Test with curl - gRPC Gateway

```zsh
curl -k -X POST https://localhost:8080/v1/example/echo -d '{"name":"juan"}'
# response
{"message":"juan world"}
```