Page MenuHomePhabricator

[Keyserver/rust-addon] Call identity deleteUser on account deletion
ClosedPublic

Authored by jon on Feb 20 2023, 1:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 3:53 AM
Unknown Object (File)
Oct 27 2024, 6:17 PM
Unknown Object (File)
Oct 23 2024, 10:12 AM
Unknown Object (File)
Oct 23 2024, 10:12 AM
Unknown Object (File)
Oct 23 2024, 10:12 AM
Unknown Object (File)
Oct 23 2024, 10:12 AM
Unknown Object (File)
Oct 18 2024, 3:26 AM
Unknown Object (File)
Oct 18 2024, 3:26 AM
Subscribers

Details

Summary

Integrate identity service's delete_user functionality
with Keyserver.

Part of https://linear.app/comm/issue/ENG-2764
Part of https://linear.app/comm/issue/ENG-2748

Depends on D6789

Test Plan
nix develop

comm-dev services start # start localstack

# Configure "aws" resources on localstack
(cd services/terraform && ./run.sh)

# start identity service and run mobile workflow
(cd services/identity && cargo run -- server &)
(cd keyserver && yarn dev &)
(cd native && yarn dev &)

(User exists in MySQL but not dynamodb use case)
Run either the iOS or Android client:

  • Create an account
  • Delete the account
  • Assert that the keyserver is still running, and identity service emits logs attempting to delete the user

(User exist in both MySQL and dynamodb)
Run either the iOS or Android client:

  • Create an account
  • Use TablePlus or other tool to find userID of your user
  • Seed a user:
    • aws dynamodb put-item --table-name identity-users --item '{"userID": {"S": "<USERID>"}}'
  • Verify user exists:
    • aws dynamodb get-item --table-name identity-users --key '{ "userID": {"S": "<USERID>"} }'
  • Delete account in App
  • Verify user has been deleted:
    • aws dynamodb get-item --table-name identity-users --key '{ "userID": {"S": "<USERID>"} }'

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Just a comment on the JS – won't request changes so that it stays on @varun's queue for the Rust side

keyserver/src/deleters/account-deleters.js
52 ↗(On Diff #22755)

Instead of blocking execution here, we can call getRustAPI here and hold on to the promise

100 ↗(On Diff #22755)

And then only block execution when we need to

rust part looks good! just make sure you address ashoat's comments before landing

This revision is now accepted and ready to land.Feb 21 2023, 10:21 AM

Apply proto changes to keyserver addon