Page MenuHomePhabricator

[keyserver] Use verifyUserLoggedIn instead of fetchIdentityInfo in versionResponseValidator
ClosedPublic

Authored by ashoat on Jan 18 2024, 11:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 12:18 AM
Unknown Object (File)
Sun, Jun 23, 11:25 PM
Unknown Object (File)
Thu, Jun 20, 12:48 AM
Unknown Object (File)
Wed, Jun 12, 1:44 AM
Unknown Object (File)
Tue, Jun 11, 10:09 AM
Unknown Object (File)
Tue, Jun 11, 10:09 AM
Unknown Object (File)
Tue, Jun 11, 10:09 AM
Unknown Object (File)
Sat, Jun 8, 3:53 AM
Subscribers

Details

Summary

verifyUserLoggedIn returns the same thing as fetchIdentityInfo. The difference is that verifyUserLoggedIn will attempt identity login if the identity info is not present in MariaDB.

This makes it a bit more convenient to be able to eg. clear the identity info from MariaDB to force a re-login, which came up in ENG-6466.

Test Plan
  1. Flow
  2. Careful reading of the code for verifyUserLoggedIn
  3. An observation of what happened when I restarted my keyserver after clearing the identity info from MariaDB (restart triggered running verifyUserLoggedIn)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

i wonder if we should use verifyUserLoggedIn instead of fetchIdentityInfo in other places as well (keyserverAuthResponder, publishPrekeysToIdentity)

This revision is now accepted and ready to land.Jan 18 2024, 11:45 AM

Good call. Also got uploadNewOneTimeKeys

Update other fetchIdentityInfo callsites to verifyUserLoggedIn