Page MenuHomePhabricator

[identity] delete all data for user from otks table on account deletion
ClosedPublic

Authored by varun on Apr 23 2024, 8:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 8 2024, 9:10 AM
Unknown Object (File)
Nov 3 2024, 2:37 AM
Unknown Object (File)
Nov 3 2024, 2:37 AM
Unknown Object (File)
Nov 3 2024, 2:37 AM
Unknown Object (File)
Nov 3 2024, 2:37 AM
Unknown Object (File)
Oct 12 2024, 5:56 AM
Unknown Object (File)
Oct 11 2024, 4:51 PM
Unknown Object (File)
Oct 10 2024, 5:40 PM
Subscribers

Details

Summary

get all of the device IDs for the user from the devices table. then call the method introduced in previous diff to delete all OTKs for each device

https://linear.app/comm/issue/ENG-7920/one-time-keys-are-not-deleted-during-logout-delete-rpcs

Depends on D11755

Test Plan

logged in and uploaded OTKs from multiple devices. then deleted my account on my native device and confirmed that all the OTKs were removed from staging DDB

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

services/identity/src/database/one_time_keys.rs
434 ↗(On Diff #39433)

maybe i should introduce a new helper that returns a list of delete requests and call that helper from both delete_otks_table_rows_for_user and delete_otks_table_rows_for_user_device.

my current implementation doesn't really use the batch write API efficiently

varun requested review of this revision.Apr 23 2024, 8:54 PM
bartek added inline comments.
services/identity/src/database/one_time_keys.rs
434 ↗(On Diff #39433)

I don't think it's worth it. Delete user operation isn't something done often.
Actually, one bigger batch of DeleteItem operations would be split into chunks of 25 so it wouldn't make a big difference.

This revision is now accepted and ready to land.Apr 24 2024, 1:54 AM