Page MenuHomePhabricator

[native][web] Don't stamp SQLite database until authoritative keyserver auth
AbandonedPublic

Authored by ashoat on Apr 16 2024, 12:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 2:32 AM
Unknown Object (File)
Sun, Dec 22, 2:32 AM
Unknown Object (File)
Sun, Dec 22, 2:32 AM
Unknown Object (File)
Mon, Dec 9, 2:17 AM
Unknown Object (File)
Wed, Nov 27, 5:11 PM
Unknown Object (File)
Nov 23 2024, 8:55 PM
Unknown Object (File)
Nov 3 2024, 10:36 AM
Unknown Object (File)
Oct 13 2024, 1:10 AM
Subscribers
None

Details

Reviewers
tomek
inka
Summary

This addresses ENG-7708.

Depends on D11668

Test Plan

I walked through the scenario that triggered the "Bad Credentials" bug (ENG-7450) and confirmed that it no longer occurred. Scenario is described here

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/data/sqlite-data-handler.js
150

The new changes will make this code clear the SQLite database when EITHER the authoritative keyserver cookie OR the currentUserInfo is unset. Theoretically that means the SQLite database might be cleared sooner or more often than before, but in practice I think it will be the same as before. The code in KeyserverConnectionHandler should make sure that we trigger a log out if the authoritative keyserver cookie is invalidated. Note that this should not prevent keyserver session recovery, since we defer invalidating the authoritative keyserver cookie in Redux until the recover fails

155

In D11534, @tomek updates the equivalent condition for web, but doesn't touch this one. It feels weird that they're inconsistent. Should I update this to match what we're doing on web?

native/data/sqlite-data-handler.js
141–143

can we use isLoggedInToKeyserver?

tomek added inline comments.
native/data/sqlite-data-handler.js
155

Yes, I think we should keep them consistent.

This revision is now accepted and ready to land.Apr 17 2024, 6:28 AM

More context in the task, but I'm abandoning this approach in favor of another, more idiomatic/clean one

native/data/sqlite-data-handler.js
155

I'll put up a separate diff for this

native/data/sqlite-data-handler.js
155