A refresh captures a new dump of the relation's source, then restores exactly that
snapshot onto the relation's target through the existing restore path.
- refresh_runs in SQLite, one active run per target, per-requester idempotency keys,
a cap on concurrent runs and a TTL that only applies until the restore starts overwriting
- the run and its capture job are created in one transaction; the run follows its own
capture job, never the latest snapshot, and pins that snapshot until it ends
- the restore is queued and linked in one guarded transaction; every step is safe to repeat
after a crash; a background driver only reads the database
- authorize_apply re-checks, in the transaction that allows the overwrite, that the relation
is still usable, the requester is still active, the authorising grant still exists, the
deadline has not passed and the target is not the source; otherwise the restore is
cancelled, the run is blocked and the agent gets 409. Administrator restores are untouched
- POST/GET/DELETE /api/v1/refresh-runs: confirmation names source, target and version;
non-administrators never see the snapshot id, the requester or the database identity
- audit refresh.* per run
Tests drive the agent through the real Outpost endpoints and cover revocation at every
stage; the access matrix gains a RunRow kind.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Credentials
- pairing codes and Outpost upload tokens are stored only as SHA-256 digests; the
token is minted at claim (256-bit OsRng) and returned once
- the old clear-text wormhole_tokens table is migrated in place and dropped with
secure_delete; active tokens keep working with a fresh lifetime
- admin rotate (with grace window) and revoke endpoints, audited; a revoked
Outpost is refused on its next request
- optional end date for the shared admin token (TESSERA_ADMIN_TOKEN_EXPIRES)
Limits
- governor per-source limits for emergency login, pairing claim and SSO
start/callback; X-Forwarded-For only from TESSERA_TRUSTED_PROXIES; IPv6 by /64
- at most two concurrent Argon2 verifications, refused immediately when busy
- denials audited at most once a minute per source
- the mTLS listener now supplies the peer address to handlers
Existing hubs: rotate every Outpost token after upgrading; old database copies
still contain the clear-text tokens.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add GET /api/v1/restore-jobs?limit= (admin only, newest first, default 50,
at most 200) so the activity log can show restores without asking snapshot by
snapshot. The existing history test now also covers ordering and the limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PostgreSQL and MySQL backups run through paired outposts, with operator sign-in, off-site copies, and legacy import. Retention stays on each orbit, so the unused retention console is removed.
Co-authored-by: Cursor <cursoragent@cursor.com>