Spring / Spring gRPC Interview Questions
What is mTLS and why is it commonly used for internal gRPC service-to-service communication?
Mutual TLS extends normal TLS so that both parties present and validate certificates, not just the server. This gives two-way authentication (each side proves who it is) plus the usual encryption-in-transit guarantees of TLS.
sequenceDiagram participant C as Client Service participant S as Server Service C->>S: ClientHello S-->>C: ServerHello + server cert C->>S: client cert S-->>C: validate client cert, accept Note over C,S: Encrypted, mutually authenticated channel established
It's popular in microservice/service-mesh environments (often provisioned automatically by a mesh like Istio or Linkerd) because it authenticates services to each other without embedding long-lived, easily-leaked shared tokens in configuration - identity is instead tied to short-lived, rotated certificates managed by the mesh's control plane.
More Related questions...