1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-04 11:55:58 +02:00
Commit Graph

706 Commits

Author SHA1 Message Date
SmithThe4th
a12c7242d6
load collections after ngOninit has run (#8691) 2024-04-12 14:53:26 +01:00
Kyle Spearrin
59392418d1
[PM-7280] Check command args for disabled updater (#8613)
* dont autoupdate on older OS and with args

* remove os release checking

* use dashes
2024-04-11 14:14:56 -04:00
SmithThe4th
c2b91d2d46
[PM-4700] Fixed issue with clearing search index state (#8686)
* fixed issue with clearing search index state

* Decrease snap description character length to reach 128 limit (#8687)

* clear user index before account is totally cleaned up

* [AC-2436] Fix flashing unassigned items banner (#8689)

* Fix flashing banner for users who shouldn't see it

* Emit the right value the first time

* simplify further

* restore comment

* added logout clear on option

* removed redundant clear index from logout

---------

Co-authored-by: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-11 17:53:16 +01:00
Joseph Flinn
9b022d2fc0
Decrease snap description character length to reach 128 limit (#8687) 2024-04-11 00:40:53 +00:00
Bitwarden DevOps
4607ae73c0
Bumped browser,desktop version to (#8684) 2024-04-10 21:45:31 +00:00
Bitwarden DevOps
83fef10c4c
Bumped desktop version to (#8683) 2024-04-10 21:31:20 +00:00
Jake Fink
94bfdf2f9c
add snap description (#8672) 2024-04-10 13:02:59 -04:00
SmithThe4th
2bce6c538c
[PM-6194] Refactor injection of services in browser services module (#8380)
* refactored injector of services on the browser service module

* refactored the search and popup serach service to use state provider

* renamed back to default

* removed token service that was readded during merge conflict

* Updated search service construction on the cli

* updated to use user key definition

* Reafctored all components that refernce issearchable

* removed commented variable

* added uncommited code to remove dependencies not needed anymore

* added uncommited code to remove dependencies not needed anymore
2024-04-10 14:02:46 +01:00
Daniel García
9fb3e9b3ee
Fix issues with invalid locale for appx (#8665) 2024-04-10 15:00:25 +02:00
Jake Fink
9d10825dbd
[PM-5362] Add MP Service (attempt #2) (#8619)
* create mp and kdf service

* update mp service interface to not rely on active user

* rename observable methods

* update crypto service with new MP service

* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests

* update auth service and finish strategies

* auth request refactors

* more service refactors and constructor updates

* setMasterKey refactors

* remove master key methods from crypto service

* remove master key and hash from state service

* missed fixes

* create migrations and fix references

* fix master key imports

* default force set password reason to none

* add password reset reason observable factory to service

* remove kdf changes and migrate only disk data

* update migration number

* fix sync service deps

* use disk for force set password state

* fix desktop migration

* fix sso test

* fix tests

* fix more tests

* fix even more tests

* fix even more tests

* fix cli

* remove kdf service abstraction

* add missing deps for browser

* fix merge conflicts

* clear reset password reason on lock or logout

* fix tests

* fix other tests

* add jsdocs to abstraction

* use state provider in crypto service

* inverse master password service factory

* add clearOn to master password service

* add parameter validation to master password service

* add component level userId

* add missed userId

* migrate key hash

* fix login strategy service

* delete crypto master key from account

* migrate master key encrypted user key

* rename key hash to master key hash

* use mp service for getMasterKeyEncryptedUserKey

* fix tests

* fix user key decryption logic

* add clear methods to mp service

* fix circular dep and encryption issue

* fix test

* remove extra account service call

* use EncString in state provider

* fix tests

* return to using encrypted string for serialization
2024-04-09 20:50:20 -04:00
github-actions[bot]
2145a37fd4
Autosync the updated translations (#8645)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-09 09:27:55 +00:00
renovate[bot]
8b00897638
[deps] Platform: Update Rust crate thiserror to v1.0.58 (#8187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 09:53:46 +02:00
Oscar Hinton
7064b595da
[SM-1031] Remove SecretsManager & showDDG compile flags (#8610)
Remove old compile flags which should no longer be required, and may even cause issues. secretsManager: false hides the app switcher which is now used for more than just secrets manager.
2024-04-08 17:46:24 +02:00
github-actions[bot]
29880606b4
Autosync the updated translations (#8625)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2024-04-08 06:00:55 +00:00
Addison Beck
6df52262a9
Clear provider state on logout (#8563) 2024-04-05 13:10:55 -05:00
Addison Beck
2ff990edd2
Update policy service to clear its own state (#8564) 2024-04-05 13:10:24 -05:00
Victoria League
09169cac71
[CL-254] Rename 500 colors to 600 to prep for UI redesign (#8623)
* [CL-254] Rename 500 colors to 600 to prep for UI redesign

---------

Co-authored-by: Will Martin <contact@willmartian.com>
2024-04-05 10:58:32 -04:00
Jake Fink
775c8a1bbe
Revert "[PM-5362]Create MP Service for state provider migration (#7623)" (#8617)
This reverts commit b1abfb0a5c.
2024-04-04 16:17:09 +00:00
Jake Fink
b1abfb0a5c
[PM-5362]Create MP Service for state provider migration (#7623)
* create mp and kdf service

* update mp service interface to not rely on active user

* rename observable methods

* update crypto service with new MP service

* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests

* update auth service and finish strategies

* auth request refactors

* more service refactors and constructor updates

* setMasterKey refactors

* remove master key methods from crypto service

* remove master key and hash from state service

* missed fixes

* create migrations and fix references

* fix master key imports

* default force set password reason to none

* add password reset reason observable factory to service

* remove kdf changes and migrate only disk data

* update migration number

* fix sync service deps

* use disk for force set password state

* fix desktop migration

* fix sso test

* fix tests

* fix more tests

* fix even more tests

* fix even more tests

* fix cli

* remove kdf service abstraction

* add missing deps for browser

* fix merge conflicts

* clear reset password reason on lock or logout

* fix tests

* fix other tests

* add jsdocs to abstraction

* use state provider in crypto service

* inverse master password service factory

* add clearOn to master password service

* add parameter validation to master password service

* add component level userId

* add missed userId

* migrate key hash

* fix login strategy service

* delete crypto master key from account

* migrate master key encrypted user key

* rename key hash to master key hash

* use mp service for getMasterKeyEncryptedUserKey

* fix tests
2024-04-04 14:22:41 +00:00
renovate[bot]
d12953ff72
[deps] Platform: Update @types/node to v18.19.29 (#8262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-04 09:49:15 +02:00
renovate[bot]
b53b211bd4
[deps]: Lock file maintenance (#7700)
* [deps]: Lock file maintenance

* Fix jest breaking changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2024-04-03 15:48:04 +02:00
Oscar Hinton
a4475e8232
[PM-6418] Fix environment selector on desktop (#8046)
Fix environment selector being broken on desktop. When selecting self-hosted and filling in a url, the selector fails to update when returning and instead produces the following console error.
2024-04-02 20:31:12 +00:00
renovate[bot]
11c40036e2
[deps] Platform: Update Rust crate arboard to v3.3.2 (#8186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 11:22:57 +02:00
Jared Snider
c202c93378
Auth/PM-5268 - DeviceTrustCryptoService state provider migration (#7882)
* PM-5268 - Add DEVICE_TRUST_DISK to state definitions

* PM-5268 - DeviceTrustCryptoService - Get most of state provider refactor done - WIP - commented out stuff for now.

* PM-5268 - DeviceTrustCryptoServiceStateProviderMigrator - WIP - got first draft of migrator in place and working on tests. Rollback tests are failing for some reason TBD.

* PM-5268 - more WIP on device trust crypto service migrator tests

* PM-5268 - DeviceTrustCryptoServiceStateProviderMigrator - Refactor based on call with platform

* PM-5268 - DeviceTrustCryptoServiceStateProviderMigrator - tests passing

* PM-5268 - Update DeviceTrustCryptoService to convert over to state providers + update all service instantiations / dependencies to ensure state provider is passed in or injected.

* PM-5268 - Register new migration

* PM-5268 - Temporarily remove device trust crypto service from migrator to ease merge conflicts as there are 6 more migrators before I can apply mine in main.

* PM-5268 - Update migration numbers of DeviceTrustCryptoServiceStateProviderMigrator based on latest migrations from main.

* PM-5268 - (1) Export new KeyDefinitions from DeviceTrustCryptoService for use in test suite (2) Update DeviceTrustCryptoService test file to use state provider.

* PM-5268 - Fix DeviceTrustCryptoServiceStateProviderMigrator tests to use proper versions

* PM-5268 - Actually fix all instances of DeviceTrustCryptoServiceStateProviderMigrator test failures

* PM-5268 - Clean up state service, account, and login strategy of all migrated references

* PM-5268 - Account - finish cleaning up device key

* PM-5268 - StateService - clean up last reference to device key

* PM-5268 - Remove even more device key refs. *facepalm*

* PM-5268 - Finish resolving merge conflicts by incrementing migration version from 22 to 23

* PM-5268 - bump migration versions

* PM-5268 - DeviceTrustCryptoService - Implement secure storage functionality for getDeviceKey and setDeviceKey (to achieve feature parity with the ElectronStateService implementation prior to the state provider migration). Tests to follow shortly.

* PM-5268 - DeviceTrustCryptoService tests - getDeviceKey now tested with all new secure storage scenarios. SetDeviceKey tests to follow.

* PM-5268 - DeviceTrustCryptoService tests - test all setDeviceKey scenarios with state provider & secure storage

* PM-5268 - Update DeviceTrustCryptoService deps to actually use secure storage svc on platforms that support it.

* PM-5268 - Bump migration version due to merge conflicts.

* PM-5268 - Bump migration version

* PM-5268 - tweak jsdocs to be single line per PR feedback

* PM-5268 - DeviceTrustCryptoSvc - improve debuggability.

* PM-5268 - Remove state service as a dependency on the device trust crypto service (woo!)

* PM-5268 - Update migration test json to correctly reflect reality.

* PM-5268 - DeviceTrustCryptoSvc - getDeviceKey - add throw error for active user id missing.

* PM-5268 - Fix tests

* PM-5268 - WIP start on adding user id to every method on device trust crypto service.

* PM-5268 - Update lock comp dependencies across clients

* PM-5268 - Update login via auth request deps across clients to add acct service.

* PM-5268 - UserKeyRotationSvc - add acct service to get active acct id for call to rotateDevicesTrust and then update tests.

* PM-5268 - WIP on trying to fix device trust crypto svc tests.

* PM-5268 - More WIP device trust crypto svc tests passing

* PM-5268 - Device Trust crypto service - get all tests passing

* PM-5268 - DeviceTrustCryptoService.getDeviceKey - fix secure storage b64 to symmetric crypto key conversion

* PM-5268 - Add more tests and update test names

* PM-5268 - rename state to indicate it was disk local

* PM-5268 - DeviceTrustCryptoService - save symmetric key in JSON format

* PM-5268 - Fix lock comp tests by adding acct service dep

* PM-5268 - Update set device key tests to pass

* PM-5268 - Bump migration versions again

* PM-5268 - Fix user key rotation svc tests

* PM-5268 - Update web jest config to allow use of common spec in user-key-rotation-svc tests

* PM-5268 - Bump migration version

* PM-5268 - Per PR feedback, save off user id

* PM-5268 - bump migration version

* PM-5268 - Per PR feedback, remove unnecessary await.

* PM-5268 - Bump migration verson
2024-04-01 16:02:58 -04:00
Justin Baur
94843bdd8b
[PM-5956] Delete Unused State (#8439)
* Delete Unused State

* Delete One More

* Add Migration to Delete InstalledVersion

* Update Error
2024-04-01 15:36:39 -04:00
rr-bw
2e51d96416
[PM-5264] Implement StateProvider in LoginEmailService (#7662)
* setup StateProvider in LoginService

* replace implementations

* replace implementation

* remove stateService

* change storage location for web to 'disk-local'

* implement migrate() method of Migrator

* add RememberedEmailMigrator to migrate.ts

* add rollback

* add tests

* replace implementation

* replace implementation

* add StateProvider to Desktop services

* rename LoginService to RememberEmailService

* update state definition

* rename file

* rename to storedEmail

* rename service to EmailService to avoid confusion

* add jsdocs

* refactor login.component.ts

* fix typos

* fix test

* rename to LoginEmailService

* update factory

* more renaming

* remove duplicate logic and rename method

* convert storedEmail to observable

* refactor to remove setStoredEmail() method

* move service to libs/auth/common

* address floating promises

* remove comment

* remove unnecessary deps in service registration
2024-03-30 11:00:27 -07:00
SmithThe4th
3a830789ba
[PM-5884] Allow deletion of passkey from edit view - clients (#8500)
* add remove button for passkeys during edit

* added live region to announce when a passkey is removed

* removed announce passkey removed by SR

* removed unused variable
2024-03-29 10:06:50 -04:00
Ike
3d19e3489c
[PM-5269] Key Connector state migration (#8327)
* 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

* Update KeyConnector MIgration

* updated migrator and tests to match profile object

* removed unused service and updated clear

* dep fix

* dep fixes

* clear usesKeyConnector on logout
2024-03-28 12:50:24 -04:00
Jake Fink
bd6b3266d4
move auth request notification to service (#8451)
- cleanup hanging promises
2024-03-28 09:34:21 -04:00
Matt Gibson
37735436d1
Move biometric texts all to getters (#8520)
We cannot load biometric text on init because they are not valid everywhere. This was causing issues with settings storage on linux.
2024-03-28 07:53:20 -04:00
github-actions[bot]
f30116b34d
Autosync the updated translations (#8525)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-28 11:06:17 +00:00
Oscar Hinton
2edc156dd6
[STRICT TS] Migrate platform abstract services functions (#8527)
We currently use a callback syntax for abstract services. This syntax isn't completely strict compliant and will fail the strictPropertyInitialization check. We also currently don't get any compile time errors if we forget to implement a function.

To that end this PR updates all platform owned services to use the appropriate abstract keyword for non implemented functions. I also updated the fields to be actual functions and not properties.
2024-03-28 12:01:09 +01:00
Thomas Rittson
d10c14791d
[AC-2329] [BEEEP] Use safeProvider in desktop services module (#8457) 2024-03-27 18:44:08 -04:00
Matt Gibson
62ad39e697
Ps/pm 5965/better config polling (#8325)
* Create tracker that can await until expected observables are received.

* Test dates are almost equal

* Remove unused class method

* Allow for updating active account in accout service fake

* Correct observable tracker behavior

Clarify documentation

* Transition config service to state provider

Updates the config fetching behavior to be lazy and ensure that any emitted value has been updated if older than a configurable value (statically compiled).

If desired, config fetching can be ensured fresh through an async.

* Update calls to config service in DI and bootstrapping

* Migrate account server configs

* Fix global config fetching

* Test migration rollback

* Adhere to implementation naming convention

* Adhere to abstract class naming convention

* Complete config abstraction rename

* Remove unnecessary cli config service

* Fix builds

* Validate observable does not complete

* Use token service to determine authed or unauthed config pull

* Remove superfluous factory config

* Name describe blocks after the thing they test

* Remove implementation documentation

Unfortunately the experience when linking to external documentation is quite poor. Instead of following the link and retrieving docs, you get a link that can be clicked to take you out of context to the docs. No link _does_ retrieve docs, but lacks indication in the implementation that documentation exists at all.

On the balance, removing the link is the better experience.

* Fix storybook
2024-03-27 10:03:09 -07:00
Daniel James Smith
64d6f6fef3
Move export.component from @bitwarden/angular to @bitwarden/vault-export-ui (#8514)
Move export.component
Export from @bitwarden/vault-export-ui
Fix imports on browser, desktop and web

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-27 17:02:56 +00:00
Jared Snider
a66e224d32
Auth/PM-7072 - Token Service - Access Token Secure Storage Refactor (#8412)
* PM-5263 - TokenSvc - WIP on access token secure storage refactor

* PM-5263 - Add key generation svc to token svc.

* PM-5263 - TokenSvc - more progress on encrypt access token work.

* PM-5263 - TokenSvc TODO cleanup

* PM-5263 - TokenSvc - rename

* PM-5263 - TokenSvc - decryptAccess token must return null as that is a valid case.

* PM-5263 - Add EncryptSvc dep to TokenSvc

* PM-5263 - Add secure storage to token service

* PM-5263 - TokenSvc - (1) Finish implementing accessTokenKey stored in secure storage + encrypted access token stored on disk  (2) Remove no longer necessary migration flag as the presence of the accessTokenKey now serves the same purpose.

Co-authored-by: Jake Fink <jfink@bitwarden.com>

* PM-5263 - TokenSvc - (1) Tweak return structure of decryptAccessToken to be more debuggable (2) Add TODO to add more error handling.

* PM-5263 - TODO: update tests

* PM-5263 - add temp logs

* PM-5263 - TokenSvc - remove logs now that I don't need them.

* fix tests for access token

* PM-5263 - TokenSvc test cleanup - small tweaks / cleanup

* PM-5263 - TokenService - per PR feedback from Justin - add error message to error message if possible.

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

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-03-26 18:41:14 -04:00
renovate[bot]
bd0e3dd0aa
[deps] Platform: Update napi (#8470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 17:25:21 +01:00
Oscar Hinton
8639f494f3
[PM-7048] Disable relaunch on MAS (#8466) 2024-03-25 15:22:04 +01:00
Bitwarden DevOps
bc9a888116
Bumped browser,cli,desktop,web version to 2024.3.1 (#8467) 2024-03-25 14:18:17 +00:00
github-actions[bot]
9243bb92c7
Autosync the updated translations (#8460)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-25 10:24:46 +00:00
Daniel James Smith
eea4d5407d
Add the missing languages to the translation.service (#8459)
This enables it being shown as anm option with the language selector on the individual clients

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-25 11:12:32 +01:00
Oscar Hinton
51f46e797c
[PM-5571] Migrate enableDDG to state provider framework (#8384)
Migrate enableDuckDuckGo to state provider framework.
2024-03-22 13:32:03 -04:00
Oscar Hinton
f70639d792
[PM-6983] Disable hardware acceleration for bad GPUs (#8427)
* Disable hardware acceleration on mac app store when amd switchable is true

* Only apply fix on iMacs
2024-03-22 14:31:36 +01:00
Oscar Hinton
ad588f15bf
[PM-6978] Add menubar option for toggling hardware acceleration (#8424)
* Add menubar option for toggling hardware acceleration

* Fix paths to service

* Fix last path
2024-03-22 14:25:27 +01:00
renovate[bot]
5d122b4c8c
[deps] Tools: Update electron to v28.2.8 (#8417)
* [deps] Tools: Update electron to v28.2.8

* Bump version in electron-builder.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-22 10:47:47 +01:00
github-actions[bot]
397357e550
Autosync the updated translations (#8436)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-22 09:29:00 +00:00
Daniel James Smith
d6fa7a4e46
[PM-6904] Update supported languages for Microsoft Store (Appx) (#8372)
* Update locales used on browser, desktop and web

* Update supported languages for the Microsoft Store

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-21 19:55:46 +00:00
Justin Baur
b450b31ec4
[PM-5540] DesktopSettingsService (#8369)
* WIP: First Try at making DesktopSettingsService

Does not work, migrations are ran in renderer but the values are read in main.

* Update window$ retrieval

* Fix DesktopSettings

* Rename Migration

* Add Migration to Builder

* Cleanup

* Update Comments

* Update `migrate.ts`

* Catch Unawaited Promises

* Remove Comments

* Update Tests

* Rename Migration

* Add `alwaysOnTop`

* Make `init` async

* Fix Desktop Build
2024-03-21 13:53:12 -04:00
Matt Gibson
600cc080b8
Ps/fix biometric prompt error on close (#8353)
* Fix error on close due to context differences in background

Desktop background does not have active user information. Also, we want to delete _all_ prompt cancelled data, not just that for the active user. Storing this on global and manipulating observables to active achieves this without needing any user information in the background.

* Remove potentially orphaned data

* Throw nice error if prompt cancelled used without active user

* Register migration

* split prompt cancelled reset to user-specific and global
2024-03-21 13:02:04 -04:00
Oscar Hinton
e767295c86
[PM-5979] Refactor EnvironmentService (#8040)
Refactor environment service to emit a single observable. This required significant changes to how the environment service behaves and tackles much of the tech debt planned for it.
2024-03-21 09:09:44 -07:00