1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-05 05:17:40 +02:00
bitwarden-browser/libs
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
..
.vscode Multi root workspace tweaks (#2858) 2022-06-13 21:39:36 -05:00
admin-console create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
angular Browser MV3: Default store values to session storage (#8844) 2024-04-22 08:55:19 -04:00
auth Auth/PM-6689 - Migrate Security Stamp to Token Service and State Provider (#8792) 2024-04-19 16:44:24 -04:00
billing create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
common [PM-7653] Do not store disk-backed sessions as single blobs (#8852) 2024-04-22 10:14:38 -04:00
components [CL-218] Add new icons for extension refresh (#8805) 2024-04-19 16:11:12 -04:00
importer [PM-7304] Add missing i18n keys for import errors (#8743) 2024-04-17 16:19:06 +01:00
node [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
platform create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
shared [AC-2356] Use safeProvider in web core services module (#8521) 2024-04-08 07:59:12 +10:00
tools Move export.component from @bitwarden/angular to @bitwarden/vault-export-ui (#8514) 2024-03-27 17:02:56 +00:00
vault [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00