grpc-go/examples/features/advancedtls
Nathan Baulch 3b626a7b52
*: fix more typos (#7619)
2024-09-16 10:58:27 -07:00
..
client *: fix more typos (#7619) 2024-09-16 10:58:27 -07:00
creds *: fix more typos (#7619) 2024-09-16 10:58:27 -07:00
server .*: fix lint issues of not having comments for exported funcs and vars along with any remaining issues and enable remaining disabled rules (#7575) 2024-09-16 09:09:49 +05:30
README.md vet: add check for trailing spaces (#7576) 2024-09-12 11:40:38 +05:30
generate.sh examples/advancedtls: example code for different security configurations for grpc-go using `advancedtls` (#7474) 2024-08-26 17:30:18 -07:00
localhost-openssl.cnf examples/advancedtls: example code for different security configurations for grpc-go using `advancedtls` (#7474) 2024-08-26 17:30:18 -07:00
openssl-ca.cnf *: fix more typos (#7619) 2024-09-16 10:58:27 -07:00

README.md

gRPC Advanced Security Examples

This repo contains example code for different security configurations for grpc-go using advancedtls.

The servers run a basic echo server with the following setups:

  • Port 8885: A server with a good certificate using certificate providers and crl providers.
  • Port 8884: A server with a revoked certificate using certificate providers and crl providers.
  • Port 8883: A server running using InsecureCredentials.

The clients are designed to call these servers with varying configurations of credentials and revocation configurations.

  • mTLS with certificate providers and CRLs
  • mTLS with custom verification
  • mTLS with credentials from credentials.NewTLS (directly using the tls.Config)
  • Insecure Credentials

Building and Running

# Run the server
$ go run server/main.go -credentials_directory $(pwd)/creds
# Run the clients from the `grpc-go/examples/features/advancedtls` directory
$ go run client/main.go -credentials_directory $(pwd)/creds

Stop the servers with ctrl-c or by killing the process.

Developer Note - Generate the credentials used in the examples

The credentials used for these examples were generated by running the examples/features/advancedtls/generate.sh script.

If the credentials need to be re-generated, run ./generate.sh from /path/to/grpc-go/examples/features/advancedtls to re-create the creds directory containing the certificates and CRLs needed for these examples.