How can I prevent accidental public exposure of gRPC services when using insecure credentials?
0 reputation · 03 Jul 2020, 21:00 UTC
I am setting up a gRPC service for internal microservice communication and want to guarantee that the service is never reachable from the public internet, even if configuration files are edited incorrectly. I plan to use TLS with mutual authentication, but I am concerned that an accidental insecure port or missing credentials could expose the service unintentionally.
Given the need to support multiple deployment environments (development, staging, production) and the requirement to keep the service private, I am unsure which gRPC configuration options or runtime safeguards can enforce binding only to private network interfaces and disable any plaintext listeners.
What configuration options ensure the service only binds to localhost or private network interfaces? How can I enforce that insecure credentials are disabled at runtime? Are there automated checks or linting rules that can detect accidental public ports before deployment?