Skip to content

feat: PII Export and Delete Workflow GDPR-ready (Issue #76)#768

Open
shaidshark wants to merge 4 commits intorohitdash08:mainfrom
shaidshark:feature/gdpr-pii-export
Open

feat: PII Export and Delete Workflow GDPR-ready (Issue #76)#768
shaidshark wants to merge 4 commits intorohitdash08:mainfrom
shaidshark:feature/gdpr-pii-export

Conversation

@shaidshark
Copy link
Copy Markdown

Implements Issue #76 — GDPR-ready PII Export and Delete Workflow.

Features:

  • GET /api/gdpr/export — Full user data export as JSON/ZIP (async for large datasets)
  • POST /api/gdpr/delete — Request deletion with 30-day grace period
  • POST /api/gdpr/confirm-delete — Confirm deletion after grace period
  • POST /api/gdpr/cancel-delete — Cancel pending deletion
  • GET /api/gdpr/status — Check export/deletion status

GDPR Compliance:

  • Art. 20: Right to data portability (machine-readable JSON export)
  • Art. 17: Right to erasure (30-day grace period, soft then hard delete)
  • Art. 12: Transparent communication (status endpoint)
  • Full audit trail for all GDPR actions
  • Async export jobs for large datasets via Redis queue

shaidshark added 4 commits April 3, 2026 13:03
- Fix hard delete order (dependent records before categories)
- Add AuditLog and AdImpression to deletion
- Wrap hard delete in transaction with rollback
- Remove cross-currency sum from dashboard (separate fix)
- Add missing model imports
…l tables

- Fix delete order: dependent records before categories (FK constraints)
- Add AdImpression and AuditLog to cleanup
- Wrap in try/except with rollback for atomicity
- Add synchronize_session=False for batch deletes
…hreadPoolExecutor

- Add AdImpression to imports in gdpr.py (was causing NameError)
- Replace threading.Thread with bounded ThreadPoolExecutor(max_workers=2)
  to prevent DoS via unbounded thread creation
- Addresses review feedback from rohitdash08#768
@shaidshark
Copy link
Copy Markdown
Author

Bounty submission — ready for review! All code review feedback from previous rounds has been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant