Bird
0
0

A microservice is failing to authenticate requests from another service using JWT tokens. The tokens are valid but authentication still fails. What is a likely cause?

medium📝 Analysis Q6 of 15
Microservices - Authentication and Authorization
A microservice is failing to authenticate requests from another service using JWT tokens. The tokens are valid but authentication still fails. What is a likely cause?
AThe sending service is using HTTP instead of HTTPS
BThe tokens are missing the user ID claim
CThe receiving service's clock is out of sync causing token expiration validation to fail
DThe tokens are encrypted instead of signed
Step-by-Step Solution
Solution:
  1. Step 1: Consider token validation steps

    JWT validation checks signature and expiration based on system clock.
  2. Step 2: Identify clock sync impact

    If clocks differ, tokens may appear expired or not yet valid, causing failure.
  3. Final Answer:

    The receiving service's clock is out of sync causing token expiration validation to fail -> Option C
  4. Quick Check:

    Clock sync issues cause token validation failure [OK]
Quick Trick: Ensure system clocks are synchronized for JWT validation [OK]
Common Mistakes:
MISTAKES
  • Assuming missing user ID claim causes failure
  • Confusing encryption with signing
  • Thinking HTTP vs HTTPS affects token validity

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes