Repository navigation
Open
Labels
area:apiPublic interfaces, bindings, events, and cross-backend contractsarea:authAuthorization, capabilities, proofs, signatures, crypto, and privacyarea:sqliteSQLite extension, sqlite-node, wa-sqlite persistence, and migrationsarea:syncSync protocol, reconciliation, transport, discovery, and sync serversenhancementNew feature or request
Description
Part of #38: persist each operation and its exact OperationAuth together, or persist neither.
Deliver
- Authorize and sign local operations before commit through auth(web): provide opaque keys and crash-safe auth storage #251, binding the complete operation and exact
OwnerGrantIdfrom auth: implement owner grants and operation authorization #255. - Commit local and received operations with their verified auth atomically across Memory, native SQLite, and wa-sqlite. Reconciliation and forwarding must never sign an already-committed operation or mint/substitute its authorization.
- Keep unauthenticated storage explicitly separate from authenticated writes; do not represent the latter with nullable or partial auth.
- Preserve integrity and original authorization when importing history already accepted by the trusted endpoint. Later expiry/revocation does not undo that acceptance. A signature or claimed authoring time alone does not establish prior acceptance.
- Define duplicate handling for the complete operation/auth pair. Exact replays are idempotent and stored auth is immutable. Before implementation: choose whether matching operation bytes with different auth are rejected or return the retained pair. auth(sync-server): enforce authenticated full-document sync #243 consumes this rule alongside fix: reject operation ID equivocation atomically #185's operation-content conflict checks.
- Use one cross-backend conformance suite covering local writes, received history, duplicates/conflicts, injected prepare/authorization/retry/commit/listener failures, reopen, and crash recovery.
#243 owns PostgreSQL server admission and its transaction boundary; PostgreSQL local authoring can reuse this contract. PRs #187 and #192–#196 are source material, not merge candidates: their superseded OpAuth.proofRef model must not be restored.
Done when
Each write commits the complete operation/auth pair or neither. After failure or reopen, no partial operation or orphaned authorization exists, and every accepted operation retains its exact authorization bytes.
Metadata
Metadata
Assignees
Labels
area:apiPublic interfaces, bindings, events, and cross-backend contractsarea:authAuthorization, capabilities, proofs, signatures, crypto, and privacyarea:sqliteSQLite extension, sqlite-node, wa-sqlite persistence, and migrationsarea:syncSync protocol, reconciliation, transport, discovery, and sync serversenhancementNew feature or request
Activity