Governance & compliance

GDPR export and cascade erasure

Collects or deletes the data tied to one user id across the engine, as part of a data-subject request.

BetaEngine edition 5f8ea3af

What it does

Two administrator routes. Export returns every record that references a user id. Erasure deletes the user record and every record, file and agent artefact that references the id, writes a summary audit record, and refuses to run while a legal hold covers that user.

How it works

POST /v1/gdpr/export takes a user_id and returns the user record, every entity whose top-level user_id, uploaded_by or actor field equals the id, file metadata and agent runs. It scans the engine in memory and refuses with an error when the engine holds more than 100,000 entities.

DELETE /v1/gdpr/user/:id deletes the user record, every entity whose top-level user_id field equals the id, including agents, agent runs and files, and removes file blobs through the file service. It then writes one audit_log record with the counts. If the id is under an active legal hold nothing is deleted, and the refusal is recorded as its own audit action. Both routes need an admin role or the global API key.

Deletion is a tombstone written through the engine's normal delete path. Earlier versions of the records stay in retained write-ahead log segments, in backups and in replica logs until those are trimmed or expire, and the audit entries about the user stay by design.

Where you reach it

  • HTTPPOST /v1/gdpr/export
  • HTTPDELETE /v1/gdpr/user/:id

Example

Export, then erase, one userbash
curl -s -X POST "$KYNETRA_URL/v1/gdpr/export" \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"<user id>"}'

curl -s -X DELETE "$KYNETRA_URL/v1/gdpr/user/<user id>" \
  -H "Authorization: Bearer $ADMIN_TOKEN"
# {"deleted": {"users": 1, "entities": 0, "files": 0, "agents": 0, "agent_runs": 0}}

Limits

  • Matching is by id in a top-level field: user_id on records, uploaded_by on files, actor on audit entries in the export. Data that links to a person through a nested field or an email address is not found.
  • The user step removes the platform account record by id. End-user accounts held in a project pool are not matched by that step, though records that carry the id in user_id are.
  • Both routes are admin-only. They scan the whole engine rather than one project, so they are not tenant-scoped; run them as a deliberate operator action. The export is refused above 100,000 entities, and its refusal message mentions a command-line exporter that does not exist in this release.
  • Backups already taken, replica logs and exports already delivered are not rewritten. Real erasure from those needs expiry or out-of-band key destruction.
  • Legal holds are honoured by the erasure, but there is no route to place or release one in this release.

Evidence

Test coverage is listed as present in the engine repository at this edition. This page does not report test results.

KynetraDB is in private preview

Request a preview to talk through the limits above against your own workload.