Expand description
Issuer-scoped credential-revocation store.
Revoked credential IDs (iss, jti/cti) are stored until their exp time
passes, at which point natural JWT/CWT expiry rejects them anyway. The
store is keyed by CredentialId, not bare jti, so that two issuers
producing the same jti value cannot cross-revoke each other’s tokens.
CWT cti byte strings are kept as bytes (via CredentialValue::Cwt)
and never stringified into the JWT jti text namespace.
§One canonical store, owned by the policy service
There is exactly one canonical revocation store per deployment, owned by
the policy service process and backed by a durable local file
(FileBackedCredentialRevocationStore). Every other service process
publishes the process-global handle below with a policy-authority RPC
client store (see services::revocation in the hyprstream crate) that
checks and publishes revocations through the policy service over the RPC
bus. Startup, checks, and publication are all fail-closed: no reachable
authority means no JTI-bearing token is admitted and no revocation
silently no-ops.
Renamed from JtiBlocklist / InMemoryJtiBlocklist (bare jti key) to
CredentialRevocationStore / InMemoryCredentialRevocationStore
(issuer-scoped (iss, jti/cti) key).
Structs§
- File
Backed Credential Revocation Store - Durable credential-revocation store: an in-memory index in front of a JSONL append file. This is the canonical store form owned by the policy process — a revocation becomes visible to checks only after it has been appended AND fsync’d, so a crash never resurrects a revoked credential.
- Global
Store Already Set - Error returned when the global store was already published with a different instance.
- InMemory
Credential Revocation Store - In-memory credential-revocation store with periodic cleanup.
- Revocation
Publish Error - The revocation authority did not durably accept a revocation publication.
Traits§
- Credential
Revocation Store - Trait for a credential-revocation store keyed by issuer-scoped
CredentialId.
Functions§
- global_
credential_ revocation_ store - Access the process-global credential-revocation store, if published.
- set_
global_ credential_ revocation_ store - Publish the process-global credential-revocation store. Called once at startup; a second call returns an error so the caller can detect a publication race (two services trying to set different stores). The caller MUST propagate this error — ignoring it allows two divergent stores, breaking the one-store invariant.