[VS-NfD] Add SHA-256 integrity hashes for attachments #199
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#199
Loading…
Reference in New Issue
Block a user
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?
Plan reference:
20-massnahmenplan.md-> Phase 2 (pulled from roadmap)ADR: n/a
Effort: M (2–3 AT)
Depends on: —
Context
Integrity is the one security base function §52 VSA leaves to the
application in the sense of detecting manipulation of its own payloads —
a checksum is not a protection mechanism the platform can supply, because
only the application knows what the file should be. Side benefits:
orphan sweep, dedup, backup verification.
Current state
Attachmentmodel (apps/api/prisma/schema.prisma:530–559) carriesno checksum column; the only hashes in the schema are credential/token
hashes (
token_hash, session id,credential).apps/api/src/files/files.service.ts.Acceptance criteria
sha256column is added by migration; the hash is computed duringupload (streaming, not by re-reading the file) and stored.
error when it does not match; the mismatch is audited.
progress; unreadable files are reported, not silently skipped.
disk makes download fail; backfill is idempotent.
docs/architecture/security.md§"Content & upload security" and #229document the behaviour, including what an operator does when
verification fails.
Out of scope
Signatures (needs a signing identity — see ADR 0025), content
encryption (ADR 0019), and dedup by hash.
Implemented in PR #259 (commit
74970f6, CI run 522 green, fast-forward merged per Stefan's standing go-ahead for the M25 block).Evidence against the acceptance criteria:
CD verification (migration applies on stages) follows.