Bird
0
0

In a microservice architecture, a developer notices that the JWT token is forwarded but downstream services reject it. What is the most probable bug?

medium📝 Analysis Q7 of 15
Microservices - Authentication and Authorization
In a microservice architecture, a developer notices that the JWT token is forwarded but downstream services reject it. What is the most probable bug?
AThe token is forwarded without the 'Bearer' prefix in the Authorization header
BThe token is forwarded in the Cookie header instead of Authorization
CThe token is forwarded as a query parameter
DThe token is forwarded with extra spaces around it
Step-by-Step Solution
Solution:
  1. Step 1: Understand token format requirements

    Downstream services expect the Authorization header to start with 'Bearer ' followed by the token.
  2. Step 2: Identify why missing 'Bearer' causes rejection

    Without 'Bearer', the token format is invalid and services reject it.
  3. Final Answer:

    The token is forwarded without the 'Bearer' prefix in the Authorization header -> Option A
  4. Quick Check:

    Missing 'Bearer' prefix causes token rejection [OK]
Quick Trick: Include 'Bearer' prefix in Authorization header [OK]
Common Mistakes:
MISTAKES
  • Forwarding token in wrong header
  • Using query parameters for token
  • Adding extra spaces around token

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes