rootsign-admin sync uploads them later, leaving a sync receipt for every attempt.
Record a session
1
Install the cloud extra
2
Choose the cloud backend
3
Pass the agent's ID
The hosted backend issues agent IDs, so RootSign cannot register the agent itself. Pass the ID to Without
rootsign.session():agent.py
agent_id, the session does not open:4
Run it
Several cloud behaviours changed after RootSign 0.3.1. In 0.3.1 and earlier, a URL that answered 404, including the default one, lost every record instead of spooling it; a missing
ROOTSIGN_API_KEY was reported as an unreachable endpoint; and a session without agent_id failed with a message saying init() does not support the cloud backend.Verify a spooled session offline
A spooled session verifies like any other session file:rootsign export --local builds an evidence bundle from it the same way.
If the endpoint went down part-way through a session, the records sent before the outage are not in the spool file, so the file verifies as INCOMPLETE:
Upload with sync
--dry-run lists what is waiting without contacting anything, and works today:
sync uploads every spooled session. Against an endpoint that implements the ingest specification:
spool/synced/ with its receipt. Running sync again is safe: records the endpoint already has count as delivered, and with nothing left it prints Nothing to sync — no spooled sessions under <spool>. The rootsign-admin reference lists the REJECTED and FAILED lines and the exit codes.
Sync receipts
Everysync attempt adds an entry to the session’s receipt, spool/receipts/<session_id>.sync.json: what the endpoint accepted, what it already had, what it refused and why, and what was never attempted, with a SHA-256 of the spool file as it was uploaded. A second attempt is appended, never overwrites the first. rootsign export puts the receipt in the session’s evidence bundle as sync-receipt.json; its fields are in the evidence bundle reference.
A receipt records the one outcome the three verdicts cannot: a record that was seen and refused. INCOMPLETE says a record is missing and TAMPERED says one was altered; the receipt says what happened when the evidence was handed over.
How the spool keeps the chain
- One chain across the outage. RootSign seals each record before it picks a destination, so records written to the spool continue the sequence the endpoint had. After
sync, the store holds one session, not two pieces. - Once a run spools, it stays spooled. After the first failover, the rest of the run goes to the spool, even if the endpoint comes back.
syncuploads it afterwards. - If the spool cannot be written either,
ROOTSIGN_ON_RECORD_LOSSdecides: log and continue with a gap that verifies asINCOMPLETE(the default), or raiseRecordPersistenceError. See Configuration.
Not available in the preview
- Uploading. The hosted endpoint is not live, so
synchas nowhere to send records yet. - Registering agents. Pass
agent_idtorootsign.session(). - Human approval.
require_approval=TrueraisesHiTLUnsupportedBackendErrorbefore the tool runs, because approvals will come from the hosted backend. Use the PostgreSQL backend for approvals. - Exporting by session ID.
rootsign export <session_id>reads PostgreSQL. Export a cloud session from its spool file with--local.
ROOTSIGN_API_KEY, nothing can be sent, so RootSign records to the spool from the first record and logs one warning that names the missing key.
Related
rootsign-admin sync
Every line
sync prints, and its exit codes.Ingest specification
The wire format the cloud transport sends.