Skip to content

Revocation Package

The revocation packages define the store contract resource servers use to reject mandates after an Authority record, Root authority record, Session, or Delegation has been revoked.

They do not consume streams, verify JWTs, or revoke product objects by themselves. Use the Redis backend and its consumers for distributed enforcement; use the Admin API to initiate revocation.

EcosystemPackage
TypeScriptnpm install @caracalai/revocation
Pythonpip install caracalai-revocation
Gogo get github.com/garudex-labs/caracal/packages/revocation/go
OperationMeaning
isRevoked(anchorId) / is_revoked(anchor_id) / IsRevoked(anchorID)Return whether an Authority record, Root authority record, Session, or Delegation anchor is revoked.
markRevoked(anchorId, ttl) / mark_revoked(anchor_id, ttl) / MarkRevoked(anchorID, ttl)Record a revocation anchor for a TTL.
currentDelegationEpoch(zoneId) / idiomatic equivalentReturn the newest observed Delegation graph epoch when the backend supports stale-edge detection.
markDelegationEpoch(zoneId, epoch, ttl) / idiomatic equivalentAdvance that epoch without allowing delayed messages to regress it.

Use in-memory stores for local development, tests, and single-process examples:

EcosystemIn-memory API
TypeScriptnew InMemoryRevocationStore({ defaultTtlMs, maxEntries })
PythonInMemoryRevocationStore(default_ttl_ms=...)
Gorevocation.NewInMemoryStore(defaultTTL)

In-memory stores do not share revocation state across processes. Production resource servers should use a shared backend and consume caracal.sessions.revoke.

Use Redis Revocation Store for multi-instance resource servers. The Redis backend reads signed revocation stream messages, marks every revocation anchor, and lets verifiers fail closed when Redis is unavailable.