Skip to content

Archive

JWT

9 articles
Cybersecurity 20 Sep 2026 6 min read

JWT Audience Checks Keep Tokens Inside Their Intended Service Boundary

JWT Audience Checks Keep Tokens Inside Their Intended Service Boundary A valid JSON Web Token signature proves a narrow fact: the token bytes were signed with a key accepted by the verifier and were not modified afterward without invalidating that signature. That result does not establish that the token was issued for the service currently receiving it. This distinction matters in systems where one authority issues tokens for several APIs, or where multiple authorities use keys that an application can reach through configuration. A token can be cryptographically valid yet belong to a different security context. The iss and aud claims give the verifier inputs for enforcing that boundary.

Cybersecurity 19 Sep 2026 7 min read

JWS Key Selection Is a Trust Decision, Not a Header Instruction

JWS Key Selection Is a Trust Decision, Not a Header Instruction A signed token can carry enough metadata to point a verifier toward a key. A JWS protected header can name an algorithm with alg, identify a key with kid, or, in profiles that permit them, carry or reference key material through parameters such as jwk, jku, x5c, or x5u. Those fields are useful for routing verification work, especially during key rotation.

Cybersecurity 15 Sep 2026 8 min read

JWKS Rotation Makes Cache Lifetime Part of Token Verification

A service receives a valid JWT seconds after its issuer rotates signing keys. The token carries a new kid, but the verifier still has the previous JWK Set in cache. Signature verification cannot even begin with the correct public key until the verifier obtains a set containing that identifier. This is a routine rollover condition, not a cryptographic break. Yet it exposes an important boundary in distributed token validation: a verifier that obtains public keys remotely depends on cache behavior and key publication timing alongside the signature algorithm itself.

Cybersecurity 13 Sep 2026 8 min read

JWT Verification Must Bind Algorithm, Key, and Issuer

JWT Verification Must Bind Algorithm, Key, and Issuer A signed token can be cryptographically valid and still be unacceptable to the service receiving it. The signature answers a narrow question: the token bytes match a signature produced with a particular cryptographic key under a particular algorithm. Authorization depends on a larger set of facts, including who controls that key, which issuer is trusted, which audience the token targets, and which algorithms the application intended to accept.

Cybersecurity 13 Sep 2026 7 min read

JWT Verification Fails at the Algorithm Boundary

A JSON Web Token can carry a perfectly valid signature and still be unacceptable to the service receiving it. That distinction is easy to lose in systems where token verification is reduced to a library call that returns a boolean or a decoded claims object. JWT signatures establish a narrow fact: given a particular algorithm and key, the protected token bytes authenticate successfully. Authorization requires more. The verifier also has to decide which algorithms are permitted, which keys belong to the expected authority, which issuer produced the token, which service the token targets, whether its time constraints hold, and whether this class of token is valid for the operation at hand.

Cybersecurity 12 Sep 2026 6 min read

Pin JWT Verification Algorithms

A JSON Web Token can carry an alg header that names a signing algorithm. That field describes the token, but it must not control the verifier’s security policy. An attacker can edit untrusted token bytes before verification, including header fields. The safe model is: the application chooses acceptable algorithms and keys from trusted configuration, then checks whether the token fits that policy. Put policy outside the token Suppose an API expects tokens signed with RS256. Its verifier should be configured for RS256 and the issuer’s trusted public key. It should not inspect alg and dynamically choose any cryptographic routine the token requests.

Cybersecurity 12 Sep 2026 6 min read

JWT Verification Is a Policy Decision Before It Is a Crypto Check

JWT Verification Is a Policy Decision Before It Is a Crypto Check A JWT can carry a valid signature and still be unacceptable to the service receiving it. The signature proves only that the token matches a cryptographic key under a particular algorithm. It does not establish that the key belongs to an issuer the service trusts, that the algorithm is permitted for this token class, or that the claims authorize use at this endpoint.

Cybersecurity 11 Sep 2026 8 min read

Pin JWT Verification to Approved Algorithms

A JSON Web Token can carry identity and authorization claims across service boundaries. Its compact format also carries a header that describes cryptographic processing, including an alg field. That field comes from the token itself. It is attacker-controlled input until verification succeeds. A verifier therefore must not treat alg as permission to select any cryptographic mode a library happens to support. The application must decide which algorithm, key type, issuer, audience, and other verification rules are acceptable. The token may identify a candidate within that fixed policy, but it must not define the policy.

Cybersecurity 10 Sep 2026 10 min read

Validate JWTs for the Context That Will Use Them

A service receives a JSON Web Token, verifies its signature successfully, reads the user identifier, and accepts the request. That sounds reasonable, but one question is still unanswered: was this token issued for this service and this purpose? A valid signature proves something narrow. Under the expected cryptographic scheme and key, it shows that the protected token content has not been changed since it was signed by whoever controls that signing key. It does not by itself prove that your API is an intended recipient, that the token is still within its accepted lifetime, or that a token created for one workflow should be accepted by another.