Skip to content

Revocation: carry exp, name what is revocable and where, define errors (#146) - #147

Merged
dickhardt merged 2 commits into
mainfrom
revocation-exp-146
Sep 7, 2026
Merged

dickhardt merged 2 commits into
mainfrom
revocation-exp-146

Conversation

@dickhardt

@dickhardt dickhardt commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Closes #146.

Request is jti + exp

A caller revokes only its own tokens, so iss is redundant with the verified signer. The recipient takes the issuer from the signature and keys the revocation under it — revoking another issuer's token is unreachable, not refused. This also drops the "or from a trusted PS" clause that let one PS revoke another's tokens.

POST /revoke HTTP/1.1
Host: resource.example
Signature-Key: sig=jwks_uri;id="https://ps.example";
    dwk="aauth-person.json";kid="key-1"

{ "jti": "unique-token-identifier", "exp": 1788727813 }

exp is the revoked token's own expiration. A recipient MAY discard the entry once past exp plus clock skew, and MAY reject an exp further out than the longest lifetime it accepts. Nothing previously bounded the entry: the section had removed the token type, so the stated per-type maxima could not be applied.

What is revocable, and where

  • agent token — only at a PS, by the agent provider. A resource that takes an agent token directly under identity-based access has no revocation path, since the AP holds no record of which resources the agent visits. Bounded by the agent token lifetime, hence the 24-hour ceiling (#agent-tokens). This drops the old SHOULD asking such a resource to run a revocation endpoint nobody can find.
  • person token — by the issuing PS, at the resource in aud and at any AS it was presented to.
  • auth token — at the resource, by the PS (three-party) or AS (four-party) that issued it.

Four-party chain

The AS issued the auth token, so the PS cannot revoke it. The PS revokes the person token at the AS; the AS cascades to the auth tokens it issued against that person token, calling the revocation endpoint of the resource each names in aud. The PS also revokes the person token at the resource.

An auth token carries no reference to the person token it came from, so nothing on the wire recovers the link — the AS must hold it. Stated the retention this implies for both PS and AS, and that it is bounded by the token's own exp: at most one hour, not a durable ledger.

Response and errors

200 OK, empty body, once the revocation is recorded — whether or not the recipient holds a record of the token. A stateless verifier was previously required to answer 404 to every revocation it honored. No "not found": a recipient cannot distinguish a token it never saw from one it saw and no longer holds, and an answer that varied would disclose what it holds.

Error Status Meaning
invalid_request 400 Missing or malformed jti or exp
unsupported_iss 403 Recipient does not accept revocations from this caller at all
server_error 500 Internal error

Signature failures stay at 401 with Signature-Error.

Drive-by

The PS-to-AS example's Signature-Key used a jwks_uri="..." parameter, which the jwks_uri scheme does not define — it takes id, dwk, and kid. Fixed, since the revocation rules now depend on the signer's identity being derivable from that header.

Resolved by this PR

The malicious-PS flooding question from #146's review largely closes: a PS can no longer revoke tokens it did not issue, so it can only affect its own people, and exp caps the store at 24 hours of junk. What is left is ordinary per-signer rate limiting.

Builds clean with mmark + xml2rfc.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vibbcv1TAfcACkkbNTkraE

dickhardt and others added 2 commits September 7, 2026 10:13
#146)

The revocation request gains exp, the revoked token's own expiration,
REQUIRED alongside iss and jti. A recipient MAY discard the entry once
exp plus its clock skew has passed. Nothing previously bounded the
entry: the section removed the token type, so a recipient could not
apply the stated per-type maxima either.

Named the three revocable token types and where each is revoked — an
agent token only at a PS, a person token and an auth token at the
resource — replacing the SHOULD that asked a resource accepting agent
tokens to provide a revocation endpoint the agent provider has no way
to find. Added the PS-revokes-a-person-token scenario.

Replaced the 200/404 response rule with 200 OK once the revocation is
recorded, whether or not the recipient holds a record of the token, so
a stateless verifier is not answering 404 to every revocation it
honors. Defined invalid_request and unsupported_iss, and pointed
signature failures at the 401 Signature-Error rules.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vibbcv1TAfcACkkbNTkraE
A caller revokes only its own tokens, so iss is redundant with the
verified signer. The recipient takes the issuer from the signature and
keys the revocation under it, which makes revoking another issuer's
token unreachable rather than something a recipient has to refuse. The
request is now jti and exp. Dropped the "or from a trusted PS" clause
that let one PS revoke another's tokens.

Four-party: the AS issued the auth token, so a PS cannot revoke it. The
PS revokes the person token at the AS, and the AS cascades to the auth
tokens it issued against that person token, at the resource each names
in aud. An auth token carries no reference to the person token it came
from, so the AS must hold that link; stated the retention both the PS
and the AS need, and that it is bounded by the token's own exp — at
most an hour.

Fixed the PS-to-AS example's Signature-Key: the jwks_uri scheme takes
id, dwk, and kid, not a jwks_uri parameter.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vibbcv1TAfcACkkbNTkraE
@dickhardt
dickhardt merged commit 87b9283 into main Sep 7, 2026
2 checks passed
@dickhardt
dickhardt deleted the revocation-exp-146 branch September 7, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revocation request carries no exp, so a recipient cannot bound its revocation state

1 participant