Skip to content

fix: prevent lost and partial revocations in the status list - #1112

Merged
paullatzelsperger merged 2 commits into
eclipse-edc:mainfrom
paullatzelsperger:fix/1105_statuslist_revocation_lost_update
Oct 6, 2026
Merged

paullatzelsperger merged 2 commits into
eclipse-edc:mainfrom
paullatzelsperger:fix/1105_statuslist_revocation_lost_update

Conversation

@paullatzelsperger

Copy link
Copy Markdown
Member

What this PR changes/adds

  • BitstringStatusListFactory now reads the status list credential with CredentialStore#queryForUpdate, introduced in
    fix: prevent duplicate status list indices on concurrent issuance #1104. The status list credential therefore stays locked until the surrounding transaction completes.
    • The StatusListInfoFactory javadoc documents that a status change must be made within that transaction.
  • CredentialStatusServiceImpl#revokeCredential rolls back its transaction when the status list credential or the
    revoked credential cannot be written. It still returns the original failure as a ServiceResult.
  • CredentialStatusServiceImpl#revokeCredential now returns a failure when the credential's current status cannot be
    read from the status list.

Why it does that

  • Lost revocations: a revocation reads the status list credential, sets a bit, re-signs it and writes back the
    entire row. Without a lock, two concurrent revocations on the same status list could overwrite each other. The
    credential's record would say REVOKED, but the published status list would not.
  • Reused indices: a revocation could also write back a stale currentIndex, so indices handed out in the meantime
    were handed out again.
  • Partial writes: both writes happen in one transaction, but LocalTransactionContext only rolls back on exceptions.
    If the second write failed, the first one was still committed, and the status list and the issuer's records disagreed.
  • False success: when the current status could not be read, the method returned mapFailure() of a successful
    result. That is a successful result, so the revocation reported success without changing anything.

Linked Issue(s)

Closes #1105

🤖 Generated with Claude Code

paullatzelsperger and others added 2 commits October 6, 2026 17:17
…atus

The status list credential is now read with CredentialStore#queryForUpdate
when a credential's status is changed, so it stays locked until the
revocation has written it back. Concurrent revocations no longer overwrite
each other's bits, and a revocation no longer writes back a stale index.

Closes eclipse-edc#1105

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A revocation writes the status list credential and the revoked credential.
If one of them cannot be written, the transaction is now rolled back, so
that the status list and the issuer's records cannot disagree. A failure
to read the current status is now reported as such, instead of as a
successful revocation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@paullatzelsperger
paullatzelsperger requested a review from a team as a code owner October 6, 2026 15:23
@paullatzelsperger paullatzelsperger added the bug Something isn't working label Oct 6, 2026
@paullatzelsperger
paullatzelsperger merged commit 1111b47 into eclipse-edc:main Oct 6, 2026
19 of 22 checks passed
@paullatzelsperger
paullatzelsperger deleted the fix/1105_statuslist_revocation_lost_update branch October 6, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent revocations can get lost in the status list credential

3 participants