Page MenuHomePhabricator

[keyserver] mark OTKs as published before calling registerUser RPC
ClosedPublic

Authored by varun on Tue, Jun 18, 10:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 10:06 PM
Unknown Object (File)
Fri, Jun 28, 6:02 PM
Unknown Object (File)
Fri, Jun 28, 2:14 PM
Unknown Object (File)
Fri, Jun 28, 9:46 AM
Unknown Object (File)
Thu, Jun 27, 5:40 PM
Unknown Object (File)
Thu, Jun 27, 3:26 PM
Unknown Object (File)
Thu, Jun 27, 3:25 PM
Unknown Object (File)
Thu, Jun 27, 1:29 PM
Subscribers

Details

Summary

It's possible that publishing one-time keys to the identity service appears to fail to the client, but actually succeeds on the identity service.

If we don't mark the one-time keys as published in this scenario, we risk them being vended to a client by the identity service, and then re-uploaded again to the identity service. Since we don't keep track of used one-time keys in the identity service, this could result in the identity service vending the same one-time key to two different clients. Furthermore, the second client will fail to initialize a session, since the one-time key has already been used up.

To avoid this issue, our plan is to always mark one-time keys as published right before an attempt is made to publish them to the identity service.

Test Plan

disabled register RPC and confirmed that OTKs were marked as published

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable