HomePhabricator
Diffusion Comm d33e4c4fba27

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

Description

[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

Details

Provenance
jonAuthored on Feb 15 2023, 8:52 PM
Reviewer
varun
Differential Revision
D6790: [Keyserver/rust-addon] Call identity deleteUser on account deletion
Parents
rCOMM053c9fc02762: [Keyserver] Move shared identity client resources to lib.rs
Branches
Unknown
Tags
Unknown