Page MenuHomePhabricator

[web] don't generate or send one time keys on login
ClosedPublic

Authored by varun on Mar 19 2024, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 7:58 PM
Unknown Object (File)
Mon, Apr 1, 9:14 PM
Unknown Object (File)
Mon, Apr 1, 4:52 PM
Unknown Object (File)
Sun, Mar 31, 8:33 AM
Unknown Object (File)
Sat, Mar 30, 5:40 PM
Unknown Object (File)
Mar 27 2024, 12:17 PM
Unknown Object (File)
Mar 26 2024, 2:20 PM
Unknown Object (File)
Mar 26 2024, 2:49 AM
Subscribers

Details

Summary

use getExistingDeviceKeyUpload to get the identity keys and prekeys, but not one time keys. note that we do want to generate/send one time keys in secondary device auth so i've left that method alone.

Depends on D11362

Test Plan

logged in from web and confirmed that no new one time keys were added to ddb

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun published this revision for review.Mar 19 2024, 6:39 PM
varun planned changes to this revision.

need to dedup a little

ashoat added 1 blocking reviewer(s): michal.

Would be great if @michal takes a look

web/account/account-hooks.js
207–239 ↗(On Diff #38274)

Are we using "primary" elsewhere? I thought it was content vs notifs

michal added inline comments.
web/account/account-hooks.js
207–239 ↗(On Diff #38274)

ENG-6659 tracks changing it for the crypto store. In my stack I already use content for the crypto store storage on the worker. The name "primary" is only kept in type LegacyCryptoStore which is only there so we can type the redux -> shared worker migration.

Unrelated to this, from what I have noticed when working on this code is that we also use "primary" in IdentityKeysBlob although I'm not sure how easily fixable this is as I think we sign this objects so this would change the signature?

web/shared-worker/worker/worker-crypto.js
231 ↗(On Diff #38274)

Sorry for the code duplication 🙏. Will try to land the rest of my stack as soon as possible.

This revision is now accepted and ready to land.Mar 22 2024, 9:15 AM
web/account/account-hooks.js
207–239 ↗(On Diff #38274)

this file is being removed completely in D11347 so i'm going to leave this as-is (consistent with useGetExistingDeviceKeyUpload below)

207–239 ↗(On Diff #38274)

you're right that it would change the signature if we renamed the key. probably not worth the effort to update IdentityKeysBlob, IMO