1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-08 05:47:50 +02:00
Commit Graph

355 Commits

Author SHA1 Message Date
Justin Baur
3f8f5bc1fa
[PM-7535] Remove Uses of getUserId (#10837)
* Remove Uses of `getUserId`

* Fix Test
2024-10-03 10:33:24 -04:00
renovate[bot]
d3d1a55972
[deps] Platform: Update big-integer to v1.6.52 (#10563)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-03 13:10:48 +02:00
Bernd Schoolmann
dafe795854
Move asymmetric crypto functions out of crypto service (#10903) 2024-10-01 17:47:41 +02:00
renovate[bot]
9a9b41a5da
[deps] Tools: Update jsdom to v25 (#10742)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 23:18:05 +02:00
Thomas Rittson
1f85036346
[PM-3478] Refactor OrganizationUser api (#10949)
* User and Group collection dialogs - don't fetch additional associations from the api
* Refactor to use user mini-details endpoint
2024-10-01 07:13:26 +10:00
renovate[bot]
8072469c37
[deps] Autofill: Update tldts to v6.1.48 (#11311)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 12:39:49 -04:00
Bernd Schoolmann
19f547e638
[PM-8836] Move ownership of biometrics to key-management (#10818)
* Move ownership of biometrics to key-management

* Move biometrics ipc ownership to km

* Move further files to km; split off preload / ipc to km

* Fix linting

* Fix linting

* Fix tests

* Fix tests

* Update .github/CODEOWNERS

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update .github/CODEOWNERS

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Change ownership of native messaging to key-management

* Move biometrics to libs/key-management

* Add README to capital whitelist

* Update package-lock.json

* Move km to key-management

* Move km to key-management

* Fix build for cli

* Import fixes

* Apply prettier fix

* Fix test

* Import fixes

* Import fixes

* Update libs/key-management/README.md

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update libs/key-management/package.json

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update lock file

* Change imports to top level km package

---------

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2024-09-30 18:14:32 +02:00
Bernd Schoolmann
d92b2cbea2
[PM-11477] Remove deprecated cryptoservice functions (#10854)
* Remove deprecated cryptoservice functions

* Use getUserkeyWithLegacySupport to get userkey

* Fix tests

* Fix tests

* Fix tests

* Remove unused cryptoservice instances

* Fix build

* Remove unused apiService in constructor

* Fix encryption

* Ensure passed in key is used if present

* Fix sends and folders

* Fix tests

* Remove logged key

* Fix import for account restricted keys
2024-09-24 11:28:33 +02:00
bw-ghapp[bot]
e691e2dadb
Bumped client version(s) (#11211)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-09-23 22:48:23 +00:00
renovate[bot]
62ee447c36
[deps] Autofill: Update tldts to v6.1.46 (#11054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 09:34:33 -04:00
renovate[bot]
35f4b4c7ac
[deps] Vault: Update https-proxy-agent to v7.0.5 (#7932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-10 16:01:37 -07:00
Bitwarden DevOps
55cd021471
Bumped client version(s) (#10960) 2024-09-09 14:57:25 +00:00
rr-bw
d189b4e294
[PM-8013] CLI MAC failure logs - update secureStorageService deps (#10935) 2024-09-09 10:05:04 -04:00
Jared Snider
e954621761
Auth/PM-10684 - Fix CLI asking for MP even if session key provided as command option (#10917)
* PM-10684 - ServiceContainer - Add better docs

* PM-10684 - UserAutoUnlockKeyService - setUserKeyInMemoryIfAutoUserKeySet - refactor method to return a bool instead of nothing so users can know if a user key was retrieved & set without another call.

* PM-10684 - Remove async code ( Program.ts) responsible for setting the auto user key from the session option handler (event emitter which fires when a user passes --session <sessionKey> to a command). Returning this to synchronous execution prevents a race condition between the setting of the user key and the command executing the exitIfLocked logic in the base-program which would check if the user key had been set to determine if the command should be allowed to execute or if the user was locked. When running a loop from a script, the command would often trigger the exitIfLocked before the auto user key could be set in state from the option:session session.

* PM-10684 - Clean up missed item per PR feedback
2024-09-09 10:03:30 -04:00
Todd Martin
03b3345bf6
[PM-11619] Replace client-side feature flag with server-side flag (#10709) 2024-09-06 09:25:15 -04:00
Justin Baur
3bbc2cc691
Change AppIdService to Use Storage Directly (#10835) 2024-09-05 14:44:19 -04:00
Thomas Rittson
8344623185
[PM-11450] Move organization-user domain to admin-console lib (#10785)
- move organization-user files from libs/common/src/admin-console into libs/admin-console/src/common
- add barrel files and update imports to use barrel files
- rename OrganizationUserService to OrganizationUserApiService
- rename OrganizationUserServiceImplementation to DefaultOrganizationUserApiService
2024-09-04 18:21:26 -04:00
Merissa Weinstein
c73ee88126
turn enableCipherKeyEncryption flag off (#10621) 2024-09-04 10:52:22 -05:00
Andreas Coroiu
60fca9c118
Revert "[deps] Platform: Update argon2 to v0.41.1 (#9819)" (#10858)
This reverts commit 5dac4b94e1.
2024-09-03 14:06:23 +02:00
renovate[bot]
5dac4b94e1
[deps] Platform: Update argon2 to v0.41.1 (#9819)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 14:13:53 +02:00
renovate[bot]
33f42c7743
[deps] Autofill: Update tldts to v6.1.41 (#10680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-29 10:48:01 -04:00
renovate[bot]
a49f110fc2
[deps] Tools: Update jsdom to v24.1.3 (#10747)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 10:55:36 +02:00
Bernd Schoolmann
3c9b3ea2cc
[PM-6296] Fix biometrics error prompt when biometrics are temporarily unavailable in browser extension (v2) (#10374)
* Create unavailable message for biometrics when in clamshell mode

* Move browser biometrics

* Inject nativemessagingbackground instead of using constructor

* Fix linting

* Fix build on browser
2024-08-27 06:25:20 +00:00
Matt Gibson
9459cda304
Pm-10953/add-user-context-to-sync-replaces (#10627)
* Require userId for setting masterKeyEncryptedUserKey

* Replace folders for specified user

* Require userId for collection replace

* Cipher Replace requires userId

* Require UserId to update equivalent domains

* Require userId for policy replace

* sync state updates between fake state for better testing

* Revert to public observable tests

Since they now sync, we can test single-user updates impacting active user observables

* Do not init fake states through sync

Do not sync initial null values, that might wipe out already existing data.

* Require userId for Send replace

* Include userId for organization replace

* Require userId for billing sync data

* Require user Id for key connector sync data

* Allow decode of token by userId

* Require userId for synced key connector updates

* Add userId to policy setting during organization invite accept

* Fix cli

* Handle null userId

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2024-08-26 20:44:08 -04:00
Bitwarden DevOps
2165452947
Bumped client version(s) (#10733) 2024-08-26 19:28:13 +00:00
Bitwarden DevOps
c56736e5e2
Bumped client version(s) (#10732) 2024-08-26 18:14:14 +00:00
SmithThe4th
dedd7f1b5c
[PM-10607] Require userId for getKeyForCipherKeyDecryption (#10509)
* updated cipher service to stop using the deprecated getUserKeyWithLegacySupport and use the version that requires a user id

* Added account service mock

* fixed cipher test

* Fixed test

* removed async from encryptCipher

* updated encryptSharedCipher to pass userId to the encrypt function

* Pass userId to getUserKeyWithLegacySupport on encryptSharedCipher

* pass in userid when setting masterKeyEncryptedUserKey

* Added activer usedId to new web refresh function
2024-08-20 11:00:48 -05:00
renovate[bot]
c562b75453
[deps] Autofill: Update tldts to v6.1.40 (#10557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 11:00:42 -04:00
Sara Safavi
3e37daf236
add 'desktop' to snapcraft plugs (#5057)
Co-authored-by: Sara Safavi <sara@planet.com>
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
2024-08-16 17:07:46 +02:00
Todd Martin
7b508b1ad7
[PM-8933] Require userId on setUserKey (#9675)
* Updated all sets of user key to pass in userId

* Added userId on auth request login.

* Fixed tests.

* Fixed tests to pass in UserId

* Added parameter to tests.

* Addressed PR feedback.

* Merged main
2024-08-13 08:07:36 -04:00
Bitwarden DevOps
7387a1115a
Bumped client version(s) (#10482) 2024-08-12 15:25:22 +00:00
Bernd Schoolmann
b84becd9e4
Fix cli build by adding biometric stubs (#10421) 2024-08-06 21:34:29 +02:00
Justin Baur
dcb21c2685
Move lastSync State (#10272) 2024-08-06 15:01:42 -04:00
Jake Fink
2819ac597f
[BEEEP: PM-10190] Use strict TS checks in CLI service container (#10298)
* move cli service-container to new folder

* fix imports

* add tsconfig and fix type issues in other services

* fix more imports in service-container

* make ts server happy in service-container

* fix actual bugs in cli service-container

* fix package json reference path

* fix service-container import

* update type on cipher service
2024-08-05 11:39:08 -04:00
renovate[bot]
3bf820606e
[deps] Autofill: Update tldts to v6.1.38 (#10393)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 11:06:13 -04:00
Bernd Schoolmann
cc45655b86
Revert "[PM-6296] Fix biometrics error prompt when biometrics are temporarily…" (#10373)
This reverts commit 1184c504d1.
2024-08-02 07:46:54 -04:00
Bernd Schoolmann
1184c504d1
[PM-6296] Fix biometrics error prompt when biometrics are temporarily unavailable in browser extension (#9851)
* Add availability check to biometrics

* Move isbiometricunlockavailable logic to parent component

* Fix availability detection on desktop

* FIx response parsing on browser

* Suppress pending biometric message while checking for availability

* Refactor biometrics functions out of platformutilsservice

* Remove unused constructor

* Remove unused abstract function definitions

* Rename abstract services

* Add documentation

* Rename service abstraction, add comments

* Add comments

* Refactor browser biometrics into background/foreground and remove callbacks

* Remove unused logs

* Remove unused logs
2024-08-02 12:31:11 +02:00
Bitwarden DevOps
17e0dff342
Bumped client version(s) (#10335) 2024-07-30 21:40:34 +00:00
Justin Baur
c91f9146da
[PM-9978] Add State Logging Options (#10251)
* Add `DebugOptions` to Definitions

* Respect Debug Options

* Configure DI
2024-07-29 13:21:21 +00:00
Jake Fink
a437868727
move initialization of UV service dep (#10290) 2024-07-26 14:23:20 -04:00
renovate[bot]
b9eb4003a1
[deps] Autofill: Update prettier to v3.3.3 (#10228)
* [deps] Autofill: Update prettier to v3.3.3

* prettier formatting changes

* fix SyntaxError for literal @ inline html

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2024-07-25 11:11:55 -04:00
renovate[bot]
dcf4e9686c
[deps] Tools: Update jsdom to v24 (#10257)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-25 13:35:06 +02:00
Jake Fink
4c26ab5a9e
[PM-10059] alert server if device trust is lost (#10235)
* alert server if device trust is lost

* add test

* add tests for extra errors

* fix build

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2024-07-24 10:25:57 -04:00
renovate[bot]
3b73e97261
[deps] Autofill: Update tldts to v6.1.34 (#10227)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-23 12:44:45 -04:00
renovate[bot]
730142f612
[deps] Autofill: Update tldts to v6.1.33 (#10203)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-22 12:21:24 -04:00
Addison Beck
3bfa024b87
Output user-specific associations for collections in the CLI (#10154)
Collection management permissions can be set for a group or a specific
user. Currently the CLI only outputs group associations when it displays
collection configuration information. This can cause bugs when piping
commands together.

This commit ensures that `user` associations also get output. In all
cases this data was already available and just needed to be added to a
response model.
2024-07-18 11:31:54 -04:00
Bernd Schoolmann
84b719d797
[PM-4154] Introduce Bulk Encrypt Service for Faster Unlock Times (#6465)
* Implement multi-worker encryption service

* Fix feature flag being flipped and check for empty input earlier

* Add tests

* Small cleanup

* Remove restricted import

* Rename feature flag

* Refactor to BulkEncryptService

* Rename feature flag

* Fix cipher service spec

* Implement browser bulk encryption service

* Un-deprecate browserbulkencryptservice

* Load browser bulk encrypt service on feature flag asynchronously

* Fix bulk encryption service factories

* Deprecate BrowserMultithreadEncryptServiceImplementation

* Copy tests for browser-bulk-encrypt-service-implementation from browser-multithread-encrypt-service-implementation

* Make sure desktop uses non-bulk fallback during feature rollout

* Rename FallbackBulkEncryptService and fix service dependency issue

* Disable bulk encrypt service on mv3

* Change condition order to avoid expensive api call

* Set default hardware concurrency to 1 if not available

* Make getdecrypteditemfromworker private

* Fix cli build

* Add check for key being null
2024-07-18 08:56:22 -04:00
Bitwarden DevOps
c72fae5c9a
Bumped client version(s) (#10123) 2024-07-15 17:09:09 +00:00
Cesar Gonzalez
974162b1a4
[PM-6426] Create TaskSchedulerService and update long lived timeouts in the extension to leverage the new service (#8566)
* [PM-6426] Create TaskSchedulerService and update usage of long lived timeouts

* [PM-6426] Implementing nextSync timeout using TaskScheduler

* [PM-6426] Implementing systemClearClipboard using TaskScheduler

* [PM-6426] Fixing race condition with setting/unsetting active alarms

* [PM-6426] Implementing clear clipboard call on generatePasswordToClipboard with the TaskSchedulerService

* [PM-6426] Implementing abortTimeout for Fido2ClientService using TaskSchedulerService

* [PM-6426] Implementing reconnect timer timeout for NotificationService using the TaskSchedulerService

* [PM-6426] Implementing reconnect timer timeout for NotificationService using the TaskSchedulerService

* [PM-6426] Implementing sessionTimeout for LoginStrategyService using TaskSchedulerService

* [PM-6426] Implementing eventUploadInterval using TaskScheduler

* [PM-6426] Adding jest tests for the base TaskSchedulerService class

* [PM-6426] Updating jest tests for GeneratePasswordToClipboardCommand

* [PM-6426] Setting up the full sync process as an interval rather than a timeout

* [PM-6426] Renaming the scheduleNextSync alarm name

* [PM-6426] Fixing dependency references in services.module.ts

* [PM-6426] Adding jest tests for added BrowserApi methods

* [PM-6426] Refactoring small detail for how we identify the clear clipboard timeout in SystemService

* [PM-6426] Ensuring that we await clearing an established scheduled task for the notification service

* [PM-6426] Changing the name of the state definition for the TaskScheduler

* [PM-6426] Implementing jest tests for the BrowserTaskSchedulerService

* [PM-6426] Implementing jest tests for the BrowserTaskSchedulerService

* [PM-6426] Adding jest tests for the base TaskSchedulerService class

* [PM-6426] Finalizing jest tests for BrowserTaskScheduler class

* [PM-6426] Finalizing documentation on BrowserTaskSchedulerService

* [PM-6426] Fixing jest test for LoginStrategyService

* [PM-6426] Implementing compatibility for the browser.alarms api

* [PM-6426] Fixing how we check for the browser alarms api

* [PM-6426] Adding jest tests to the BrowserApi implementation

* [PM-6426] Aligning the implementation with our code guidelines for Angular components

* [PM-6426] Fixing jest tests and lint errors

* [PM-6426] Moving alarms api calls out of BrowserApi and structuring them within the BrowserTaskSchedulerService

* [PM-6426] Reworking implementation to register handlers separately from the call to those handlers

* [PM-6426] Adjusting how we register the fullSync scheduled task

* [PM-6426] Implementing approach for incorporating the user UUID when setting task handlers

* [PM-6426] Attempting to re-work implementation to facilitate userId-spcific alarms

* [PM-6426] Refactoring smaller details of the implementation

* [PM-6426] Working through the details of the implementation and setting up final refinments

* [PM-6426] Fixing some issues surrounding duplicate alarms triggering

* [PM-6426] Adjusting name for generate password to clipboard command task name

* [PM-6426] Fixing generate password to clipboard command jest tests

* [PM-6426] Working through jest tests and implementing a method to guard against setting a task without having a registered callback

* [PM-6426] Working through jest tests and implementing a method to guard against setting a task without having a registered callback

* [PM-6426] Implementing methodology for having a fallback to setTimeout if the browser context is lost in some manner

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Finalizing stepped setInterval implementation

* [PM-6426] Implementing Jest tests for DefaultTaskSchedulerService

* [PM-6426] Adjusting jest tests

* [PM-6426] Adjusting jest tests

* [PM-6426] Adjusting jest tests

* [PM-6426] Fixing issues identified in code review

* [PM-6426] Fixing issues identified in code review

* [PM-6426] Removing user-based alarms and fixing an issue found with setting steppedd alarm interavals

* [PM-6426] Removing user-based alarms and fixing an issue found with setting steppedd alarm interavals

* [PM-6426] Fixing issue with typing information on a test

* [PM-6426] Using the getUpperBoundDelayInMinutes method to handle setting stepped alarms and setTimeout fallbacks

* [PM-6426] Removing the potential for the TaskScheduler to be optional

* [PM-6426] Reworking implementation to leverage subscription based deregistration of alarms

* [PM-6426] Fixing jest tests

* [PM-6426] Implementing foreground and background task scheduler services to avoid duplication of task scheudlers and to have the background setup as a fallback to the poopup tasks

* [PM-6426] Implementing foreground and background task scheduler services to avoid duplication of task scheudlers and to have the background setup as a fallback to the poopup tasks

* [PM-6426] Merging main into branch

* [PM-6426] Fixing issues with the CLI Service Container implementation

* [PM-6426] Reworking swallowed promises to contain a catch statement allow us to debug potential issues with registrations of alarms

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adjusting implementation based on code review feedback

* [PM-6426] Reworking file structure

* [PM-6426] Reworking file structure

* [PM-6426] Adding comments to provide clarity on how the login strategy cache experiation state is used

* [PM-6426] Catching and logging erorrs that appear from methods that return a promise within VaultTimeoutService
2024-07-15 10:32:30 -05:00
Justin Baur
5fcf4bbd10
[PM-8979] Check that user is authed before getting user config (#10031)
* Check that user is authed before getting user config

* Accept PR Suggestion

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Use Strict Equal

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
2024-07-15 10:41:10 -04:00