Page MenuHomePhabricator

Refactor olm-session-updater to enable to conditionally skip database content update
ClosedPublic

Authored by marcin on Jul 21 2023, 2:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 8:40 PM
Unknown Object (File)
Sat, Nov 23, 11:36 PM
Unknown Object (File)
Sat, Nov 23, 4:22 AM
Unknown Object (File)
Sat, Nov 23, 4:22 AM
Unknown Object (File)
Sun, Nov 10, 8:35 AM
Unknown Object (File)
Fri, Nov 8, 7:51 AM
Unknown Object (File)
Oct 13 2024, 4:33 AM
Unknown Object (File)
Oct 13 2024, 4:33 AM
Subscribers

Details

Summary

This differential refactors olm-session-updater so that oit takes optional lambda that tells, based on post encryption content, whether session state at the database should be updated. This will come in handy in a case when we are not sure
whether we will send encrypted data to somebody until we see encrypted content. An example will is teh case of large notifications. Before we decide whether we want to send full notification paylaod or blob ash with encryption key we must encrypt
notification. But if we encrypt notification, then decide to upload it to blob service and send to the client encrypted AES key with blob hash, the client will have to skip one olm key and will keep skipped key forever. However with the changes
introduced in this diff we can easily pass lambda that tells olm-session-updater not to update olm session if notification after encryption is larger than limits. This way we will encrypt AES key and blob hash with the same olm key that we initially
used to encrypt original notification and the client won't have to skip any key.

Test Plan

Currently this feature is not used so the test plan is to check that encrypted notifications work properly without any issues

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jul 25 2023, 5:32 AM