gRPC Security

A guided, one-scene-at-a-time walkthrough

01 / 12

gRPC Security Walkthrough10 quick steps: wire to watchtower0 · StartEncrypt the wireClientServerman-in-the-middleTLS 1.2+ · strong ciphersNo TLS, no production1 · TLSBoth sides show IDService AService Bverify each othercerts ≤ 90 days, auto-rotateService-to-service = zero trust2 · mTLSCheck identity on every callClientServerUnaryinterceptorStreaminterceptorStreams need their own gate3 · AuthNRight role, right methodAdminDeleteUserUserGetUserGuestDeleteUserLeast privilege · log every denial4 · AuthZNever trust the messageRequestValidatePrepared SQLinjectionAllowlists · server-side · prepared statements5 · ValidateCap the stream, not just the messageClientServer4 MiB / msgmax msgs / streammax durationA per-message cap doesn't cap the stream6 · LimitsSlow the flood10 req/s per clientServerResourceExhausted5 s timeout7 · Rate limitGeneric out, detail inServerClientinvalid requestuser · reason · trace-idgenericfull detailNever log tokens or passwords8 · ErrorsHide the map in productionDEVreflection onPRODreflection offDon't hand attackers a free API catalogue9 · ReflectionWatch it. Poke it.Monitorauth failuresalertsTestgrpcurlTLSauthinputRun it in CI, not just once10 · Monitor & testRecap: defense in depthTLSmTLSAuthNAuthZValidateSize capsRate limitSafe errorsNo reflectionMonitor11 · Recap

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.