Skip to content

Backend: Add GDPR data export and deletion endpoints #337

@CelestinaBeing

Description

@CelestinaBeing

Summary

Trivela collects wallet addresses and campaign activity data. While wallet addresses are pseudonymous, GDPR and similar privacy regulations require platforms to provide data export and deletion upon user request — especially relevant as Trivela targets EU users in the Stellar ecosystem.

Problem

  • No data export endpoint for users to download their data
  • No deletion endpoint to remove user-associated records
  • Audit logs reference wallet addresses which may constitute personal data in some jurisdictions

Acceptance Criteria

  • Add GET /api/v1/user/:walletAddress/export — returns all data associated with a wallet address:
  • Add DELETE /api/v1/user/:walletAddress — pseudonymizes wallet address in all records (replace with [REDACTED:sha256_prefix])
  • Both endpoints require wallet signature auth (issue Backend: Add wallet-signature-based auth for campaign creation/management #302) to prevent abuse
  • Add rate limiting: max 3 export/delete requests per day per wallet
  • Log all data export and deletion requests in audit log (with redacted wallet)
  • Add unit tests for export completeness and deletion pseudonymization
  • Add GDPR section to docs/DEPLOYMENT.md

References

  • backend/src/dal/auditLogRepository.js
  • backend/src/middleware/apiKeyAuth.js

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions