Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -42,6 +42,74 @@ The defaults apply to application data, operational evidence, generated artifact
| Audit, impersonation, and security events | Security and audit evidence | Keep restricted audit trails needed for security investigation and accountability; minimize actor/target personal fields and apply access controls. | Add audit retention basis, impersonation review, access logging, and redacted export behavior. |
| Plugin-candidate surfaces | Plugin-candidate review | Treat knowledge-base, workflow, app-engine, form, portal, site, prompt/AI, help-desk, analytics, feature-flag, onboarding, and similar candidate data as personal until classified. | Require per-candidate classification before migration, export, deletion, pause/resume, or provider sync work. |
## Tenant hard-delete: what survives (AK-P21, decided 2026-07-21)
The tenant hard-delete erases processor data (GDPR Art. 28(3)(g)); the tenant is
the controller for it and secures its own retention obligations through the
export offered before deletion. A small set of rows survives because HiveGrid is
the controller for them under its own legal basis. Those rows are kept, but
their free-text personal data is stripped in the `tenant.minimize-retained-pii`
step of the deletion job.
| Surface | Basis for keeping it | Retention period | What is minimized |
| --- | --- | --- | --- |
| Support tickets and their messages | GDPR Art. 6(1)(f) — defence against claims (§ 195 BGB) | 3 years after tenant erasure, then purged | Subject, message, message bodies, sender email, source URL |
| In-app feedback | GDPR Art. 6(1)(f) — defence against claims | 3 years after tenant erasure, then purged | Message, source URL |
| Impersonation audit | GDPR Art. 5(2) accountability + Art. 32 security | Indefinite | Nothing to minimize — carries identifiers and timestamps only |
| Audit events and hash-chain checkpoints | Integrity of the tamper-evident audit trail | Per audit retention policy | Tenant row is reduced to an anonymized skeleton so foreign keys stay valid |
These entries must be mirrored in the record of processing activities; the code
side is enforced by `TENANT_DELETION_RETAINED_MODELS` and the lifecycle/grant
parity test. The 3-year period is enforced by the tenant-deletion cron: each
daily pass also erases the retained support rows of tenants whose hard delete
completed longer ago than `GDPR_SUPPORT_RETENTION_DAYS`.
## Feedback attachments (AK-P21, decided 2026-07-21)
The in-app feedback widget originally specified a "screenshot checkbox". That
was **deliberately not built**. Instead the reporter attaches an image
themselves.
Rationale: a client-side capture of the current page routinely contains
personal data of **third parties** (contacts, projects) that the reporter never
consciously selected, and moves it from the tenant (controller) to the platform
operator. Letting the reporter pick the file keeps the disclosure a conscious
act and satisfies data minimisation (Art. 5(1)(c)).
Contract:
| Aspect | Rule |
| --- | --- |
| Who captures | The reporter. The client never rasterises or screen-captures on its own. |
| Accepted | One image per feedback (PNG, JPEG, WebP, GIF), max 5 MB. |
| Rate limit | Inherited from the feedback widget: 3 submissions per 24 h. |
| Malware | Untrusted upload: fail-closed magic-bytes allow-list before the storage PUT, then ClamAV via the file-scan queue (`infra/STANDARDS.md` §13). The file stays `scanStatus=pending` until the worker clears it. |
| Storage | Regular tenant-scoped `File` plus a `FileEntityLink` with `entityType=support_ticket`. Tenant-less feedback cannot carry an attachment, because `File.tenantId` is `NOT NULL`. |
| Retention | Follows the support ticket it belongs to (3 years, see the table above). Revisit if attachments turn out to carry more third-party data than the ticket text. |
### Operator access to an attachment
The tenant media proxy (`app/:tenant/media/...`) cannot serve these files: a
platform operator is not necessarily a member of the tenant that owns the file,
so that route's membership check denies it. Operators therefore have their own
route, `admin/support/attachments/:ticketId/:fileId`, which is deliberately
narrower than a general operator file proxy.
| Aspect | Rule |
| --- | --- |
| Scope | Serves only a file that is linked to the named support ticket. It can never address an arbitrary tenant file. |
| Identity | Platform-admin only. |
| Scan gate | Fail-closed: only an explicit `clean` verdict is deliverable, so an operator cannot open a file ClamAV has not yet cleared. |
| Tenant binding | `FileEntityLink` has no operator escape in its RLS policy, so the lookup binds the owning tenant via `withTenantRLS`. |
| Delivery | 302 to a short-lived signed URL (AD-23); the bucket stays private. |
| Audit | Every download is an `admin.support.attachmentDownloaded` AuditEvent, written **before** the URL is issued. A read that cannot be audited is refused. |
| Denials | Always 404, never 403 (Bauprinzip A.5.3), and with an empty body, so probing ids reveals nothing. |
The audit entry carries no operator-typed reason: unlike the destructive
operator actions, this is a read reached by clicking the file in the ticket the
operator is already working. If that turns out to be too weak a control, the
next step is a mandatory reason prompt on the link, not a change to the route.
## Erasure and deletion handling
- Deletion workflows must distinguish active product records, soft-deleted records, generated artifacts, provider-held data, and restricted audit/accounting exceptions.