Skip to content

fix: Redact SSO PII before deletion#38425

Open
ktyagiapphelix2u wants to merge 4 commits intoopenedx:masterfrom
ktyagiapphelix2u:ktyagi/SSOPII
Open

fix: Redact SSO PII before deletion#38425
ktyagiapphelix2u wants to merge 4 commits intoopenedx:masterfrom
ktyagiapphelix2u:ktyagi/SSOPII

Conversation

@ktyagiapphelix2u
Copy link
Copy Markdown
Contributor

@ktyagiapphelix2u ktyagiapphelix2u commented Apr 23, 2026

Description

Implements automatic PII redaction for UserSocialAuth records before deletion to prevent personally identifiable information from persisting after records are removed.

Problem

When users unlink SSO accounts or are retired, UserSocialAuth records are deleted from the LMS database. However, sensitive data in fields like uid and extra_data could still persist indirectly (e.g., in logs, backups, or downstream systems), creating a data retention and privacy risk.

Solution

Added redact_user_social_auth_pii() utility function to sanitize sensitive data before deletion
Implemented a Django pre_delete signal handler to automatically redact PII across all deletion paths
Updated the retire_user management command to explicitly invoke redaction prior to deletion
Redacted values:
uid = "redacted@redacted.com"
extra_data = {}

Jira Ticket

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

@ktyagiapphelix2u ktyagiapphelix2u marked this pull request as ready for review April 23, 2026 11:29
@ktyagiapphelix2u ktyagiapphelix2u requested a review from a team as a code owner April 23, 2026 11:29
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