Page MenuHomePhabricator

Encrypt notifications for Windows users with code version high enough to support this feature
ClosedPublic

Authored by marcin on Dec 5 2023, 5:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 3:16 PM
Unknown Object (File)
Nov 10 2024, 1:29 AM
Unknown Object (File)
Nov 10 2024, 1:19 AM
Unknown Object (File)
Nov 10 2024, 1:03 AM
Unknown Object (File)
Nov 9 2024, 11:07 PM
Unknown Object (File)
Nov 9 2024, 6:24 PM
Unknown Object (File)
Nov 9 2024, 1:39 PM
Unknown Object (File)
Oct 26 2024, 4:05 AM
Subscribers

Details

Summary

This differential uses encryption API implemented in parent differential to encrypt windows notifications assuming that the client passes introduced code version checks. Additionally a one-liner change is introduced in desktop code that enables Windows clients to handle encrypted notifications.

Test Plan
  1. Setup ngrok tunneling for http://localhost:3000
  2. Build windows desktop app following detailed instructions from: https://linear.app/comm/issue/ENG-5859/set-up-environment-for-windows-application-development
  3. Replace NEXT_CODE_VERSION in version-utils.js with 1 and all isStaffOrDev in cookies.js and send.js with true. (the reason is that to test Windows we have to use production build of the keyserver.
  4. Connect from Windows app to the keyserver. Ensure that new row in olm_sessions is created.
  5. Send notifications to Windows client. Ensure that version field of the row created in previous step increments with each notification and each notification is displayed correctly.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

marcin edited the test plan for this revision. (Show Details)
marcin requested review of this revision.Dec 5 2023, 5:47 AM
michal added inline comments.
keyserver/src/push/send.js
1310 ↗(On Diff #34274)

Theoretically we don't need to specify the web code version. If someone has a new desktop version we know that they will have at least the web version that was on production when the new desktop release was made (because they need to restart the app to get a desktop update).

As there are no changes to web required for Windows, when we make a new desktop release we can be sure that they will have at least the current web version.

This revision is now accepted and ready to land.Dec 6 2023, 4:20 AM
  1. Remove unecessary web: NEXT_CODE_VERSION
  2. Rebase before landing
  1. Remove unecessary web: NEXT_CODE_VERSION from cookies.js in Windows check.
  2. REbase before landing
This revision was landed with ongoing or failed builds.Dec 7 2023, 8:33 AM
This revision was automatically updated to reflect the committed changes.