HomePhabricator
Diffusion Comm 4ac711b8ffa4

Initialize olm sessions for notifications on web and keyserver via socket…

Description

Initialize olm sessions for notifications on web and keyserver via socket requests

Summary: This differential initialises olm session for notifications on web via server request mechanism. The keyserver checks whether the web client has the olm session. If it doesn't it requests session intialisation. The web client uses the shared logic to get necessary keys from the keyserver and web specific logic to create the session and store it in IndexedDB.

Test Plan:

  1. Checkout to master.
  2. Log-out.
  3. Log-in.
  4. Checkout to the branch with this diff stack.

Then:

  1. Using mariadb console ensure that new olm session was created on the keyserver.
  2. Using Developer Tools ensure that new entry was created in IndexedDB and that it contains pickled olm session for notifs.
  3. Log-out.
  4. Using Developer Tools ensure that entry with olm session for notifs was removed (it is not implemented in this differential but this line(https://github.com/CommE2E/comm/blob/master/web/database/worker/db-worker.js#L154) should clear entire IndexedDB on log-out).

Reviewers: michal, kamil, atul

Reviewed By: michal, atul

Subscribers: ashoat, tomek, wyilio

Differential Revision: https://phab.comm.dev/D9535

Details

Provenance
marcinAuthored on Oct 19 2023, 3:23 AM
Reviewer
michal
Differential Revision
D9535: Initialize olm sessions for notifications on web and keyserver via socket requests
Parents
rCOMM3ffa0ab627e6: Move database encryption utils to generic location
Branches
Unknown
Tags
Unknown