Skip to content

fix: prevent stale group credential acceptance blocking issuance - #449

Draft
lenkan wants to merge 4 commits into
WebOfTrust:mainfrom
lenkan:feature/credential-guard-upstream
Draft

fix: prevent stale group credential acceptance blocking issuance#449
lenkan wants to merge 4 commits into
WebOfTrust:mainfrom
lenkan:feature/credential-guard-upstream

Conversation

@lenkan

@lenkan lenkan commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

A stale multisig credential-issuance acceptance could poison a member while another issuance was in flight:

  1. In a 2-of-2 group, M1 issues credential 1 and M2 accepts it successfully.
  2. M1 starts credential 2, leaving M2's /multisig/iss notification unread.
  3. M2 accepts credential 1's old exchange again. The wallet creates a fresh KERIA issue request from credential 1's completed ACDC; it does not replay the original HTTP request, KEL, TEL, or signatures.
  4. M2 then accepts credential 2.

Before this change, step 3 could return HTTP 500 and leave M2 unable to finish or read credential 2. M1 could also remain blocked waiting for M2's contribution.

Related to #213.

Fix

Treat an already-completed group credential acceptance as idempotent by reusing its persisted operation state, without submitting a conflicting KEL or TEL event.

lenkan added 2 commits July 14, 2026 17:16
Persist group KEL and TEL progress so credential issuance and revocation can safely resume after interrupted requests.
Ensure a completed credential acceptance cannot block a later group issuance.
@lenkan lenkan changed the title fix: make group credential operations durable fix: prevent stale group credential retries blocking issuance Jul 14, 2026
@lenkan lenkan changed the title fix: prevent stale group credential retries blocking issuance fix: prevent stale group credential acceptance blocking issuance Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.21782% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.41%. Comparing base (f621ca4) to head (ccd3197).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/keria/app/credentialing.py 74.69% 42 Missing ⚠️
src/keria/core/longrunning.py 94.44% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   87.76%   87.41%   -0.35%     
==========================================
  Files          26       26              
  Lines        5826     5992     +166     
==========================================
+ Hits         5113     5238     +125     
- Misses        713      754      +41     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Isolate credential test servers and expect asynchronous group operation responses.
@lenkan
lenkan force-pushed the feature/credential-guard-upstream branch from e5bfcbd to 4887165 Compare July 14, 2026 15:59
Exercise persisted group KEL, TEL, and credential completion states in the long-running operation monitor.
@lenkan

lenkan commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@iFergal @kentbull is this something you have experienced?

@iFergal

iFergal commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

@lenkan No, but I am in favour of making the APIs idempotent

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.

2 participants