Page MenuHomePhabricator

[identity] Save initial device list to DDB
ClosedPublic

Authored by bartek on May 17 2024, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 1:17 PM
Unknown Object (File)
Mon, Nov 11, 8:42 AM
Unknown Object (File)
Sun, Nov 10, 10:07 PM
Unknown Object (File)
Sat, Nov 2, 12:53 AM
Unknown Object (File)
Sat, Nov 2, 12:52 AM
Unknown Object (File)
Sat, Nov 2, 12:51 AM
Unknown Object (File)
Sat, Nov 2, 12:38 AM
Unknown Object (File)
Fri, Nov 1, 12:59 PM
Subscribers

Details

Summary

Final server-side part for initial device list. If it is present, a new register_primary_device() is called, which is very similiar to existing add_device() but stores the received device list instead of generating a new one. Also, it requires previous device list to be empty and doesn't perform the reoredering.

Depends on D12090

Test Plan

After each of below actions, called GetDeviceListHistoryForUser RPC:

  • Registered password user without initial device list - the list was generated by Idenitity (previous behavior)
  • Registered password user with initial device list - the list was stored along with signature
  • Registered wallet user with initial device list - the list was stored along with signature

The RPC failed:

  • Sent initial device list that was invalid JSON
  • Without signature
  • With invalid signature
  • With more than 1 device
  • With device ID not being the ed25519 from device key upload
  • With lastPrimarySignature being present

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.May 17 2024, 1:54 AM
kamil added inline comments.
services/identity/src/database.rs
174 ↗(On Diff #40320)

might be good to add comment explaining this

This revision is now accepted and ready to land.May 23 2024, 6:32 AM