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
- Host: GitHub
- URL: https://github.com/juanmachuca95/learntls_go
- Owner: juanmachuca95
- Created: 2022-08-21T17:51:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T17:57:40.000Z (almost 4 years ago)
- Last Synced: 2025-06-23T21:45:28.468Z (12 months ago)
- Topics: golang, grpc, tls
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"}
```