Skip to content

Add /admin/data/export endpoint returning a signed URL for the requesting user's data #597

Description

@thlpkee20-wq

Description

Fulfill GDPR-portability by adding POST /admin/data/export/:user_id which enqueues a background export and, when complete, emails the user a time-limited signed URL to their export bundle.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/routes/admin/dataExport.ts (new), src/workers/dataExport.ts (new)

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/gdpr-data-export
  • Implement changes
    • Enqueue background job producing NDJSON bundle to object storage
    • Sign a 48h URL with HMAC; email to user
    • Log audit entry with admin id, target user id, job id
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • export failure (retry with backoff), user with zero data, URL expired at click time
  • Include test output and security notes

Example commit message

feat: GDPR data export endpoint

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveStellar Wave issue batchbackendBackend scopefeatureNew feature worksecuritySecurity hardening and threat mitigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions