A pointed security question is trending in developer circles tonight, and it compresses one of the most common API vulnerabilities into a single sentence.
The sentence works because it names a category error. A token is a statement, not an authority - and treating statements as authorities is where systems break.
What a token actually is
A JSON Web Token is three segments: a header describing the algorithm, a payload of claims, and a signature over both. Anyone can read the payload; only the signer can produce a valid signature.
The claims are assertions, not commands. The server’s job is deciding what each assertion is worth - which is policy, and policy lives on the server.
The classic failure modes
Token trust goes wrong in documented, repeated ways: accepting unsigned tokens, skipping algorithm checks, ignoring expiry, and treating role strings as self-validating.
| Failure | What happens | The defense |
|---|---|---|
| Algorithm confusion | Attacker picks a weak algorithm | Pin algorithms server-side |
| No signature check | Forged payloads accepted | Verify before parsing claims |
| Ignored expiry | Old tokens work forever | Enforce time claims strictly |
| Claims as permissions | Anyone declares admin | Authorize against server policy |
The design principle underneath
The healthy architecture separates authentication from authorization: the token proves identity claims; your policy engine decides what those identities may do.
- Tokens authenticate; policy authorizes.
- Scopes describe intent, servers enforce it.
- Roles live in your system, not in the token’s word alone.
- Verification is code, never an assumption.
That separation is why the trending question has a clean answer: believe the signature, decide the meaning - and never confuse the two.
Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.
The bigger picture
Token standards succeeded because they are simple and portable, and their failure modes persist because simplicity invites shortcut implementations.
So tonight’s trending question is worth internalizing beyond tokens: any system that delegates trust needs a boundary where verification is mandatory and meaning is assigned.
The bottom line: JWTs are signed claims; signatures prove origin, not permission. Verify signature, algorithm, expiry and issuer before trusting claims. Authentication and authorization are separate responsibilities. Policy lives on the server, never inside the token’s word.
Key takeaways
- JWTs are signed claims; signatures prove origin, not permission.
- Verify signature, algorithm, expiry and issuer before trusting claims.
- Authentication and authorization are separate responsibilities.
- Policy lives on the server, never inside the token’s word.
Quick answers
Can a client forge an admin token?
Not with a valid signature check in place - forging requires the signing key. Failures happen when the check is skipped or bypassed via algorithm tricks.
Should I put roles inside the token?
Role names are fine as claims, but enforcement must happen server-side against policy - the claim describes, the server decides.
What is algorithm confusion?
An attack where the token header names a different algorithm than expected - exploited when servers trust the header. Pinning algorithms server-side prevents it.
One thing to do tonight
Tonight, audit one API you maintain: trace the exact path from token arrival to permission decision. If any step is implicit, write it down - that step is your risk.