Skip to content

feat(account): recover revoked named enrollments with retained authority - #1101

Merged
rldyourmnd merged 6 commits into
devfrom
feat/named-enrollment-recovery
Oct 25, 2026
Merged

rldyourmnd merged 6 commits into
devfrom
feat/named-enrollment-recovery

Conversation

@rldyourmnd

@rldyourmnd rldyourmnd commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Recover one positively revoked named enrollment without rotating the native identity, deleting original credentials/receipts or retargeting saved contexts. account connections recovery plan/apply/list binds the prior authorized account receipt, positive revocation receipt and exact replacement connection/key operation.

Reviewed apply admits schema 56, parent recovery and child key creation in one registry transaction before key I/O. The child cannot bypass parent admission. Per-enrollment writer fences drain older users; admitted key creation resumes after expiry and a missing ready key is never silently recreated. Production retains its database filename/owner marker, and frozen schema-55 plan serialization, digests and results remain unchanged.

Every replacement authorization fixes the original account and revoked public key. Only a validated same-account receipt completes recovery; replay finishes a crash after credential persistence without repeating a single-use exchange. New requests through the retired enrollment refuse while historical receipts remain replayable. Lock ordering avoids nested registry acquisition and stages attestation signatures before registry ownership.

Desktop's reviewed public-plan bridge accepts this apply path. Recovery arguments, replies and error prose are omitted from diagnostics, including normalized whitespace paths. Dedicated guided recovery UX remains a later increment.

Windows account sessions use bounded compressed binary Credential Manager records, retaining reads of existing UTF-16 password entries and unchanged device-key encoding. The native blob limit is 2,560 bytes; decoded records are capped at 64 KiB. Corruption, trailing bytes, expansion and oversized incompressible records refuse; no token file fallback exists. A stronger journal fence protects old readers.

Qualification on exact head 0014e49824a4c6101e945c14246a1550503f8a76:

  • All 27 repository jobs, CodeQL and branch policy passed.
  • All three desktop/package jobs and CLI archive checks passed; release attestation correctly skipped because no release was requested.
  • Linux passed 78 library tests, integrations, optimized binaries and existing-consumer proof: registry digest sha256:1191a867b775997312e0978bec632cba0e9e1b0846c99e5fae1088991194afdc, 51 snapshot tables, SQLite 3.53.2.
  • Mandatory real API/PostgreSQL proof passed: server revocation, wrong-account approval refused before device registration, same-account replacement, preserved native/legacy/other-account/context state, seven harness previews and zero read-operation/distribution rows.
  • Actual macOS Keychain and Windows Credential Manager journeys passed independent keys/sessions, selective recovery/logout and same-account key constraints over loopback HTTP.
  • Local native checks passed using existing managed per-host L1; all four checkout-local target directories remain absent. Backend/frontend/desktop execution was on CI/server only.

This is a bounded #1071 checkpoint under #1070. It requires positive retained device_revoked evidence and refuses unfinished publication/sync belonging to that enrollment. Missing-key preparation is isolated in draft #1103; exact named-delivery interruption/reconciliation, qualified project/harness contexts and the remaining program acceptance stay open. Do not close #1071 or publish a public client release from this increment. No production registry migration is executed by merging source. Rollback preserves data and requires a schema-56-compatible client for already admitted recovery.

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.

1 participant