CYBER LIBRARY
Explore the bootcamp
Security essentialsIntermediate

JWT expiration and revocation

JWT revocation addresses how a service stops accepting a token before its nominal expiration.

3 min readUpdated 12 Oct 20263 connections
Markdown

What it means

JWT revocation addresses how a service stops accepting a token before its nominal expiration. Self-contained tokens do not automatically consult server-side session state. Designs may combine short-lived access tokens, controlled refresh tokens, deny lists, or introspection depending on the required response to compromise.

A practical example

After an account takeover, a service invalidates refresh capability and applies its token revocation strategy. It also considers existing access tokens and active connections, because changing the password alone may not stop every already-issued credential.

What to check

Document token lifetimes, refresh behavior, revocation propagation, and failure handling. Test logout, role removal, compromised signing keys, and concurrent sessions across all consuming services.

A common pitfall

A logout button that only deletes the browser's copy does not invalidate copies held elsewhere. Token revocation requires a receiver-visible policy or expiration mechanism.

Think it through

Why test a captured token after logout in a controlled test?

Answer: It reveals whether receivers actually reject the token or the interface merely removed its local copy.

Stateless validation creates a timing decision

A fictional support application issues short-lived signed access tokens. An API can validate one locally without asking a session database on every request. That improves independence, but an account being disabled does not automatically change the already-issued token's signature or expiration. The organization must decide how quickly previously granted access should stop.

Different mechanisms make different tradeoffs. Short lifetimes bound how long an access token can remain usable under ordinary expiry checks. A deny list or a server-side status lookup can support earlier rejection but introduces shared state, availability requirements, and propagation questions. Refresh-token revocation stops new access tokens only if every refresh path enforces the change correctly.

A role removal is another useful case. If a token carries a role claim, that claim may be stale until the token is replaced or the receiver checks current policy. The application should define whether permissions come from token claims, current server state, or a carefully specified combination. Otherwise teams may disagree about what 'access removed' actually means.

Measure the revocation window

Using designated test accounts, document the time a session is revoked and the time each service begins rejecting its credentials. Include a browser request, a background API call, and a refresh attempt where those flows exist. Do not assume they all share the same implementation.

Plan signing-key compromise separately from revoking one user's token. Removing trust in a key can affect many legitimate clients and requires coordinated recovery. A useful operational document explains the maximum accepted delay, behavior during status-service failure, and who can trigger revocation. These concrete expectations turn a logout feature into an enforceable security property.

GO TO THE SOURCE

References & further reading

Original explanations, with primary references for deeper study.

OWASP: JSON Web TokenIETF RFC 7009: OAuth 2.0 Token Revocation
EXPLORE THIS IDEA’S CONNECTIONS

A small part of a bigger picture.

4 notes · 3 connections
100%
JWT expiration and revocation · depth 1
Drag to pan · Pinch or use +/− to zoom · Click to preview · Double-click to read
Browse notes as a list (4)
FOLLOW ANOTHER THREADExplore the rest of the library
Start with a concept. Follow its connections.
Detection & responseAbuse Elevation Control MechanismElevation-control abuse bypasses or misuses mechanisms governing privileged execution.Making change happenAcceptance criteriaDefine observable conditions for a deliverable to be accepted.Security essentialsAccess controlUnderstand subjects, resources, permissions, and enforcement through a shared-drive example, including how access changes over time.Detection & responseAccess Token ManipulationAccess token manipulation changes or adopts operating-system security contexts.Risk & resilienceAccount Access RemovalAccount access removal disrupts legitimate users by changing, deleting, or restricting their identities.Evidence & investigationAccount DiscoveryAccount discovery enumerates identities available in a system or environment.Detection & responseAccount ManipulationAccount manipulation changes identity settings to preserve or expand access.Adversarial thinkingAcquire InfrastructureInfrastructure acquisition obtains domains, servers, or other resources used to support operations.Adversarial thinkingActive ScanningActive scanning probes target infrastructure to learn reachable services or weaknesses.Security essentialsAdversary in the middleAn intermediary may observe or alter a communication path.Security essentialsAESA symmetric block cipher whose safe use depends on its mode and implementation.Making change happenAgile deliveryUse short feedback cycles to adapt toward a useful outcome.