Revocations
Overview
A credential with a revocation‐purpose status entry indicates that its valid/invalid state is determined by a Bitstring Status List maintained on‐chain. The verifier must:
Detect the presence of a revocation‐purpose
credentialStatus
entry.Resolve and fetch the on‐chain revocation list.
Decode the bitstring and inspect the bit at the credential’s
statusListIndex
.Reject the VC if that bit is set (1), otherwise allow validation to continue.
Integration Point
Location in code:
VcValidators.validateVc()
This is where existing validation checks occur (proof, issuer DID, subject matching). After those checks, insert the revocation validation logic described below.
Revocation Validation Steps
Extract
credentialStatus
from the VCRead the VC’s
credentialStatus
array.Look for an entry where:
type
equals"BitstringStatusListEntry"
, andstatusPurpose
equals"revocation"
.
If no such entry exists, skip revocation validation and treat the VC as valid.
Parse the
statusListCredential
URIThe
credentialStatus
entry contains astatusListCredential
field in this format:Extract:
{issuerDid}
– the DID of the issuer, and{resourceId}
– the identifier of the on‐chain resource.
Fetch the Revocation List from the Blockchain
Call:
If the call returns a “resource not found” error, assume no revocation list has been published for this credential. In that case, allow the VC to pass validation (revocation cannot be determined).
Decode the Retrieved Data
The returned data is a byte array containing a compressed (gzipped) bitstring in Base64 form.
First decode the byte array from Base64 to obtain the raw gzip bytes.
Then decompress (gunzip) to recover the full bitstring as a sequence of bytes.
Inspect the Bit at
statusListIndex
From the
credentialStatus
entry, read the numericstatusListIndex
.Within the decompressed bitstring, locate the bit at that index.
A bit value of
1
means the credential is revoked.A bit value of
0
means the credential is not revoked.
If the bit is
1
, immediately fail validation (the VC is revoked).If the bit is
0
, continue with any remaining validation steps (proof verification, expiration check, etc.).
Example credentialStatus
Entry
credentialStatus
EntrystatusListCredential
:ssi://did:example:12345/statusList3
→ split intoissuerDid = did:example:12345
andresourceId = statusList3
.statusListIndex
:94567
→ the index of the bit to check in the decompressed bitstring.
Failure Modes
Resource Not Found
If
getLinkedResource(...)
indicates the on‐chain revocation list does not exist, treat the VC as not revoked (do not fail).
Network or Decode Errors
If fetching or decoding the bitstring fails unexpectedly, the verifier may optionally treat the status as indeterminate and reject the VC, or fall back to a local policy. The exact behavior should align with your security requirements.
Summary
When a VC includes a revocation‐purpose status entry:
Check for
type: BitstringStatusListEntry
andstatusPurpose: revocation
.Fetch the on‐chain revocation list via
getLinkedResource(blockchainRpcUrl, issuerDid, resourceId)
.If not found, allow the VC. If found, decode from Base64 → gzip → raw bytes.
Read the bit at
statusListIndex
:1
→ credential revoked → fail validation.0
→ credential not revoked → continue validation.
Add this section under your Verifier documentation to ensure all VCs with a revocation entry are properly checked before being accepted.
Last updated