aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/store.rs
Commit message (Collapse)AuthorAgeFilesLines
* state: limit refused writes per usertv3 days1-0/+3
| | | | | | | | | | A write every node would refuse is rolled back by forking the document at the heads before it, under the write lock, at a cost that grows with the document's history. A user could ask for such writes in a loop. Count each user's refused writes over the last minute. Past --refused-writes-per-minute (default 10), its writes are answered 429 without being tried, until the oldest refusal leaves the minute.
* envelope: a signed value names its swarmtv3 days1-2/+1
| | | | | | | | | | | | Review 3.1, part of finding 12: a signed value's payload bound path, user, time and prev, but not the swarm. A user with the same name and key in two swarms could have an envelope replayed from one into the other, wherever the path holds no envelope yet (prev ""). The payload now names the swarm (`swarm`), and a node takes an envelope only for its own. /auth/whoami says the swarm, and continuum-signed and the example in api.md sign it. Wire version 44: nodes before this refuse such envelopes, and those after refuse the old ones.
* access: a node judges its own changes before they leavetv3 days1-0/+4
| | | | | | | | | | | | | | | | | | | | The API checks the path a request asks for; the rules judge everything the change does. Where they disagreed, the honest node's change was refused by every other node, and with signatures required the node was refused as a whole. The plan had both gates run the same judgement. Under a policy, each change a node makes (its own writes and those through the API) is now judged by rules::judge as receivers will judge it, before it is signed or sent; one every node would refuse is rolled back (the document forked at the heads before it, same actor: the change never left) and the request refused with 403 (StoreError:: Refused). rules::judge_held, judging a change the document holds, moves from swarm::refusals to access::rules for both. The simulations that play a member past its own checks write with a helper that bypasses them (forge). Review finding 3 (the same judgement at both gates).
* access: strict policy, signed pathstv4 days1-0/+53
| | | | | | | | | "values": "signed" (strict, requiring signatures too): the registry, _continuum/access, bans and the paths in _continuum/access/userSigned (* for any key) hold values their users signed. Envelopes read as the values they hold where the node reads protocol data. Auth plan M7.
* access: the policy enforcedtv4 days1-0/+6
| | | | | | | | _continuum/access/policy ({"version": 1}) has every node screen every change it receives, on every path changes come in. A policy a node doesn't know stops its writes through the API. GET /admin/refused. Auth plan M6.
* bench: change pathstv4 days1-2/+13
| | | | | | | Finding the paths changes touch, from documents and from raw change bytes, measured before M6 is built. Auth plan M6 (measure first).
* store: keys_at tells no map from an empty onetv4 days1-9/+8
| | | | | | | | registry::exists counted any value at _continuum/users as a registry; keys_at answers None where there is no map, and its users (records, members, forget records, remakes) say what they make of it. Auth plan M1 (fix).
* access: authorization at the APItv4 days1-2/+12
| | | | | | | | | Every request is judged by the registry the node holds: store reads pruned to what the user may read, writes refused where it may not, admin endpoints by protocol capabilities. Without a registry, as before (--protocol-writers for protocol data). Auth plan M1.
* access: the user registrytv4 days1-0/+5
| | | | | | | | | _continuum/users/<name>: one entry per user, with capabilities by path (read, write) granted by whom and when, and a disabled flag. Read leniently: a damaged entry gives less, never more. Protocol data stays apart: a capability outside _continuum never covers it. Auth plan M1.
* api: /admin/changes read ops, not diffstv9 days1-0/+86
| | | | | | | | | | | | The new store::changed_by reads each change's own operations instead of diffing the document before and after it. Each object's path is found once per change, as it was right after that change. So the cost now grows with the size of the change, not the size of the map it touched. - It names paths the same way the diff did: a map entry by its key, and list and text edits by the list or text. - It relies on import_obj, which Automerge marks as hidden from its docs, to turn an operation's object ID back into an object.
* api: drop $float as JSON number is OKtv9 days1-16/+37
|
* api: add type caststv9 days1-0/+31
|
* api: types are stickytv10 days1-33/+216
|
* api: add application/vnd.continuum.typed+jsontv10 days1-130/+82
|
* api: add application/vnd.continuum.* scalar typestv10 days1-45/+155
|
* document: create new compound values at oncetv10 days1-11/+29
| | | | | This speeds up large writes as new maps and lists are created in one batch operation instead of one operation per value.
* document: introduce patch logtv10 days1-1/+6
|
* api: add support for counterstv10 days1-0/+57
|
* api: allow reading past versionstv10 days1-0/+3
|
* api: PUT changes only what differstv10 days1-23/+148
|
* document: reject writes during rejointv10 days1-0/+4
|
* use Automerge as Document instead of AutoCommittv11 days1-5/+5
| | | | This allows a lot of operations to drop mut.
* store function accept any documenttv11 days1-42/+50
|
* tests write through document::testing helperstv11 days1-16/+54
|
* one function for changed pathstv11 days1-0/+61
|
* move ChangeSet from swarm to documenttv12 days1-0/+11
|
* store reads go through resolve_loggedtv12 days1-21/+25
|
* consistently use resolve_throughtv12 days1-15/+7
|
* unify path deleterstv12 days1-50/+30
|
* unify path walkerstv12 days1-32/+7
|
* api: support list indexes in pathtv12 days1-39/+294
|
* add support to insert values at list indextv12 days1-0/+77
|
* api: add support for shallow store readstv12 days1-0/+72
|
* make clippy happy againtv2026-10-261-8/+8
|
* turn all pub into pub(crate)tv2026-10-261-17/+24
|
* add votes registertv2026-10-241-0/+23
|
* add store::copy_path_to(src, from, dst, to)tv2026-10-211-4/+14
|
* reorganize all the modulestv2026-10-211-0/+696