JOSE: signed and encrypted tokens
JSON Web Tokens taken apart: compact serialization, registered claims, signing algorithms, key sets and key IDs, and encryption with JWE.
Start with Inside a JWT: JWS and compact serialization
- Inside a JWT: JWS and compact serializationTake a real compact JWT apart: base64url without padding, the header parameters, the registered claims and NumericDate, the signing input, and why decoding is not validating.
- Choosing and enforcing algorithmsWhy the receiver, not the token, chooses the algorithm: the HS256, RS256, PS256, ES256 and EdDSA families, the none algorithm and algorithm confusion, allowlists, and changing algorithms safely.
- JWKs, key sets, and key IDsRead a JWK and its members, pick a key within a trusted set by kid or thumbprint, recognize the jwk, jku, x5u and x5c header traps, and understand bounded cache refresh and rollover.
- Encrypting tokens with JWEAuthenticated and hybrid encryption, the five parts of a compact JWE, key-management versus content algorithms, protected-header integrity, algorithm choices, and why decryption is not identity.