Page MenuHomePhabricator

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

Authored by varun on Tue, Apr 23, 8:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 12:08 AM
Unknown Object (File)
Wed, May 1, 2:37 PM
Unknown Object (File)
Wed, May 1, 10:32 AM
Unknown Object (File)
Wed, May 1, 10:06 AM
Unknown Object (File)
Mon, Apr 29, 7:44 PM
Unknown Object (File)
Mon, Apr 29, 12:20 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
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.Tue, Apr 23, 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.Wed, Apr 24, 1:54 AM