askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
dbbasic-package.json · 4.7 KB · 66 lines
| 1 | { |
| 2 | "id": "app-notary", |
| 3 | "name": "Notary", |
| 4 | "version": "0.1.0", |
| 5 | "description": "Store a digest, check it later. The smallest app on the box, and the one every tamper-evidence claim here eventually leans on. THE PROBLEM IT SOLVES: a hash chain that lives inside the file it protects, checked only by the machine that wrote it, defends against accident and casual editing but not against anybody who actually wanted to -- recomputing a chain over a million rows is a couple of seconds. What makes tampering expensive is recording the head somewhere the attacker cannot reach. This is that somewhere, and the security property is INDEPENDENCE rather than cleverness: a dumb append-only list of (digest, when) held by a third party is a stronger guarantee than elaborate cryptography run by the party with the motive. THREE REFUSALS ARE THE DESIGN. It never stores content -- there is no field for it and no code path that would accept one, which is why notarizing something confidential is safe and why this collection is not worth stealing. Nothing is ever amended or removed -- append storage, no update, no delete, no delete verb, not as an oversight but as the product. And it attests EXISTENCE and nothing else: not authorship, not ownership, not meaning, not that the digest is of what the submitter says it is. object_notary.attestation() is the exact wording and every surface renders it beside the answer rather than in a footnote, because the failure mode of a notary is not technical -- it is a reader taking 'notarized' to mean verified, owned or approved. IDEMPOTENCY RUNS BACKWARDS FROM THE HOUSE RULE. Everywhere else a repeated write is suppressed to avoid a duplicate (docs/logic-decisions.md #7); here object_notary.first_seen returns the EARLIEST row and action_notarize hands it back to every later submission, because the claim is 'this existed BY then' and a later submission cannot make a thing earlier. Walking a timestamp forward is the only direction an attacker would want to walk it, and there is no way to do it. The CHECK is public and the SUBMISSION is not, unless the operator sets notary.public_submission -- an attestation only its submitter can look up is a favour rather than evidence, while an open write endpoint is a decision a service makes and a private ledger anchor does not. The page hashes a dropped file in the browser with SubtleCrypto and uploads nothing, which earns its place by demonstrating the central claim instead of asking to be believed. Algorithms are a closed set of sha256 and sha512: md5 and sha1 are refused rather than unsupported, because a digest somebody can collide lets them notarize one document today and produce a different one with the same hash tomorrow, which is the exact attack this exists to make hard. WHAT IS DELIBERATELY NOT HERE, named so it reads as a decision: no signature over the receipt (it would let a submitter prove what this server said even if this server later denied it -- a real strengthening that needs a key, a rotation story and a published public key, and lives in plan/notary-spec.md); no hash chain over this log itself, which belongs in the storage layer where each link can be computed under the same lock that appends the row, since doing it at the package layer would read the tail then append without the lock and two submissions landing together would fork the chain, and a chain that forks under ordinary load spends its credibility on false alarms; and no Merkle batching, which is the right answer at volume and pure overhead below it.", |
| 6 | "compatibility": { |
| 7 | "dbbasic_object_server": ">=0.1.0" |
| 8 | }, |
| 9 | "dependencies": ["app-views"], |
| 10 | "objects": [ |
| 11 | { |
| 12 | "id": "site_notary", |
| 13 | "path": "objects/site/notary.py" |
| 14 | }, |
| 15 | { |
| 16 | "id": "action_notarize", |
| 17 | "path": "objects/action/notarize.py" |
| 18 | } |
| 19 | ], |
| 20 | "schemas": [ |
| 21 | { |
| 22 | "collection": "notarizations", |
| 23 | "path": "schemas/notarizations.json" |
| 24 | } |
| 25 | ], |
| 26 | "permissions": [ |
| 27 | { |
| 28 | "path": "permissions/rules.json" |
| 29 | } |
| 30 | ], |
| 31 | "seed": [ |
| 32 | { |
| 33 | "collection": "notarizations", |
| 34 | "path": "seed/notarizations.tsv" |
| 35 | }, |
| 36 | { |
| 37 | "collection": "site_routes", |
| 38 | "path": "seed/site_routes.tsv" |
| 39 | }, |
| 40 | { |
| 41 | "collection": "views", |
| 42 | "path": "seed/views.tsv" |
| 43 | } |
| 44 | ], |
| 45 | "migrations": [], |
| 46 | "nav": [ |
| 47 | { |
| 48 | "id": "notary", |
| 49 | "label": "Notary", |
| 50 | "path": "/notary", |
| 51 | "blurb": "Lodge a digest, and prove later that it already existed", |
| 52 | "surface": "public", |
| 53 | "group": "System", |
| 54 | "order": 685 |
| 55 | }, |
| 56 | { |
| 57 | "id": "notarizations", |
| 58 | "label": "Notarizations", |
| 59 | "path": "/notarizations", |
| 60 | "blurb": "Every digest this server has been asked to remember", |
| 61 | "surface": "operator", |
| 62 | "group": "System", |
| 63 | "order": 686 |
| 64 | } |
| 65 | ] |
| 66 | } |