bitwarden-estensione-browser/apps/browser/src/platform
Matt Gibson 300b17aaeb
[PM-7653] Do not store disk-backed sessions as single blobs (#8852)
* Implement a lazy value class

This will be used as a source for composing key-protected storage from a single key source.

* Simplify local-backed-session-storage

The new implementation stores each value to a unique location, prefixed with `session_` to help indicate the purpose.

I've also removed the complexity around session keys, favoring passing in a pre-defined value that is determined lazily once for the service worker. This is more in line with how I expect a key-protected storage would work.

* Remove decrypted session flag

This has been nothing but an annoyance. If it's ever added back, it needs to have some way to determine if the session key matches the one it was written with

* Remove unnecessary string interpolation

* Remove sync Lazy

This is better done as a separate class.

* Handle async through type

* prefer two factory calls to incorrect value on races.

* Fix type

* Remove log

* Update libs/common/src/platform/misc/lazy.ts

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-04-22 10:14:38 -04:00
..
alarms [PM-5880] Refactor browser platform utils service to remove `window` references (#7885) 2024-03-06 16:33:38 +00:00
background/service-factories [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
browser [PM-5744] Adjust Fido2 Content Script Injection to Meet mv3 Requirements (#8222) 2024-04-18 16:05:16 +00:00
decorators [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
listeners [PM-7581] Validate cache state from external contexts within LocalBackedSessionStorage (#8842) 2024-04-19 19:55:34 +00:00
messaging [PM-7489] Introduce `MessageSender` & `MessageListener` (#8709) 2024-04-19 15:02:40 -04:00
offscreen-document [PM-5743] Implement eslint rule for usage of window object in background script (#7849) 2024-03-29 15:55:23 +00:00
popup [PM-7169][PM-5267] Remove auth status from account info (#8539) 2024-04-12 09:25:45 +02:00
services [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
state Browser MV3: Default store values to session storage (#8844) 2024-04-22 08:55:19 -04:00
storage Browser MV3: Default store values to session storage (#8844) 2024-04-22 08:55:19 -04:00
utils [PM-7489] Introduce `MessageSender` & `MessageListener` (#8709) 2024-04-19 15:02:40 -04:00
background.html Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
background.ts [PM-7581] Validate cache state from external contexts within LocalBackedSessionStorage (#8842) 2024-04-19 19:55:34 +00:00
flags.ts [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
globals.d.ts [PM-5880] Refactor browser platform utils service to remove `window` references (#7885) 2024-03-06 16:33:38 +00:00