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
F3498454: D6790.id22885.diff
Thu, Dec 19, 9:12 PM
F3497623: D6790.id22755.diff
Thu, Dec 19, 7:30 PM
F3497586: D6790.id22955.diff
Thu, Dec 19, 7:12 PM
Unknown Object (File)
Thu, Dec 19, 4:06 PM
Unknown Object (File)
Wed, Dec 18, 8:10 PM
Unknown Object (File)
Wed, Dec 18, 7:43 PM
Unknown Object (File)
Sat, Dec 7, 3:53 AM
Unknown Object (File)
Oct 27 2024, 6:17 PM
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
No Lint Coverage
Unit
No Test Coverage

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

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

100

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