aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/store.rs
Commit message (Collapse)AuthorAgeFilesLines
* access: what a node holds alone by `_continuum/local/<node ID>/<name>`tv2 days1-3/+8
| | | | | | | | | | | | | | | | Setting a node's log filter took `write` on `_continuum`, all of the protocol data: whoever could change one node's logging could change the swarm's members, remakes and users too. Now what a node holds alone has paths of its own for capabilities, under `_continuum/local/<node ID>/`: `log` (`/admin/log`), `config` (`/admin/config`) and `debug` (`/debug`, always `write`), `read` to look and `write` to act (`api::access::needed`, which takes the node's ID). So `_continuum/local/<node ID>` is everything on one node, `_continuum/local/*/log` the log filter on every node, and holders of `_continuum` keep it all. Nothing is stored there: the store refuses writes under `_continuum/local`, and the rules refuse a change touching it, as for epoch metadata. The quarantine stays with `_continuum`: its entries are everyone's writes, which a node-local capability mustn't show.
* store: a write inside a list checked where the rules judge ittv3 days1-6/+8
| | | | | | | | | | | | | | Review 2, N9: the API checked a write's capability on the path asked (servers/list/3/name), the rules on the list it is in (servers/list): a user whose capability lay inside a list had every such write pass the API and refused by the node's own judgement (403, after rolling the document back). inspect::placed places a write's path in the document by the rule the inspector places operations by (Place::child: cut after the first list or text on the way), and the store's writes check capabilities there. One rule for both; a test checks placed against the paths the inspector finds in the change such a write makes.
* users: a user manages its own keystv3 days1-1/+10
| | | | | | | | | | | | | | | | | Only a user who may manage users could change a user's keys: a user couldn't add a new laptop's key, or remove a lost one. A user now manages its own keys, whatever else it may do: * GET /auth/keys: its keys, its entry, and the envelope holding it under a strict policy (`signed`), to sign against. * PUT /auth/keys/{id} with an authorized_keys line, DELETE /auth/keys/{id}: one change, as the user. The rules take a write of _continuum/users/<name>/keys/… from the user it names. * Under a strict policy, the user signs its entry with only its keys changed, with a key it holds already (envelope::check takes that from the user itself), PUT to its own entry even without write on the registry; continuum-signed key-add and key-remove do so.
* envelope: a signed value names its swarmtv3 days1-1/+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: values sealed for their readerstv4 days1-0/+11
| | | | | | | | | | cs1.<age file>: a value encrypted with age to its readers' SSH keys, which no node decrypts. _continuum/access/sealed declares paths whose values must be sealed, for named readers or anyone; nodes check the recipients by age's key tags, at the API and on receipt. Auth plan M8, reworked: sealed values instead of containers, readers as users only (nodes hold no keys).
* access: signed values judged on receipttv4 days1-1/+5
| | | | | | | | | Inspection gives each operation's kind; under strict every node refuses, at a signed place, anything but an envelope that checks and replaces the one there (deleting first as replacing does), anything within one, and above one anything replacing what holds one. Auth plan M7.
* api: signed values at the storetv4 days1-6/+267
| | | | | | | | | PUT with application/continuum-signed writes an envelope where values are signed (403/409 saying why); reads open envelopes and name the signer (x-continuum-signed-by), ?raw=true shows them. Under strict, unsigned writes reaching a signed value and the users API are 409. Auth plan M7.
* signatures: changes signed by their nodetv4 days1-5/+27
| | | | | | | | | | Every node signs the changes it commits with its node key, an Ed25519 signature over the change's hash, kept beside the document. One signature on an actor's latest change vouches for its earlier ones. Protocol data and paths listed in _continuum/access/signed are signed, and writes with ?signed=true. Auth plan M5.
* access: the users endpointstv4 days1-65/+1
| | | | | | | | /admin/users: list, add (one or several), remove, disable, grant and revoke capabilities; each one change, refused if it would lock its writer out. Capabilities as the store's paths name them. Auth plan M1.
* access: keeping the swarm manageabletv4 days1-18/+96
| | | | | | | | | A write that would leave its own writer unable to manage users (deleting, disabling or narrowing its entry, removing the registry) is refused; --protocol-writers can set a registry right that nobody may manage any more. Auth plan M1.
* access: authorization at the APItv4 days1-30/+109
| | | | | | | | | 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.
* fixup 700, 701, 702tv8 days1-3/+3
|
* add stream heartbeattv8 days1-1/+21
|
* api: /stream & dashboard send X-Accel-Bufferingtv9 days1-0/+5
|
* api: drop $float as JSON number is OKtv9 days1-7/+8
|
* api: add type caststv9 days1-5/+45
|
* api: types are stickytv9 days1-43/+80
|
* api: add application/vnd.continuum.typed+jsontv9 days1-58/+68
|
* api: add application/vnd.continuum.* scalar typestv9 days1-77/+287
|
* api: add x-continuum-heads to writestv9 days1-20/+35
|
* api: add support for counterstv10 days1-2/+25
|
* api: allow reading past versionstv10 days1-8/+54
|
* record node ID and API user for every writetv10 days1-3/+9
|
* rename AutoMerge to Documenttv11 days1-1/+1
|
* api: unify media-type strippingtv11 days1-8/+4
|
* unify hex builderstv11 days1-7/+2
|
* api: unify error responsestv11 days1-28/+23
|
* api: unify store readstv11 days1-36/+22
|
* move store helpers to store moduletv11 days1-3/+93
|
* move ChangeSet from swarm to documenttv11 days1-2/+1
|
* unify path deleterstv11 days1-1/+1
|
* api: support list indexes in pathtv12 days1-22/+81
|
* add support to insert values at list indextv12 days1-15/+61
|
* api: add support for shallow store readstv12 days1-0/+37
|
* make clippy happy againtv2026-10-261-4/+4
|
* replace utoipa by static openapi.yamltv2026-10-261-70/+4
|
* add GET /stream endpointtv2026-10-261-2/+16
|
* only protocol-writers may modify _continuumtv2026-10-241-3/+9
|
* add heads to readstv2026-10-211-4/+28
| | | | | | | | | | GET /store?heads=true and GET /store/{key}?heads=true add the header x-continuum-heads (sorted, comma-separated hex). The heads come from the same moment as the read. - It's opt-in because reading the heads takes the write lock. Reads without the flag don't change. - Stale reads during a rejoin never carry heads.
* reorganize all the modulestv2026-10-211-2/+2
|
* serve stale reads during rejointv2026-10-201-12/+28
|
* cargo fmttv2026-10-191-1/+4
|
* initial committv2026-10-191-0/+359