Skip to content
Workforce IdentityMarkdown

Status lists

An API that checks tokens offline still learns within a minute that one was revoked, from a small signed list it fetches.

AvailableAPIOAuth Token Status List (draft)

An API that checks token signatures itself never asks the realm, so a revoked token works there until it expires. With status lists, each token carries a pointer to one bit in a list the realm publishes. The API fetches the list, signed and good for a minute, and reads the bit: set means revoked.

Use it for APIs that verify tokens offline and can’t call the realm on each request, where five minutes of a revoked token still working is too long. It’s opt-in, per client or per API.

  • Who can do it: a realm administrator (a group holding RealmOwner) chooses which tokens carry an entry; RealmViewer can read the choice. Your API reads the lists without credentials: they are public.
  • Where: today this is done through the API (Call the API shows how to get $CVYUH_SESSION).
  • First: your API verifies tokens itself, against the realm’s keys.

The bit follows the same rules as introspection. A revoked token or any token it was exchanged from, a revoked family or session, a delegation given again, a scope no longer granted, an inactive client, or a user or agent who no longer stands (a killed agent among them) all set it.

1. A listed access token carries its entry in a status claim:

{
"status": {
"status_list": { "idx": 48213, "uri": "https://foobar.cvyuh.com/oauth2/status/<YYYY-MM-DD>" }
}
}

uri names the list, and idx the token’s place in it.

2. The API fetches the list at that uri:

Terminal window
curl 'https://foobar.cvyuh.com/oauth2/status/<YYYY-MM-DD>'

The answer, of type application/statuslist+jwt, is a JWT of type statuslist+jwt, signed by the realm with the same algorithm as its access tokens. Verify it with the realm’s published keys, as you verify its access tokens. Its claims:

{
"sub": "https://foobar.cvyuh.com/oauth2/status/<YYYY-MM-DD>",
"iat": <unix time>,
"exp": <iat + 60>,
"ttl": 60,
"status_list": { "bits": 1, "lst": "eAEBAEC__wAAAA…" }
}

3. The API reads the bit. lst is base64url of the list, compressed in the ZLIB format. Each entry is one bit: entry idx is bit idx % 8 of byte idx / 8, counting from the least significant bit. 1 means the token is revoked. Fetch the list again once its ttl (60 seconds) has passed.

Choose which tokens carry an entry: per client with statusListed on the client (https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client; see Call the API), or per API with the realm’s statusListedResources (PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings).

WhereSettingWhat it does
ClientstatusListedEvery access token this client gets carries an entry (default off)
RealmstatusListedResourcesEvery access token for these APIs carries an entry, whichever client asked (empty by default)
Setting or limitDefaultRange
statusListed on a clientoffon or off
statusListedResourcesnoneabsolute URIs
A list’s ttl60 secondsfixed
Entries in one day’s list131,072fixed
SymptomCauseFix
Tokens carry no status claimNeither the client nor the API is opted inSet statusListed, or add the API to statusListedResources
A revoked token still passes for up to a minuteYour API’s copy of the list is within its ttlExpected; introspect for an answer at once
server_error on token requests for a listed clientThe day’s list is fullNarrow which tokens are listed; contact support if it recurs

Reading a list writes no record. The revocation that sets a bit is a TOKEN_REVOKED record (Revoke tokens).

  • Opt-in. Only tokens for clients or APIs you choose carry an entry. Every other token stays as it is.
  • Each token gets an entry of its own, never shared, so revoking one never marks another.
  • One list per day. A token’s entry is in the list of the UTC day it was issued, named YYYY-MM-DD. Any other name is answered 404.
  • A day’s list holds 131,072 entries. Keep status lists to the clients and APIs that need them: when a day’s list runs out of room, a listed client’s token request fails with server_error until the next UTC day.
  • The lists are public. Any site may fetch them, from a browser too.