tf1055: tags and favourites follow their item; no tags across people (#1055, v0.6.384) #1067

Merged
Cordy merged 18 commits from tf1055 into main 2026-11-01 23:38:36 +00:00
Owner

Closes #1055 on release.

  • Security: tags were keyed by path, so two people with the same path saw each other's tags, and /tags/all listed everyone's. Tags, favourites and recents are now keyed by real location (internal/itemloc), re-gated on every read; viewers and Add files only devices cannot change tags on existing items; bound devices search and suggest only inside their folder.
  • Tags, favourites and recents follow their item on every surface (REST, WebDAV, editor, TUS, Deleted files, space rename/purge, owner transfer); copies carry tags; overwrites union tags.
  • One-time conversion to tags-v2.json, favorites-v2.json, recents-v2.json under a claim; a waiting instance serves its own converted copy; never blocked by the directory (local accounts known where the directory holds no such person, unknown groups attributed by the tag rules restricted to the person's grants, 10 s per-person lookup); background retries 30 min.
  • Docs: CHANGELOG v0.6.384, chart, file-browser, deployment, data-protection-operators, personal-data-export, ARCHITECTURE.

Waves W1-W3 reviewed, fix rounds applied, final review + research-backed fix (research-1055-b1) + focused re-review. Merged with v0.6.383.

Closes #1055 on release. - **Security:** tags were keyed by path, so two people with the same path saw each other's tags, and `/tags/all` listed everyone's. Tags, favourites and recents are now keyed by real location (`internal/itemloc`), re-gated on every read; viewers and Add files only devices cannot change tags on existing items; bound devices search and suggest only inside their folder. - Tags, favourites and recents follow their item on every surface (REST, WebDAV, editor, TUS, Deleted files, space rename/purge, owner transfer); copies carry tags; overwrites union tags. - One-time conversion to `tags-v2.json`, `favorites-v2.json`, `recents-v2.json` under a claim; a waiting instance serves its own converted copy; never blocked by the directory (local accounts known where the directory holds no such person, unknown groups attributed by the tag rules restricted to the person's grants, 10 s per-person lookup); background retries 30 min. - Docs: CHANGELOG v0.6.384, chart, file-browser, deployment, data-protection-operators, personal-data-export, ARCHITECTURE. Waves W1-W3 reviewed, fix rounds applied, final review + research-backed fix (research-1055-b1) + focused re-review. Merged with v0.6.383.
internal/itemloc (new): locations home:<user>/space:<id>/path plus the
path inside, the Matcher (NFC, fold only where the store folds case),
the backend Mapper, the per-person View, and Doc, a record-level JSON
document with a 10 s re-read window and a freeze (#742).

internal/tags: tags-v2.json keyed by location, every write one
Doc.Mutate; Get/Set/Find/All with reach, Follow (union, cap 20, OP5),
Copy, Pause/Resume (unparked rule), Remove, RemoveEntry, RemoveRoot,
Freeze/Thaw.

internal/api: Handler.Locs; locOf, itemLocs, itemView, writeConverting;
GET/PUT/find/all by location (PUT 403 read-only for view-only callers,
503 state-converting while frozen; find answers the caller's path with
tags; all only reachable tags); listing column and search's tag rank by
location; the REST Rekey and CopyTags calls removed (S7).

cmd/cairnd: tags-v2.json with the Matcher, one itemloc.Mapper wired to
the API and the export; the export lists only the person's own tags
(dxTagPath retired).
S1: tagsPut asks the store's WriteCheck (no folder Stat) after the
read-only check: an add-only device (#900) on an existing item gets 403
device-limited, its own file in the settle window passes, a paused
device is refused.

S2: pathsOf maps locations for tag: find and tags/all; a device bound
to a folder resolves it once and answers only locations at or under it
(segment-wise, NFC) as "/" plus the rest. A paused or moving device is
refused there too.

N1: tagsFind maps each location once (reach keeps the path).

S3: tagleak1055fx_test.go, posix and s3: a removed share, sibling
prefixes next to a grant, NFD and NFC across owner and recipient, a
same-named subfolder for two people, the device modes, and home, space
and share bound devices.
S1: a favourite or recent is dropped only on a not found; a grant
store failure or group references the directory cannot answer fail the
run (retried), except where they can never be known (OIDC without the
admin client, a departed person).
S2: an unparseable claim reads as a stale one; a failed run freezes the
stores with their -v2 files as they are, not empty.
N1: a delete inside an unregistered /spaces folder removes its entries.
N2: the hooks' stores are set under a lock (setStores).
N3: the wiring test checks the conversion's run and loop.
Merge v0.6.383 (#1063) into tf1055 (v0.6.384)
Some checks failed
ci / test-and-build (pull_request) Failing after 45m7s
9e34cbe97a
ci: run again (the runner pod was recreated without network to get.helm.sh)
All checks were successful
ci / test-and-build (pull_request) Successful in 43m56s
e80f67125b
Cordy merged commit 1690409d8f into main 2026-11-01 23:38:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1067
No description provided.