HomePhabricator
Diffusion Comm 686154d7171e

[identity] Save initial device list to DDB

Description

[identity] Save initial device list to DDB

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

Reviewers: kamil, will, varun

Reviewed By: kamil, varun

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12091

Details

Provenance
bartekAuthored on May 16 2024, 3:13 AM
Reviewer
kamil
Differential Revision
D12091: [identity] Save initial device list to DDB
Parents
rCOMM9588b95bfa6a: [identity] Get and verify initial device list from registration requests
Branches
Unknown
Tags
Unknown