gRPC Security Walkthrough 10 quick steps: wire to watchtower 0 · Start Encrypt the wire Client Server man-in-the-middle TLS 1.2+ · strong ciphers No TLS, no production 1 · TLS Both sides show ID Service A Service B verify each other certs ≤ 90 days, auto-rotate Service-to-service = zero trust 2 · mTLS Check identity on every call Client Server Unary interceptor Stream interceptor Streams need their own gate 3 · AuthN Right role, right method Admin DeleteUser User GetUser Guest DeleteUser Least privilege · log every denial 4 · AuthZ Never trust the message Request Validate Prepared SQL injection Allowlists · server-side · prepared statements 5 · Validate Cap the stream, not just the message Client Server 4 MiB / msg max msgs / stream max duration A per-message cap doesn't cap the stream 6 · Limits Slow the flood 10 req/s per client Server ResourceExhausted 5 s timeout 7 · Rate limit Generic out, detail in Server Client invalid request user · reason · trace-id generic full detail Never log tokens or passwords 8 · Errors Hide the map in production DEV reflection on PROD reflection off Don't hand attackers a free API catalogue 9 · Reflection Watch it. Poke it. Monitor auth failures alerts Test grpcurl TLS auth input Run it in CI, not just once 10 · Monitor & test Recap: defense in depth TLS mTLS AuthN AuthZ Validate Size caps Rate limit Safe errors No reflection Monitor 11 · Recap
← Previous
Next scene →
▶ Auto-play
Use Previous / Next (or the arrow keys) to step through all 12 panels, or Auto-play for a hands-free presentation. The original Excalidraw SVG artwork is embedded in this page.