Skip to content

[hotfix] add job to delete vestigal signald keystore entries on boot

context:

  • sometimes the effort to delete signald keystore entries fails b/c as a natural part of the lifecycle of the call to phoneNumberRegistrar.destroy, signald is still subscribed to a given phone number after we delete its keystore, and thus attempts to recreate the keystore entry to cache unsent message data in it
  • we would like to circle back and correct this mistake so that we don't accidentally wind up storing all the metadata in the keystore when we thought it had been deleted

change:

  • add a job that runs on boot to clear out all vestigal keystore entries, implemented thusly:
    • query {1} all phone numbers currently in use as signal accounts
    • query {2} all phone numbers with keystore entries on the filesystem
    • delete all numbers in set {2} but not in set {1}

Merge request reports