1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00
bitwarden-browser/libs/common/spec
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
..
matchers Ps/pm 5965/better config polling (#8325) 2024-03-27 10:03:09 -07:00
fake-account-service.ts [PM-7169][PM-5267] Remove auth status from account info (#8539) 2024-04-12 09:25:45 +02:00
fake-state-provider.ts Browser MV3: Default store values to session storage (#8844) 2024-04-22 08:55:19 -04:00
fake-state.ts [PM-6404] Fully Integrate clearOn Events (#8134) 2024-03-04 20:33:25 +00:00
fake-storage.service.ts Add eslint rule no-floating-promises (#7789) 2024-02-02 15:13:37 -05:00
index.ts [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
intercept-console.ts [PM-2132] Move all specs to the src directory (#5367) 2023-05-09 11:27:09 +02:00
observable-tracker.ts Ps/pm 5965/better config polling (#8325) 2024-03-27 10:03:09 -07:00
utils.ts [PM-5537] Biometric State Service (#7761) 2024-02-05 13:02:28 -05:00