Page MenuHomePhabricator

[identity] Implement RestoreUser RPCs
ClosedPublic

Authored by bartek on Sep 2 2024, 11:43 PM.
Tags
None
Referenced Files
F3348547: D13226.id43848.diff
Fri, Nov 22, 3:07 PM
Unknown Object (File)
Wed, Nov 20, 11:44 AM
Unknown Object (File)
Sat, Nov 9, 3:18 PM
Unknown Object (File)
Sat, Nov 9, 2:44 PM
Unknown Object (File)
Sat, Nov 9, 7:58 AM
Unknown Object (File)
Oct 22 2024, 6:30 PM
Unknown Object (File)
Oct 22 2024, 6:29 PM
Unknown Object (File)
Oct 22 2024, 1:18 PM
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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sep 3 2024, 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.Sep 4 2024, 11:26 PM

Rebase on feedback: Merge RPCs into one