[VS-NfD] Warn or block when attaching files to classified pages #213

Closed
opened 2026-07-30 01:43:45 +02:00 by fable-5 · 1 comment
Collaborator

Plan reference: 20-massnahmenplan.md -> P1-2
ADR: ADR 0022
Effort: S (1 AT)
Depends on: #204

Context

Uploading to a classified page is the moment a user needs to be told what
they are doing — the file inherits a classification it cannot itself
carry (#212).

Current state

  • Upload path apps/api/src/files/files.service.ts with pond and page
    scoping; no classification-aware behaviour exists (the field arrives with
    #204).

Acceptance criteria

  • Uploading to a classified page shows a clear warning naming the
    consequence, in de and en.
  • An instance setting can turn the warning into a hard block, with a
    documented default.
  • Tests: warning shown for a classified page; block enforced
    server-side (not only in the UI) when enabled.
  • Hardening guide (#227) lists the setting.

Out of scope

Scanning file contents, and MIME/extension policy (already
upload.allowedExtensions / upload.svgPolicy).

**Plan reference:** `20-massnahmenplan.md` -> P1-2 **ADR:** ADR 0022 **Effort:** S (1 AT) **Depends on:** #204 ## Context Uploading to a classified page is the moment a user needs to be told what they are doing — the file inherits a classification it cannot itself carry (#212). ## Current state - Upload path `apps/api/src/files/files.service.ts` with pond and page scoping; no classification-aware behaviour exists (the field arrives with #204). ## Acceptance criteria - [ ] Uploading to a classified page shows a clear warning naming the consequence, in de and en. - [ ] An instance setting can turn the warning into a hard block, with a documented default. - [ ] Tests: warning shown for a classified page; block enforced server-side (not only in the UI) when enabled. - [ ] Hardening guide (#227) lists the setting. ## Out of scope Scanning file contents, and MIME/extension policy (already `upload.allowedExtensions` / `upload.svgPolicy`).
fable-5 added this to the M26 — VS-NfD: classification metadata milestone 2026-07-30 01:43:45 +02:00
fable-5 added the
area:storage
effort:S
vs-nfd
labels 2026-07-30 01:43:45 +02:00
Author
Collaborator

Done in PR #272 (commit 868b79c, CI run 561 green, fast-forward merged on Stefan's standing merge instruction).

Evidence:

  • The attachments panel of a classified page shows a persistent warning (de+en) naming the consequence: the file inherits the page's level, its content carries no marking (#212). Verified in the local attachments e2e pack (4/4 green).
  • New instance setting classification.uploadPolicy = warn | block (default warn, documented in the settings registry; admin-visible next to the classification default). block rejects uploads to classified pages SERVER-SIDE with 403 classified_upload_blocked - pinned by test (warn allows, block rejects, open pages unaffected under block).
  • Hardening-guide note posted on #227 (reference configuration should block).
Done in PR #272 (commit 868b79c, CI run 561 green, fast-forward merged on Stefan's standing merge instruction). Evidence: - The attachments panel of a classified page shows a persistent warning (de+en) naming the consequence: the file inherits the page's level, its content carries no marking (#212). Verified in the local attachments e2e pack (4/4 green). - New instance setting classification.uploadPolicy = warn | block (default warn, documented in the settings registry; admin-visible next to the classification default). block rejects uploads to classified pages SERVER-SIDE with 403 classified_upload_blocked - pinned by test (warn allows, block rejects, open pages unaffected under block). - Hardening-guide note posted on #227 (reference configuration should block).
Sign in to join this conversation.
No project
No Assignees
1 Participants
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: stwaidele/dorfteich#213
No description provided.