Commit Graph

883 Commits

Author SHA1 Message Date
Vicki League 6e34d1641c
css compatibility with extension code 2024-04-25 15:08:56 -04:00
Vicki League 9955d3ad86
cr feedback 2024-04-25 15:08:56 -04:00
Vicki League e465a522a0
doc updates 2024-04-25 15:08:55 -04:00
Vicki League 2c1dd2297b
translate string 2024-04-25 15:08:55 -04:00
Vicki League 2073842b97
fix doc code blocks 2024-04-25 15:08:54 -04:00
Vicki League 93a1cee96b
revert popout component change 2024-04-25 15:08:53 -04:00
Vicki League 7193d5b1e4
syntax and style improvements 2024-04-25 15:08:52 -04:00
Vicki League 9772aa52af
small docs update 2024-04-25 15:08:52 -04:00
Vicki League 71b5ee26f8
handle extension page structure better 2024-04-25 15:08:51 -04:00
Vicki League bb4064fbaa
fix double scrollbars 2024-04-25 15:08:51 -04:00
Vicki League 7a5a037ad4
restructure layout components to better match existing hierarchy 2024-04-25 15:08:50 -04:00
Vicki League af7841cfa1
styling updates for extension compatibility 2024-04-25 15:08:50 -04:00
Vicki League 77c876c4da
switch to focus-visible 2024-04-25 15:08:50 -04:00
Vicki League de58ed1f5c
add router workaround for story 2024-04-25 15:08:49 -04:00
Vicki League bd9f9b84d1
icon updates 2024-04-25 15:08:49 -04:00
Vicki League 3fd409b266
a11y improvements 2024-04-25 15:08:48 -04:00
Vicki League 90e62cf5ca
dark mode fixes, small docs addition 2024-04-25 15:08:48 -04:00
Vicki League eb1525d82b
first pass at docs, minor markup cleanup 2024-04-25 15:08:48 -04:00
Vicki League 1779fc7e88
api updates and cr feedback 2024-04-25 15:08:47 -04:00
Vicki League 5eeb672423
fix browser build 2024-04-25 15:08:47 -04:00
Vicki League 2f1ed4993f
move files and make separate template files 2024-04-25 15:08:46 -04:00
Matt Gibson e516eec200
Reintroduce null object remove rerouting (#8920)
* Reintroduce null object remove rerouting

* Test remove redirect
2024-04-25 14:55:45 -04:00
Ike 1e4158fd87
[PM-5735] Create kdf Service (#8715)
* key connector migration initial

* migrator complete

* fix dependencies

* finalized tests

* fix deps and sync main

* clean up definition file

* fixing tests

* fixed tests

* fixing CLI, Browser, Desktop builds

* fixed factory options

* reverting exports

* implemented UserKeyDefinition clearOn

* Initial Kdf Service Changes

* rename and account setting kdfconfig

* fixing tests and renaming migration

* fixed DI ordering for browser

* rename and fix DI

* Clean up Migrations

* fixing migrations

* begin data structure changes for kdf config

* Make KDF more type safe; co-author: jlf0dev

* fixing tests

* Fixed CLI login and comments

* set now accepts userId and test updates

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2024-04-25 11:26:01 -07:00
Justin Baur a6755f5f20
[PM-7687] Fix `reloadPopup` Recursion (#8902)
* Fix Message Sending Recursion

* Remove Change That Didn't Help

* Prefer `isExternalMessage` Guard

* Rollback Compare Change

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2024-04-24 16:54:16 -04:00
Jared Snider 5dc83cd34c
PM-6787 - Rename DeviceTrustCryptoService to DeviceTrustService (#8819) 2024-04-24 12:54:54 -04:00
Jared Snider a12c140792
Revert "Revert "Auth/PM-6689 - Migrate Security Stamp to Token Service and St…" (#8889)
This reverts commit 100b43dd8f.
2024-04-24 12:37:19 -04:00
Justin Baur 94fe9bd053
Remove `StateService` `useAccountCache` (#8882)
* Remove Account Cache from StateService

* Remove Extra Change

* Fix Desktop Build
2024-04-24 11:20:13 -04:00
Justin Baur 493b79b888
Only Run Migrations in True Background (#8548)
* Only Run Migrations in True Background

* Use `isPrivateMode`

* Use `popupOnlyContext`
2024-04-24 11:14:53 -04:00
github-actions[bot] bc43f3f78f
Autosync the updated translations (#8886)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-23 19:22:48 +00:00
Daniel James Smith 242ee306cf
Shorten extension description to 112 characters as that is a limit setup by Apple (#8884)
Safari extension description is limited to 112 chars
Add that restriction within the description

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-04-23 13:34:02 -05:00
github-actions[bot] ca38a5bc1f
Autosync the updated translations (#8878)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-23 15:29:47 +00:00
Bitwarden DevOps 714ca66f33
Bumped browser,cli,desktop,web version to (#8875) 2024-04-23 11:32:09 +00:00
Justin Baur 4afb5d04f0
Remove `alarms` Permission (#8866) 2024-04-22 17:14:14 -04:00
Justin Baur 33dae77a4d
Revert "Stop CryptoService from using `getBgService` (#8843)" (#8867)
This reverts commit e297798757.
2024-04-22 21:11:30 +00:00
Justin Baur e297798757
Stop CryptoService from using `getBgService` (#8843) 2024-04-22 16:54:41 -04:00
Cesar Gonzalez 29d4f1aad5
[PM-7660] Master Password Re-Prompt from Autofill Not Working (#8862) 2024-04-22 12:58:20 -05:00
Jared Snider 100b43dd8f
Revert "Auth/PM-6689 - Migrate Security Stamp to Token Service and State Prov…" (#8860)
This reverts commit 91f1d9fb86.
2024-04-22 12:06:43 -04:00
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
Matt Gibson b5362ca1ce
Browser MV3: Default store values to session storage (#8844)
* Introduce browser large object storage location.

This location is encrypted and serialized to disk in order to allow for storage of uncountable things like vault items that take a significant amount of time to prepare, but are not guaranteed to fit within session storage.

however, limit the need to write to disk is a big benefit, so _most_ things are written to storage.session instead, where things specifically flagged as large will be moved to disk-backed memory

* Store derived values in large object store for browser

* Fix AbstractMemoryStorageService implementation
2024-04-22 08:55:19 -04:00
Jared Snider 91f1d9fb86
Auth/PM-6689 - Migrate Security Stamp to Token Service and State Provider (#8792)
* PM-6689 - Add security stamp to Token state

* PM-6689 - Remove Security Stamp from account and state service

* PM-6689 - Add security stamp get and set to token service + abstraction + tests

* PM-6689 - Add migration for security stamp, test it, and register it with migrator

* PM-6689 - Update sync service + deps to use token service.

* PM-6689 - Cleanup missed usages of account tokens which has been removed.

* PM-6689 - Per PR feedback, remove unnecessary data migration as the security stamp is only in memory and doesn't need to be migrated.
2024-04-19 16:44:24 -04:00
Cesar Gonzalez 14cb4bc5aa
[PM-7581] Validate cache state from external contexts within LocalBackedSessionStorage (#8842)
* [PM-7581] Validate cache state from external contexts within LocalBackedSessionStorage

* [PM-7581] Continuing with exploring refining the LocalBackedSessionStorage

* [PM-7558] Fix Vault Load Times

* [PM-7558] Committing before reworking LocalBackedSessionStorage to function without extending the MemoryStorageService

* [PM-7558] Working through refinement of LocalBackedSessionStorage

* [PM-7558] Reverting some changes

* [PM-7558] Refining implementation and removing unnecessary params from localBackedSessionStorage

* [PM-7558] Fixing logic for getting the local session state

* [PM-7558] Adding a method to avoid calling bypass cache when a key is known to be a null value

* [PM-7558] Fixing tests in a temporary manner

* [PM-7558] Removing unnecessary chagnes that affect mv2

* [PM-7558] Removing unnecessary chagnes that affect mv2

* [PM-7558] Adding partition for LocalBackedSessionStorageService

* [PM-7558] Wrapping duplicate cache save early return within isDev call

* [PM-7558] Wrapping duplicate cache save early return within isDev call

* [PM-7558] Wrapping duplicate cache save early return within isDev call
2024-04-19 19:55:34 +00:00
github-actions[bot] a2fc666823
Autosync the updated translations (#8838)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-19 19:40:56 +00:00
Jonathan Prusik ec1af0cf9f
[PM-7610] [MV3] Guard overlay visibility and autofill on page load settings from awaiting indefinitely when there is no active account (#8833)
* guard overlay visibility and autofill on page load settings from awaiting indefinitely when there is no active account

* cleanup
2024-04-19 15:21:54 -04:00
Justin Baur 395ed3f5d4
[PM-7489] Introduce `MessageSender` & `MessageListener` (#8709)
* Introduce MessageSender

* Update `messageSenderFactory`

* Remove Comment

* Use BrowserApi

* Update Comment

* Rename to CommandDefinition

* Add More Documentation to MessageSender

* Add `EMPTY` helpers and remove NoopMessageSender

* Calm Down Logging

* Limit Logging On Known Errors

* Use `messageStream` Parameter

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Add eslint rules

* Update Error Handling

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

* Delete Lazy Classes In Favor of Observable Factories

* Remove Fido Messages

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2024-04-19 15:02:40 -04:00
Matt Gibson d55d240b18
Update host permission to all urls (#8831)
Discussions on this permission here: https://github.com/bitwarden/clients/pull/5985
2024-04-19 13:23:42 -04:00
Jared Snider fffef95c5e
Auth/PM-7235 - Refactor AuthService.getAuthStatus, deprecate everBeenUnlocked, and handle initialization of auto user key on client init (#8590)
* PM-7235 - AuthSvc - Refactor getAuthStatus to simply use the cryptoService.hasUserKey check to determine the user's auth status.

* PM-7235 - CryptoSvc - getUserKey - remove setUserKey side effect if auto key is stored. Will move to app init

* PM-7235 - For each client init service, add setUserKeyInMemoryIfAutoUserKeySet logic

* PM-7235 - CryptoSvc tests - remove uncessary test.

* PM-7235 - Create UserKeyInitService and inject into all init services with new listening logic to support acct switching.

* PM-7235 - UserKeyInitSvc - minor refactor of setUserKeyInMemoryIfAutoUserKeySet

* PM-7235 - Add test suite for UserKeyInitService

* PM-7235 - Remove everBeenUnlocked as it is no longer needed

* PM-7235 - Fix tests

* PM-7235 - UserKeyInitSvc - per PR feedback, add error handling to protect observable stream from being cancelled in case of an error

* PM-7235 - Fix tests

* Update libs/common/src/platform/services/user-key-init.service.ts

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Update libs/common/src/platform/services/user-key-init.service.ts

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* PM-7235 - AuthSvc - Per PR review, for getAuthStatus, only check user key existence in memory.

* PM-7235 - remove not useful test per PR feedback.

* PM-7235 - Per PR feedback, update cryptoService.hasUserKey to only check memory for the user key.

* PM-7235 - Per PR feedback, move user key init service listener to main.background instead of init service

* PM-7235 - UserKeyInitSvc tests - fix tests to plass

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-04-19 11:20:13 -04:00
Joseph Flinn 8cb16fb406
Make extension copy updates for Marketing (#8822) 2024-04-19 07:02:48 -07:00
github-actions[bot] ec1973b334
Autosync the updated translations (#8826)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-19 10:39:43 +00:00
Will Martin d5f503a0d6
[CL-18] toast component and service (#6490)
Update toast styles and new service to CL.
2024-04-18 13:23:35 -04:00
Cesar Gonzalez 9277465951
[PM-5744] Adjust Fido2 Content Script Injection to Meet mv3 Requirements (#8222)
* [PM-5876] Adjust LP Fileless Importer to Suppress Download with DOM Append in Manifest v3

* [PM-5876] Incorporating jest tests for affected logic

* [PM-5876] Fixing jest test that leverages rxjs

* [PM-5876] Updating documentation within BrowserApi.executeScriptInTab

* [PM-5876] Implementing jest tests for the new LP suppress download content scripts

* [PM-5876] Adding a change to webpack to ensure we do not package the mv2 side script for `lp-suppress-import-download.mv2.ts` if building the extension for mv3

* [PM-5876] Implementing changes based on feedback during code review

* [PM-5876] Implementing changes based on feedback during code review

* [PM-5876] Implementing changes based on feedback during code review

* [PM-5876] Implementing changes based on feedback during code review

* [PM-5876] Implementing a configuration to feed the script injection of the Fileless Importer CSV download supression script

* [PM-5744] Adjust injection of `page-script.ts` within FIDO 2 implementation to ensure mv3 compatibility

* [PM-5744] Adjusting structure of manifest.json to clean up implementation and ensure consistency between mv2 and mv3

* [PM-5744] Reverting inclusion of the ConsoleLogService

* [PM-4791] Injected content scripts prevent proper XML file display and disrupt XML responses

* [PM-5744] Adjust FIDO2 content script injection methodology to be compatible with manifest v3

* [PM-5744] Adjusting references to Fido2Service to mirror change of name to Fido2Background

* [PM-5744] Migrating runtime background messages that are associated with Fido2 into Fido2Background

* [PM-5744] Fixing named reference within Fido2Background

* [PM-5744] Migrating all Fido2 messages from the runtime.background.ts script to the fido2.background.ts script

* [PM-5744] Removing unnecessary dependency from runtime background

* [PM-5744] Removing unnecessary dependency from runtime background

* [PM-5744] Reworking how we handle init of Fido2Background

* [PM-5744] Reworking page-script.ts to ensure that it can destory its global values on unload

* [PM-5744] Reworking page-script.ts to ensure that it can destory its global values on unload

* [PM-5744] Implementing separated injection methodology between manifest v2 and v3

* [PM-4791] Adjsuting reference for Fido2 script injection to ensure it only triggers on https protocol types

* [PM-5744] Removing unnecessary message and handling reload of content scripts based on updates on observable

* [PM-5744] Refactoring content-script implementation for fido2

* [PM-5744] Refactoring content-script implementation for fido2

* [PM-5744] Reworking implementation to avoid having multiple contenType checks within the FIDO2 content scripts

* [PM-5744] Re-implementing the messageWithResponse within runtime.background.ts

* [PM-5744] Reverting change to autofill.service.ts

* [PM-5744] Removing return value from runtime.background.ts process message call

* [PM-5744] Reworking how we handle injection of the fido2 page and content script elements

* [PM-5744] Adjusting how we override the navigator.credentials request/reponse structure

* [PM-5744] Working through jest tests for the fido2Background implementation

* [PM-5744] Finalizing jest tests for the Fido2Background implementation

* [PM-5744] Stubbing out jest tests for content-script and page-script

* [PM-5744] Implementing a methodology that allows us to dynamically set and unset content scripts

* [PM-5744] Applying cleanup to page-script.ts to lighten the footprint of the script

* [PM-5744] Further simplifying page-script implementation

* [PM-5744] Reworking Fido2Utils to remove references to the base Utils methods to allow the page-script.ts file to render at a lower file size

* [PM-5744] Reworking Fido2Utils to remove references to the base Utils methods to allow the page-script.ts file to render at a lower file size

* [PM-5744] Implementing the `RegisterContentScriptPolyfill` as a separately compiled file as opposed to an import

* [PM-5744] Implementing methodology to ensure that the RegisterContentScript polyfill is not built in cases where it is not needed

* [PM-5744] Implementing methodology to ensure that the RegisterContentScript polyfill is not built in cases where it is not needed

* [PM-5744] Reverting package-lock.json

* [PM-5744] Implementing a methodology to ensure we can instantiate the RegisterContentScript polyfill in a siloed manner

* [PM-5744] Migrating chrome extension api calls to the BrowserApi class

* [PM-5744] Implementing typing information within the RegisterContentScriptsPolyfill

* [PM-5744] Removing any eslint-disable references within the RegisterContentScriptsPolyfill

* [PM-5744] Refactoring polyfill implementation

* [PM-5744] Refactoring polyfill implementation

* [PM-5744] Fixing an issue where Safari was not resolving the await chrome proxy

* [PM-5744] Fixing jest tests for the page-script append method

* [PM-5744] Fixing an issue found where collection of page details can trigger a context invalidated message when the extension is refreshed

* [PM-5744] Implementing jest tests for the added BrowserApi methods

* [PM-5744] Refactoring Fido2Background implementation

* [PM-5744] Refactoring Fido2Background implementation

* [PM-5744] Adding enums to the implementation for the Fido2 Content Scripts and working through jest tests for the BrowserApi and Fido2Background classes

* [PM-5744] Adding comments to the FIDO2 content-script.ts file

* [PM-5744] Adding jest tests for the Fido2 content-script.ts

* [PM-5744] Adding jest tests for the Fido2 content-script.ts

* [PM-5744] Adding jest tests for the Fido2 page-script.ts

* [PM-5744] Working through an attempt to jest test the page-script.ts file

* [PM-5744] Finalizing jest tests for the page-script.ts implementation

* [PM-5744] Applying stricter type information for the passed params within fido2-testing-utils.ts

* [PM-5744] Adjusting documentation

* [PM-5744] Adjusting implementation of jest tests to use mock proxies

* [PM-5744] Adjusting jest tests to simply implementation

* [PM-5744] Adjust jest tests based on code review feedback

* [PM-5744] Adjust jest tests based on code review feedback

* [PM-5744] Adjust jest tests based on code review feedback

* [PM-5744] Adjusting jest tests to based on feedback

* [PM-5744] Adjusting jest tests to based on feedback

* [PM-5744] Adjusting jest tests to based on feedback

* [PM-5744] Adjusting conditional within page-script.ts

* [PM-5744] Removing unnecessary global reference to the messager

* [PM-5744] Updating jest tests

* [PM-5744] Updating jest tests

* [PM-5744] Updating jest tests

* [PM-5744] Updating jest tests

* [PM-5744] Updating how we export the Fido2Background class

* [PM-5744] Adding duplciate jest tests to fido2-utils.ts to ensure we maintain functionality for utils methods pulled from platform utils

* [PM-5189] Addressing code review feedback

* [PM-5744] Applying code review feedback, reworking obserable subscription within fido2 background

* [PM-5744] Reworking jest tests to avoid mocking `firstValueFrom`

* [PM-5744] Reworking jest tests to avoid usage of private methods

* [PM-5744] Reworking jest tests to avoid usage of private methods

* [PM-5744] Implementing jest tests for the ScriptInjectorService and updating references within the Browser Extension to use the new service

* [PM-5744] Converting ScriptInjectorService to a dependnecy instead of a static class

* [PM-5744] Reworking typing for the ScriptInjectorService

* [PM-5744] Adjusting implementation based on feedback provided during code review

* [PM-5744] Adjusting implementation based on feedback provided during code review

* [PM-5744] Adjusting implementation based on feedback provided during code review

* [PM-5744] Adjusting implementation based on feedback provided during code review

* [PM-5744] Adjusting how the ScriptInjectorService accepts the config to simplify the data structure

* [PM-5744] Updating jest tests to cover edge cases within ScriptInjectorService

* [PM-5744] Updating jest tests to reference the ScriptInjectorService directly rather than the underlying ExecuteScript api call

* [PM-5744] Updating jest tests to reflect provided feedback during code review

* [PM-5744] Updating jest tests to reflect provided feedback during code review

* [PM-5744] Updating documentation based on code review feedback

* [PM-5744] Updating how we extend the abstract ScriptInjectorService

* [PM-5744] Updating reference to the frame property on the ScriptInjectionConfig
2024-04-18 16:05:16 +00:00