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)
Tue, Oct 22, 4:58 PM
Unknown Object (File)
Tue, Oct 22, 4:58 PM
Unknown Object (File)
Tue, Oct 22, 4:58 PM
Unknown Object (File)
Tue, Oct 22, 4:58 PM
Unknown Object (File)
Sun, Oct 13, 11:47 PM
Unknown Object (File)
Sep 5 2024, 11:53 PM
Unknown Object (File)
Sep 5 2024, 11:53 PM
Unknown Object (File)
Sep 5 2024, 11:53 PM
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