[Keyserver/rust-addon] Call identity deleteUser on account deletion
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>"} }'
Reviewers: varun, ashoat
Reviewed By: varun, ashoat
Subscribers: tomek, atul
Differential Revision: https://phab.comm.dev/D6790