Skip to content

Revoke associations when their LE or QVI credential is revoked - #49

Merged
kentbull merged 3 commits into
masterfrom
feat/upstream-revocation-2-processing
Nov 10, 2026
Merged

kentbull merged 3 commits into
masterfrom
feat/upstream-revocation-2-processing

Conversation

@kentbull

@kentbull kentbull commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Part 2 of 3 in the upstream-revocation stack. Draft. Based on #48.

What and why

This PR turns the stored links into revocations and makes them visible.

  • Commit 3 classifies a registry revocation by durable index instead of reading a credential body. An association credential applies directly, as before. An LE or QVI credential with source links becomes one work record per association, written in one transaction. Anything else is acknowledged with no effect. The registry record is acknowledged only after the application commit, so a crash replays it.
  • Commit 4 adds the worker. One turn applies one work record, committing the revoked status with its cause, the unchanged revision-2 event and the work removal together. An LE or QVI revocation therefore yields one event per association, and replay yields none. Work for an association that is no longer accepted is dropped. A bad association moves to a dead letter so the rest of the fan-out proceeds, and the new offline command retry-revocation requeues it. A direct revocation that cannot apply is dead-lettered the same way, so it cannot stop the shared registry queue.
  • Commit 5 adds revocationSource (credential SAID, role le or qvi, TEL event SAID) to the public status response for upstream revocations only. Other responses keep their shape.

Stack

  1. Acceptance: Reject revoked LE/QVI credentials at acceptance and store the chain #48
  2. This PR (base: feat/upstream-revocation-1-acceptance)
  3. Coverage and docs: Add upstream revocation fixtures, witnessed coverage and docs #50

Verification

Run against this PR's head in a separate checkout of that commit:

  • tests/associations and tests/persistence: 66 passed
  • tests/delivery and tests/runtime: 75 passed

The full suite is run at the head of the stack (see PR 3).

Reviewer notes

  • The webhook is unchanged and carries no cause. Adding the cause to the event is deferred: Include the revocation cause in the revoked webhook event #47.
  • If an LE and a QVI revocation both reach the same association before the worker runs, the association is keyed once, so it gets one event and the first cause wins.
  • Storage errors in the worker propagate and keep the work for the next turn. Only a ValueError (missing original event, or changed status) dead-letters.
  • The Verifier does not poll. Revocation of an LE or QVI is applied only after someone delivers the evidence.

A registry revocation is now classified by durable index rather than by reading a credential body. An association applies directly as before. A credential with source links becomes one work record per association in one transaction, and anything else is acknowledged with no effect.

The registry record is acknowledged only after the application commit, so a crash replays it.
One worker turn applies one work record, committing status with its cause, the unchanged revision-2 event and the work removal together, so an LE or QVI revocation yields one event per association and replay yields none. Work for an association that is no longer accepted is dropped.

A bad association moves to a dead letter so the rest of the fan-out proceeds, and `retry-revocation` requeues it offline. A direct revocation that can't apply is dead-lettered the same way, so it can't stop the shared registry queue.
Operators need to see why an association was revoked when the association credential itself was not. Status responses now carry `revocationSource` for upstream revocations only, so responses for every other status keep their shape.

The webhook event is unchanged and carries no cause.
@kentbull
kentbull marked this pull request as ready for review November 10, 2026 00:51
@kentbull
kentbull changed the base branch from feat/upstream-revocation-1-acceptance to master November 10, 2026 00:57
@kentbull
kentbull merged commit 9b82e76 into master Nov 10, 2026
1 check passed
@kentbull
kentbull deleted the feat/upstream-revocation-2-processing branch November 10, 2026 00:58
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.

1 participant