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)
Wed, May 22, 2:55 AM
Unknown Object (File)
Wed, May 22, 2:55 AM
Unknown Object (File)
Wed, May 22, 2:55 AM
Unknown Object (File)
Wed, May 22, 2:55 AM
Unknown Object (File)
Wed, May 22, 2:55 AM
Unknown Object (File)
Wed, May 22, 2:55 AM
Unknown Object (File)
Apr 8 2024, 9:54 PM
Unknown Object (File)
Apr 8 2024, 9:54 PM
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.