Bird
0
0

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:
  1. Step 1: Analyze verification failure causes

    Verification fails if the microservice uses a wrong secret or public key to check the JWT signature.
  2. 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.
  3. Final Answer:

    The microservice uses a different secret or public key to verify tokens -> Option B
  4. Quick Check:

    Wrong key = verification fails [OK]
Quick Trick: Verification needs matching secret/public key [OK]
Common Mistakes:
MISTAKES
  • Confusing forwarding issues with verification errors
  • Assuming token location affects signature verification
  • Ignoring key mismatch as cause of failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes