Page MenuHomePhabricator

[identity] Implement RestoreUser RPCs
ClosedPublic

Authored by bartek on Sep 2 2024, 11:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 6:30 PM
Unknown Object (File)
Tue, Oct 22, 6:29 PM
Unknown Object (File)
Tue, Oct 22, 1:18 PM
Unknown Object (File)
Tue, Oct 22, 10:22 AM
Unknown Object (File)
Wed, Oct 16, 11:39 PM
Unknown Object (File)
Wed, Oct 16, 7:29 PM
Unknown Object (File)
Thu, Oct 10, 1:10 PM
Unknown Object (File)
Oct 4 2024, 12:36 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
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