Privacy & GDPR

RelataDB provides first-class data subject rights management: data subject access requests (DSAR), erasure (cryptographic and physical), consent registers, and retention policies.

Data Subject Access Request (DSAR)

Export all data associated with a subject:

# CLI
relata dsar --subject user@example.com
 
# HTTP
curl "http://localhost:9090/gdpr/dsar?subject=user@example.com" \
  -H "Authorization: Bearer $RELATA_BEARER_TOKEN"

The response includes every row across every type where the subject's identifier appears, plus the provenance chain for each row.

Erasure

Cryptographic erasure

The data root key (DRK) for a tenant is destroyed in the KMS. All data encrypted under that key becomes permanently unreadable — no row-by-row deletion needed. This is the fastest path for a full-tenant right-to-be-forgotten.

curl -X POST http://localhost:9090/gdpr/erase \
  -H "Authorization: Bearer $RELATA_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subject":"user@example.com","scope":"all"}'

Physical erasure

For per-subject erasure, the system closes the subject's rows (valid_to = now) and removes them from all indexes (FTS, vector, graph, identity). Bi-temporal history is preserved for audit — the row's provenance chain survives, but the PII fields are cryptographically shredded.

Media erasure

Face/voice biometric templates are removed from the searchable index, and media blobs are deleted from S3. This is critical for biometric data under GDPR Article 17.

Every query may carry a PURPOSE tag that is matched against a consent register:

PURPOSE 'marketing'
SELECT name, email FROM Person WHERE id = 'p1'

If the subject has not consented to 'marketing', the query returns zero rows for that subject. Consent is managed as governed rows and can be withdrawn at any time.

Retention policies

EndpointMethodDescription
/retention/policiesGETList policies
/retention/holdsGETList legal holds
/retention/holdsPOSTPlace a legal hold
/retention/holds/:caseDELETELift a legal hold
/retention/wormGETList WORM policies

Legal holds prevent retention enforcement on held data, even if the retention period has expired.

See also