Skip to content

πŸ”’ GDPR audit anonymize method + data providerΒ #3888

@PierreBrisorgueil

Description

@PierreBrisorgueil

Add an anonymize path for the retention-bound audit trail (today the repo can only hard-delete).

Scope

  • AuditRepository.anonymizeByUser β€” new method: updateMany({ userId }, { $set: { userId: null, ip: '', userAgent: '', metadata: {} } }) (the repo exposes only deleteMany today).
  • Register in audit.init.js, axis:'user', retention:'anonymize': export rows by userId only (never org-scoped β†’ no co-member leak); erase = anonymizeByUser (keep action + timestamp; never delete the trail).
  • Tolerate the audit model being absent when the module is deactivated.

DoD

  • anonymizeByUser repo unit test.
  • Provider keeps row count, nulls PII; export is userId-scoped.
  • /verify green.

Depends on: GDPR registry leaf.

Created via /dev:issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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