Meta data last download entry on files. #423
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#423
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
— how can a “Last Downloader” of a file be tracked best? Scenario description: “someone leaks a file in our biotech startup, it is on reddit, we also downloaded the file from there again to check if it is truly our latest version. It is. Is there a possibility to see who leaked that information there technically? In the Audit log we see 10 people downloaded that specific file. Who was it?” Is there a implementation for this which is elegant, scalable, and not cost heavy on the Server-side?
Legality research: per-jurisdiction deployability of download marking
Research snapshot: 2026-09-07. This table reflects the law as researched on this date; jurisdictions change their rules — treat entries older than this date as a starting point, not a current answer. Engineering research for product design, not legal advice; operators must verify locally before enabling.
What is being assessed: the feature as designed — off by default, embeds a pseudonymous random id (never a name; the id→person mapping stays on the operator's own server), disclosed to the operator with an explicit inform-your-users warning, admin-gated trace tool whose every use is itself audited, marks pruned with the audit log's retention. These properties are what keeps most of the world out of the red: nothing here is covert, content-revealing, or continuous behavioural surveillance — it is a per-download confidentiality measure.
Bottom line: no researched jurisdiction outright bans this design. The buckets are: 🟢 enable + inform users, 🟡 concrete prerequisites first, 🔴 conditionally blocked until a third party agrees (works councils / consent regimes) — the closest thing to a "hard no" that exists, and it is procedural, not absolute.
🟡→🔴 Strongest prerequisites (deployment blocked until satisfied)
🟡 Prerequisites (documented process, then enable)
🟢 Enable + inform (notice is the requirement)
Why the design keeps the map this green
Sources (principal): ICO monitoring-workers guidance; EDÖB + SECO ArGV3 Art. 26 Wegleitung; BetrVG §87 / ArbVG §96 / WOR commentary; NSW Workplace Surveillance Act 2005 s10; Ontario ESA e-monitoring policy; Quebec Law 25 analyses; PIPC/PIPA and KVKK workplace-monitoring practice notes; PDPC Singapore employment guidance; LGPD & POPIA employment analyses; UAE/KSA PDPL employer guidance; US state notice statutes (CT/DE/NY).
Shipped in v0.6.137 (PR #444), live on both dogfoods.
Decision record
What shipped. Runtime toggle Mark downloads for leak tracing (Settings → Audit, nested under Record access events, off by default, gated on the audit toggle at runtime — marks without an access trail are half-blind). Every authenticated download of PDF/docx/xlsx/pptx/PNG/JPEG carries a
CAIRNMARK1.<cm-id>.<sig>token: random pseudonymous id + HMAC-SHA256 signature from a per-instance 32-byte secret, never a name. The id→download record (user, path, time, size) lives in an append-only marks ledger (monthly JSONL beside the audit log, pruned withaudit.retainMonths). New Trace tab: drop a leaked copy → the one download it originates from, with a Query-prefill link for the full candidate list; distinct cards for pruned-ledger, foreign-signature, and no-mark results. Tracing is admin-gated and audits itself asmark-trace(newmarksverb group in the registry, so the #433 tripwire covers it).Design decisions, with reasons:
storage.Driver.Openreturnsio.ReadSeekCloser; every format's marked form is expressed as ≤3 segments (inner ranges + literals) — PDF trailing comment, zip EOCD comment, PNG tEXt before IEND, JPEG COM after SOI. O(1) memory, seek-preserving, sohttp.ServeContentand WebDAV range requests keep working. A container that does not validate is served untouched — marking must never corrupt a download.download-markedaudit event would duplicate every read event. Only the trace action gets a verb.Statnot wrapped. Listings report the original size; the marked transit copy differs by a few dozen bytes. Wrapping Stat would be a consistency trap (the stored object is unchanged). Sync-client caveat documented in the handbook.Legality (your point 5): full per-jurisdiction table (research snapshot 2026-09-07) in the comment above, now permanently in
docs/handbook/leak-tracing.mdtogether with a model user notice. No researched jurisdiction outright bans the design; DE/AT/NL-style works-council consent is the strongest gate, and the toggle carries the amber warning in all four languages. Default-off + pseudonymous id + non-covert purpose + audited trace is what keeps the map green.Verified live:
cairn_build_info{version="v0.6.137"}on files.c0rdyceps.ch; both dogfood pods rolled. Wiki Home has the release entry.