Skip to content

Account deletion sole-owner guard never fires; MFA/API-key credentials not cleaned #3425

Description

@Chris0Jeky

See coordinator findings S-AcctDel. Two gaps in AccountDeletionService: (1) The sole-owner guard scans BoardAccess rows with Owner role, but board creation sets only Board.OwnerId (no Owner row is ever created), so the guard never fires for normal owners — an owner can delete their account and permanently orphan boards (worse than #3424's reversible deactivation). Fix: guard on Boards owned via OwnerId (plus Owner-role rows). (2) MFA credentials (MfaCredentials.DeleteByUserIdAsync exists) and API keys are not deleted; the user row is anonymized in place so FK cascades never fire. API keys are functionally dead via the owner-active check, but MFA secrets linger — delete both, and clear MfaEnabled on the anonymized record. Deletion otherwise verified thorough (re-auth, transactional, token invalidation, PII scrub, cache invalidation).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority IIIValuable but unscheduled: residuals, tech-debt, performance, depth work.bugSomething isn't workingsecurityAuthentication, authorization, data protection, abuse prevention, and compliance-related changes.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions