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
F3579870: D11756.id39438.diff
Sun, Dec 29, 3:47 AM
F3579715: D11756.id39433.diff
Sun, Dec 29, 3:20 AM
F3572623: D11756.id39438.diff
Sat, Dec 28, 12:14 PM
F3572622: D11756.id39433.diff
Sat, Dec 28, 12:14 PM
F3572618: D11756.id.diff
Sat, Dec 28, 12:14 PM
F3572615: D11756.diff
Sat, Dec 28, 12:14 PM
F3572565: D11756.diff
Sat, Dec 28, 12:03 PM
Unknown Object (File)
Nov 8 2024, 9:10 AM
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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/identity/src/database/one_time_keys.rs
434

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

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