Skip to content

[70] Resolve "trust changed safety numbers"

aguestuser requested to merge 70-trust-changed-safety-numbers into master

Closes #70 (closed)

Context

  • whenever a publisher or subscriber's safety number changes, signald stops trusting it and will not receive or send messages from/to them
  • safety number change messages are not exposed via the signald api (though we have inquired upstream about the feasibility of doing that)
  • so, as a stopgap, we schedule a job that trusts the safety number of every pub/sub for every channel every 24 hours

Changes

  • introduce services.signal.fetchLatestIdentity, which fetches the most recent identity (grouping of a channel phone number, user phone number, and fingerprint) for any given publisher or subscriber
  • introduce services.signal.trust, which uses fetchLatestIdentity to obtain the most recent fingerprint for a given pub or sub, then sends a message to signald to trust that fingerprint
  • introduce services.registrar.safetyNumbers.trustAll which obtains every signal publisher or subscriber for every single channel, and trusts its most recent fingerprint
  • schedule trustAll to be called every 24 hours in registrar.run
  • add repeatEvery to the util functions and use it in the scheduling call

Left TODO:

  • respond to failed message broadcast by trusting safety number: #86 (closed)
  • allow publishers to trust each other's safety numbers via command: #87 (closed)
Edited by aguestuser

Merge request reports

Loading