Page MenuHomePhabricator

[identity] Allow UpdateDeviceList RPC to remove devices
ClosedPublic

Authored by bartek on Thu, Apr 18, 6:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 2:50 PM
Unknown Object (File)
Tue, Apr 30, 2:39 PM
Unknown Object (File)
Sat, Apr 27, 11:27 PM
Unknown Object (File)
Sat, Apr 27, 6:44 PM
Unknown Object (File)
Thu, Apr 25, 12:02 PM
Unknown Object (File)
Wed, Apr 24, 1:42 PM
Unknown Object (File)
Wed, Apr 24, 10:34 AM
Unknown Object (File)
Tue, Apr 23, 12:28 PM
Subscribers

Details

Summary

Updated device list validation logic. Added possibility to remove a device in UpdateDeviceList RPC.

Depends on D11686

Test Plan

Called the RPC with a few scenarios:

  • Add one device - pass
  • Add two devices - fails
  • Remove one device - pass
  • Remove two devices - fail
  • Remove primary device - fail
  • Both remove and add device - fail
  • Keep list unchanged - fail

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Fri, Apr 19, 3:41 AM
bartek added inline comments.
services/identity/src/device_list.rs
89–91 ↗(On Diff #39270)

Currently, the UpdateDeviceList RPC is used only when adding or [soon] logging out a secondary device.
In the future diffs, I'll add the possibility of e.g. replacing a secondary device with another one (replacing a keyserver when we already have one).

We don't do primary device switch with this RPC so it shouldn't be able to do this operation. There's a reason - we're switching primary device only with Identity-managed device list updates because we need to do it in sync with updating social proof for ETH users. Otherwise, we could end up with having social proof for device that is no longer the primary one.

bartek edited the test plan for this revision. (Show Details)
varun added inline comments.
services/identity/src/device_list.rs
67 ↗(On Diff #39270)
102 ↗(On Diff #39270)
This revision is now accepted and ready to land.Tue, Apr 23, 5:49 PM