Skip to content

♻️ anonymise SecurityEvent/ImportRun identifiers on account deletion (LK-C04) - #138

Merged
Logan2234 merged 1 commit into
mainfrom
fix/lk-c04-purge-security-identifier
Aug 26, 2026
Merged

♻️ anonymise SecurityEvent/ImportRun identifiers on account deletion (LK-C04)#138
Logan2234 merged 1 commit into
mainfrom
fix/lk-c04-purge-security-identifier

Conversation

@Logan2234

Copy link
Copy Markdown
Owner

SecurityEvent.identifier and ImportRun.identifier denormalised the account's email at write time and were never cleared, so a deleted account's email survived indefinitely in these two audit tables — contradicting the privacy policy's stated retention. identifier is now only ever written for LOGIN_FAILED (a login attempt's raw target string, independent of any account); every other event type derives its display email from a join on userId at read time, so it anonymises itself the moment the FK is nulled by the account's deletion instead of needing an explicit purge step. Also corrects the privacy policy's "Données de sécurité" row, which described Loki/file log rotation rather than this table.

Closes https://github.com/Logan2234/loomkeep-roadmap/issues/8

…LK-C04)

SecurityEvent.identifier and ImportRun.identifier denormalised the account's
email at write time and were never cleared, so a deleted account's email
survived indefinitely in these two audit tables — contradicting the privacy
policy's stated retention. identifier is now only ever written for
LOGIN_FAILED (a login attempt's raw target string, independent of any
account); every other event type derives its display email from a join on
userId at read time, so it anonymises itself the moment the FK is nulled by
the account's deletion instead of needing an explicit purge step. Also
corrects the privacy policy's "Données de sécurité" row, which described
Loki/file log rotation rather than this table.
@Logan2234 Logan2234 self-assigned this Aug 26, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation api apps/api (NestJS) web apps/web (SvelteKit) shared packages/shared labels Aug 26, 2026
@Logan2234
Logan2234 merged commit 397382c into main Aug 26, 2026
14 of 15 checks passed
@Logan2234
Logan2234 deleted the fix/lk-c04-purge-security-identifier branch August 26, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api apps/api (NestJS) documentation Improvements or additions to documentation shared packages/shared web apps/web (SvelteKit)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant