A microservice fails to verify JWT tokens from upstream services. Which of these is the most likely cause?
medium📝 Analysis Q14 of 15
Microservices - Authentication and Authorization
A microservice fails to verify JWT tokens from upstream services. Which of these is the most likely cause?
AThe microservice does not forward the Authorization header
BThe microservice uses a different secret or public key to verify tokens
CThe microservice sends tokens in the request body instead of headers
DThe microservice caches tokens for too long
Step-by-Step Solution
Solution:
Step 1: Analyze verification failure causes
Verification fails if the microservice uses a wrong secret or public key to check the JWT signature.
Step 2: Evaluate other options
Not forwarding headers causes downstream issues, sending tokens in body is non-standard but not verification failure, caching affects freshness but not signature verification.
Final Answer:
The microservice uses a different secret or public key to verify tokens -> Option B