HomePhabricator
Diffusion Comm 458a0db0527a

[web-db] implement clearing sensitive data

Tags
None
Referenced Files
F512391: image.png
May 11 2023, 4:02 AM
File Not Attached
F512390: image.png
May 11 2023, 4:02 AM
File Not Attached
F512389: image.png
May 11 2023, 4:02 AM
File Not Attached
F512388: image.png
May 11 2023, 4:02 AM
File Not Attached
Subscribers
None

Description

[web-db] implement clearing sensitive data

Summary: Initial version of hook responsible for handling sensitive data.

Test Plan:
Tested on both web and desktop

  1. Make sure the user is logged out and there is no opened app
    • IndexedDB storage should be empty

image.png (642×656 px, 68 KB)

  • And view shared workers (in Chrome it's URL chrome://inspect/#workers) and there shouldn't be anything connected to localhost.

image.png (283×1 px, 37 KB)

  1. Log in
    • console should log Database initialization success
    • check indexedDB content

image.png (694×693 px, 95 KB)

  • see if worker was spawned

image.png (297×1 px, 33 KB)

    • see Worker logs (it's separate console)
    • it should say Creating fresh database - Db version: 0
  1. Close the tab
    • worker should die (not listed)
  2. Open the tab
    • console should log Database initialization success
    • see if worker was spawned
    • see Worker logs - it should say Database exists and is properly encrypted, using persisted data
    • Log out
    • IndexedDB content should be deleted
    • worker is alive until tab is opened

Reviewers: michal, tomek, marcin

Reviewed By: tomek, marcin

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D7191

Details

Provenance
kamilAuthored on Mar 27 2023, 3:42 AM
Reviewer
tomek
Differential Revision
D7191: [web-db] implement clearing sensitive data
Parents
rCOMMa0f5b4115446: [web-db] stop supporting Safari
Branches
Unknown
Tags
Unknown