Software Design

API Gateway JWT Validation and Routing

UML Sequence Diagrams · made in Skemio

Sequence diagram showing API Gateway validating a JWT token with cached JWKS keys, extracting claims, and forwarding request with X-User-Id header to internal service.
Sequence diagram showing API Gateway validating a JWT token with cached JWKS keys, extracting claims, and forwarding request with X-User-Id header to internal service.

What it shows

  • Gateway cryptographically validates JWT signatures using cached JWKS keys
  • Invalid or expired tokens fail fast at the boundary with an HTTP 401 status
  • Gateway injects user identity into sanitized downstream internal headers

The takeaway

Authenticate at the perimeter, pass sanitized identity headers to private services.

More uml sequence diagrams