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
rules.json · 2.1 KB · 25 lines
| 1 | { |
| 2 | "rules": [ |
| 3 | { |
| 4 | "effect": "allow", |
| 5 | "principal": "registered", |
| 6 | "actions": ["read"], |
| 7 | "collection": "anchors", |
| 8 | "reason": "READ ONLY. An anchor that can be rewritten after the fact is an anchor that says whatever the last person to touch it wanted it to say, so there is no create, no update and no delete here for anybody -- system_publish_head is the one writer and the collection is append storage besides. Read is granted to every registered principal rather than to admins alone because the question this collection answers ('can these records be trusted') is one an ordinary member of staff gets asked by a customer, and an integrity check only the owner can run is one nobody runs" |
| 9 | }, |
| 10 | { |
| 11 | "effect": "allow", |
| 12 | "principal": "registered", |
| 13 | "actions": ["execute"], |
| 14 | "object_id": "site_ledger_integrity", |
| 15 | "reason": "OPERATOR-FACING rather than public, which is a real trade and worth naming. The auditor's argument for making it public is good: an integrity claim a stranger cannot check is a claim rather than evidence. What keeps it behind sign-in is that the page states the exact row count of every money ledger on the box, which tells an outsider how many payments, refunds and journal lines a business has -- commercially sensitive in a way the digests themselves are not. The public half of this story is the NOTARY: the digests are lodged there, that lookup needs no account, and anybody handed a digest can check it without also being handed the shape of the business" |
| 16 | }, |
| 17 | { |
| 18 | "effect": "allow", |
| 19 | "principal": "role:admin", |
| 20 | "actions": ["execute"], |
| 21 | "object_id": "system_publish_head", |
| 22 | "reason": "the daily schedule is how this normally runs -- time-driven work belongs to the daemon (docs/logic-decisions.md #2) -- and the manual grant exists for the case that actually matters: an operator wanting a fresh anchor immediately before or after something significant, rather than waiting for tonight. Admin rather than registered because it makes outbound requests to configured notaries, and who this server talks to is an operator decision" |
| 23 | } |
| 24 | ] |
| 25 | } |