Skip to content

sc: support `delete_account` command

context

  • currently, when a channel is destroyed, we destroy the signald keystore for its signal account by deleting all json blobs on the file system pertaining to that account
  • after migrating to signalc, these records will not be on the filesystem: they will be in our postgres-based AccontProtocolStore, so if we want to actually remove all record of the channel, we need a way to delete those
  • this MR adds support for a delete_account command, which signalboost can issue as part of the phoneNumber.destroy sequence to ask signalc to delete all protocol store records associated with the phone number being destroyed

behavior

WHEN a channel is destroyed

  • THEN a psql shell run immediately after the destruction will not be able to discover any metadata about the channel's signal phone number

implementation notes

  • upon receiving a SocketRequest.DeleteAccount request (which should have a username/accountId as a field) signalc should use the username as an account id and delete all records that have it as its primary key. eg:
    • a row in the accounts table
    • a row in the sessions, prekeys, signed_prekeys, and identities table
    • any associated indexes
  • vacuum job should run immediately
Edited by aguestuser
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information