Securing connections
Up until now, we have not made our connections secure – we used insecure credentials. In gRPC, we can use TLS, mTLS, and ATLS connections. The first uses a one-way authentication where the client can verify the server’s identity. The second one is a two-way communication where the server verifies the client’s identity and the client verifies the server’s. And finally, ATLS is similar to TLS but designed and optimized for Google’s use.
mTLS and ATLS are worth exploring if you are working on smaller-scale communication or working with Google Cloud, respectively. If you are interested in mTLS, you should check the mTLS folder in the grpc-go
GitHub repository: https://github.com/grpc/grpc-go/tree/master/examples/features/encryption/mTLS. And if you want to use ATLS, check out this link: https://grpc.io/docs/languages/go/alts/. However, in our case, we are going to see the most frequently used form of encryption, which is TLS.