Skip to content

fix: Redact SSO PII before deletion#241

Draft
ktyagiapphelix2u wants to merge 1 commit into
release-ulmofrom
ktyagi/SSO
Draft

fix: Redact SSO PII before deletion#241
ktyagiapphelix2u wants to merge 1 commit into
release-ulmofrom
ktyagi/SSO

Conversation

@ktyagiapphelix2u
Copy link
Copy Markdown

@ktyagiapphelix2u ktyagiapphelix2u commented Apr 21, 2026

Description

Implements automatic PII redaction for UserSocialAuth records before deletion to prevent personally identifiable information from persisting in Snowflake soft-deleted records.

Problem

When users unlink SSO accounts or retire, the UserSocialAuth records are deleted from the LMS database but persist as soft-deleted records in Snowflake (via Fivetran) with the _fivetran_deleted flag. These soft-deleted records retained PII in the uid and extra_data fields, creating a data retention and privacy risk.

Solution

  • Added redact_user_social_auth_pii() utility function to redact PII before deletion
  • Implemented Django pre_delete signal handler to automatically redact PII for all deletion paths
  • Updated retire_user management command to explicitly call redaction before deletion
  • Redacted values: uid="redacted@retired.invalid", extra_data={}

Jira Ticket

https://2u-internal.atlassian.net/browse/BOMS-514

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.

2 participants