Page MenuHomePhabricator

[identity] Implement RestoreUser RPCs
ClosedPublic

Authored by bartek on Mon, Sep 2, 11:43 PM.
Tags
None
Referenced Files
F2707386: D13226.id43975.diff
Sun, Sep 15, 11:31 AM
Unknown Object (File)
Fri, Sep 13, 1:14 PM
Unknown Object (File)
Fri, Sep 13, 12:54 PM
Unknown Object (File)
Wed, Sep 11, 8:49 PM
Unknown Object (File)
Wed, Sep 11, 3:43 AM
Unknown Object (File)
Tue, Sep 10, 5:55 PM
Unknown Object (File)
Tue, Sep 10, 4:03 PM
Unknown Object (File)
Mon, Sep 9, 2:52 AM
Subscribers

Details

Summary

Address ENG-8212.

Implemented RPCs for backup restore. Added this all in one diff because the RPC calls existing code in sequence
and the whole flow is more obvious.

Depends on D13221, D13225

Test Plan

Registered a password and a wallet user. Verified that for both:

  • RPC fails if username/wallet address not found (cannot get user ID)
  • Fails if nonce / SIWE verification fails
  • The RPC verifies the device list (the last test case from D13222 is the only valid one)
  • The RPC updates device list and sets new primary device
  • The RPC performs device key upload
  • The RPC removes all old devices' data, OTKs and access tokens
  • The RPC returns new CSAT
  • For wallet users, social proof is updated in DDB

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.Tue, Sep 3, 12:09 AM
bartek added inline comments.
services/identity/src/client_service.rs
1368–1372 ↗(On Diff #43848)

I discovered that this allows us to avoid using .map_err(handle_db_error)?; everywhere. We can simply .await?;.
If you think this is okay, I can put up a diff which replaces all map_err with this

varun added inline comments.
services/identity/src/client_service.rs
1368–1372 ↗(On Diff #43848)

oh awesome, yeah that would be great, thanks

This revision is now accepted and ready to land.Wed, Sep 4, 11:26 PM

Rebase on feedback: Merge RPCs into one