When would you use mTLS between microservices instead of only a gateway JWT?
PICTURE THIS: A SENTENCE BECOMES TOKENS
The model does not read letters like humans. It reads these pieces, then predicts the next one.
Simple meaning
A gateway JWT proves the user to the first hop
WHY — Auth instead of guessing?
Why interviewers care about Auth:
on Auth.
the situation, the default choice, and one exception - that reads as experience.
Name the idea, why it exists, then one short example.
End with when you use it and one common pitfall.
STEPS — What happens with tokens?
Before the model can read a sentence, it goes through these steps:
- 1A gateway JWT proves
the user to the first hop
- 2east-west traffic can still
be spoofed if the network is flat.
- 3mTLS proves service identity
with certificates so inventory only accepts calls from the order service.
- 4Combine both: user context
in a signed token, service identity in mTLS.
- 5Next token
The model scores what should come next.
- 6Decode
IDs turn back into readable text.
EXAMPLE — See it in action
Let's see how a real sentence is tokenized (tokens may vary by model):
Note: Actual tokens and IDs depend on the tokenizer (e.g., GPT, Llama, etc.).
Key takeaway
A gateway JWT proves the user to the first hop east-west traffic can still be spoofed if the network is flat.