Skip to content
GatewayMarkdown

What can be revoked

Every way access is revoked in a realm, from one token to everything a user holds, and which tokens each one stops.

AvailableAPIRFC 7009, RFC 8693

Access ends in more ways than a token running out. An app signs a user out, a user takes back an agent, you stop an agent that misbehaves, your workforce provider says someone has left. Each is a revocation, and each stops a known set of tokens before they expire: at the realm at once, and at the gateway within one poll.

  • To stop an agent, a user or a client, a realm administrator in a group holding RealmOwner, with the API. Call the API shows how to get $CVYUH_SESSION.
  • To revoke a token, the credentials of the client it was issued to.
  • What users take back they take back themselves, in their own account pages; nothing to set up.
RevokedByStops
One tokenThe client, at the revocation endpoint (Revoke tokens)That token, and every token exchanged from it
A refresh familyThe client revoking a refresh token, or a refresh token used twiceEvery token from that one sign-in
A sessionSign-out, or a timeoutEvery token that names the session (sid)
RevokedByStops
An app’s accessThe user, on Authorized appsThat app’s tokens about the user, issued before. If they let the app in again, new tokens stand
A delegationThe user, on AI agents, or you, by deleting the agent’s actsFor linkEvery token about the user in which that agent acts, at any depth, issued before
RevokedByStops
An agentYou, by quarantining, killing or retiring it (Stop an agent)Every token it holds, every token it acts in, and the same for every agent beneath it
A userYou, by setting them inactive, or their account expiringEvery token about them, until they’re active again
Everything a user heldA provider’s account-disabled or credential-compromise signal (Receive signals)Every token and grant about them issued before that moment, offline access included. What they’re given afterwards stands

A quarantined agent can’t get a token until you set it back to active. A killed or retired agent stays stopped for good.

  • As an app: revoke at sign-out. See Revoke a token.

  • For an agent: quarantine or kill it, and every agent beneath it stops with it:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/agent/invoice-agent \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "status": "quarantined" }'

    Send "killed" in place of "quarantined" to stop it for good.

  • For a user: set them inactive:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/user/maya \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "status": "inactive" }'
  • From your workforce provider: register it, as in Receive signals.

Setting a client inactive refuses its tokens at the realm and at introspection at once. The revocation feed doesn’t list clients, though, so the gateway and other enforcement points that decide locally keep taking the access tokens the client already holds until they expire (five minutes by default). To refuse them sooner at the gateway:

  1. Deny the client by policy. A policy that denies every action to tokens whose client_id is the client refuses them at the gateway within its next policy poll, a minute by default:

    Terminal window
    curl -i "https://foobar.cvyuh.com/api/v0/am/objects/v1/policy?id=deny-web-app" \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "active": true,
    "resources": ["*://*:*/*"],
    "actionValues": { "GET": false, "POST": false, "PUT": false, "DELETE": false,
    "HEAD": false, "OPTIONS": false, "PATCH": false },
    "subject": { "type": "JwtClaim", "claimName": "client_id", "claimValue": "web-app" } }'

    Link it to the gateway’s policy set and the url type, as in Get started with Gateway. One deny refuses whatever else allows. For an MCP server, write the same deny on its MCP types. Delete the policy once the client’s last tokens have expired.

  2. Revoke its refresh tokens, if you hold its credentials, so it can’t get new access tokens either: see Revoke a token.

The gap is also in Known limitations.

  • Chains are checked whole. At the realm and at the gateway, a token is refused when its subject or any agent in its act chain is revoked, or when any token it was exchanged from is.
  • Revocations look back, not forward. Taking back an app, a delegation or everything a user held stops what was issued before that moment. A second revocation moves the moment on.
  • A client you set inactive is refused at the realm at once, and at the gateway with one more step: see A client you set inactive.
WhatDefaultCan it change?
When the gateway learns of a revocationAt its next poll, every 10 secondsThe gateway’s revocation poll interval: see Gateway configuration
How long a revoked token stays listed in the feedWhile a token it covers could still verifyNo
A client set inactive, at the gatewayUntil its tokens expire, five minutes by defaultDeny it by policy, as above

An app or agent whose token is revoked is refused at its next call: at the realm, invalid_token or { "active": false }; at the gateway, 401 token_revoked or 401 agent_revoked. The app signs the user in again; an agent that’s quarantined or killed can’t get a new token. A user set inactive can’t sign in until you set them active again.

Every revocation is on the audit trail, whatever the realm’s settings:

RevocationRecord
A token, a refresh family, a held request’s codeTOKEN_REVOKED
An app a user took backAPP_TAKEN_BACK
A delegation a user took backAGENT_TAKEN_BACK
An agent stopped, a user or client set inactivePATCHED, with the status before and after

See What is recorded.

SymptomCauseFix
A revoked token still works at your APIYour API checks signatures onlyPut the gateway in front, introspect, or read status lists: see How fast revocation takes effect
A client set inactive still gets through the gatewayThe feed doesn’t list clientsDeny it by policy: see A client you set inactive
A user let an app back in, and its old tokens still failTaking an app back stops tokens issued before it; only new ones standThe app gets new tokens