When a user changes their FxA email address, we want to log it alongside the logging of relayed message activity, so we don't accidentally trigger a fraudulent alarm for a legitimate change of a relay recipient's email address.
- Register an FxA Attached Service Notification handler for change of profile data.
- Log the
profileDataChange event: H(real address)
- When relaying a message, log an
email_relay event: relay_address.id, H(real address), H(relay address)
- In the fraud-detection pipeline, detect when:
- An
email_relay event contains a different H(real address) value than the previous email_relay for the same H(relay address) AND
- There is no preceding
profileDataChange event for the H(real address)
- This signals that we are relaying emails to a new real address recipient, but there wasn't a change in the FXA primary email. Which could be fraudulent activity.