diff --git a/docs/conventions.md b/docs/conventions.md index 12c49e4..eed1b03 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -61,8 +61,9 @@ tokens, passwords, cookies, or secrets. - Constraints live in the schema (`NOT NULL`, `CHECK`, `UNIQUE`, `REFERENCES ... ON DELETE ...`), not only in Rust. - Backups: `snapshot_to(path)` with `VACUUM INTO` on the writer, then checkpoint the copy so it is one self-contained file, then fsync. `admin backup --out DIR` writes the snapshot, the blob tree (where the app - has one) and a `manifest.json` with a sha256 per file. `admin backup-verify SET` checks hashes, - `integrity_check` and contiguous migrations. Never copy a live DB file. + has one), a `manifest.json` with a sha256 per file and a `manifest.mac`: HMAC-SHA256 of the manifest bytes + under a subkey of the instance key, which lives outside the backup. Verify and restore check the MAC first + (constant time), then hashes, `integrity_check` and contiguous migrations. Never copy a live DB file. ## 5. HTTP and pages