Page MenuHomePhabricator

Save encrypted payload hash in MariaDB keyserver for iOS notifs.
ClosedPublic

Authored by marcin on Sep 13 2023, 6:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 6:23 AM
Unknown Object (File)
Thu, Nov 14, 2:34 AM
Unknown Object (File)
Mon, Nov 11, 9:38 PM
Unknown Object (File)
Sat, Nov 9, 2:16 AM
Unknown Object (File)
Thu, Oct 31, 1:26 PM
Unknown Object (File)
Thu, Oct 31, 1:24 PM
Unknown Object (File)
Tue, Oct 29, 5:28 AM
Unknown Object (File)
Tue, Oct 29, 5:23 AM
Subscribers

Details

Summary

This differential saves encrypted payload hash for each encrypted iOS notification in MariaDB. Combined with the parent differential this differential enables us to check if there is a match between the hash of notification delivered to iOS device and notification sent from the keyserver.

Test Plan
  1. Build iOS app.
  2. Send notification.
  3. Check in MariaDB that there is an entry with delivery that contains non-empty array of sha 256 hashes.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-4886
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin edited the test plan for this revision. (Show Details)
keyserver/src/push/send.js
1052–1059 ↗(On Diff #31044)

It's good to always improve types when you touch them. Can this object be made read-only?

1105 ↗(On Diff #31044)

How will we know which encrypted payload hash corresponds to which device? What do you think of having an object pointing from deviceToken to the payload hash?

Accepting since my comments are minor, but if you disagree feel free to re-request review

This revision is now accepted and ready to land.Sep 13 2023, 10:05 AM
  1. Update typing
  2. Save device token to hash mapping instead of plain hash list.