Design: JWT Token Propagation in Microservices
Design focuses on token propagation and verification across microservices. User authentication service and token issuance are in scope. Token refresh and revocation mechanisms are included. Out of scope are UI design and detailed cryptographic algorithms.
Functional Requirements
FR1: Authenticate users once and propagate their identity securely across multiple microservices.
FR2: Each microservice must verify the JWT token to authorize requests.
FR3: Support token expiration and refresh mechanisms.
FR4: Ensure minimal latency added by token verification.
FR5: Allow token revocation or blacklisting for security.
FR6: Support scalability to handle 10,000 concurrent user requests.
Non-Functional Requirements
NFR1: API response latency p99 should be under 200ms including token verification.
NFR2: System availability target is 99.9% uptime.
NFR3: Tokens must be securely transmitted and stored to prevent leaks.
NFR4: Microservices communicate over REST or gRPC.
NFR5: No centralized session storage to maintain statelessness.