Skip to content

No execution path for GDPR/CCPA right-to-erasure despite a defined policy map #394

Description

@Abidoyesimze

src/privacy/dataMap.ts defines an erasure policy per model:

export const erasurePolicies = {
  Session: 'DELETE',
  WebhookSubscription: 'DELETE',
  AlertRule: 'DELETE',
  Transaction: 'ANONYMIZE',
  CostBasisLot: 'ANONYMIZE',
  FiatOrder: 'ANONYMIZE',
  ReferralConversion: 'ANONYMIZE',
  AuditBlock: 'IMMUTABLE',
  OutboxOp: 'IMMUTABLE',
}

Nothing else in the repo references erasurePolicies or dataMap (grep -rln "erasurePolicies" src tests returns only the definition file itself). There is no route, controller, or job that actually performs a GDPR/CCPA-style right-to-erasure request — the policy map is defined but has no execution path.

Task

  • Add an erasure job/endpoint (admin-triggered to start, self-service can follow) that, given a userId, walks erasurePolicies and applies DELETE/ANONYMIZE per model while leaving IMMUTABLE tables (audit chain, outbox) untouched.
  • Support a dry-run mode that reports what would be deleted/anonymized without writing.
  • Add tests covering each policy type and the immutable-table exclusion.

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions