1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

491 Commits

Author SHA1 Message Date
Bernd Schoolmann
23ec6bacc9 [PM-20225] Prevent legacy users without userkey from logging in (#14267)
* Prevent legacy users without userkey from logging in

* Remove further web-migration code for legacy users

* Add i18n for legacy user error message

* Update comment

* Remove migrate legacy component

* Remove i18n messages

* Remove migrate legacy encryption reference
2025-06-02 23:56:29 +02:00
Addison Beck
26caeb3083 Implement and extend tsconfig.base across projects (#14554)
* Implement and extend tsconfig.base across projects

* fixup! Merge remote-tracking branch 'origin/main' into rename-tsconfig

* fix: import tsconfig.base from components

* fix: skip typechecking node modules

* fixing tests

* fix the tests for real

* undo accidentally change
2025-06-02 20:38:17 +00:00
Oscar Hinton
85cef971c6 Add semver as dependency (#15005) 2025-05-30 15:31:11 +02:00
Oscar Hinton
5423ab3268 [PM-21934] Upgrade to eslint 9 (#14754)
Upgrades to Eslint v9. Since this is a major version there were breaking changes, but since we've previously migrated to flat configs in #12806 those were minimal.
2025-05-27 13:13:15 -04:00
renovate[bot]
0f9f6a1c5d [deps] Tools: Update papaparse to v5.5.3 (#14966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-05-27 18:58:56 +02:00
Thomas Avery
bd29397fd8 [PM-21611] Require userId on KeyService clear methods (#14788) 2025-05-22 13:55:26 -05:00
SmithThe4th
46a0b709fe [PM-21644] Cannot retrieve attachment from bw serve (#14806)
* Modified saveAttachmenttofIle to implement callback attachment content decryption

* renamed parameter
2025-05-22 09:15:30 -04:00
Bernd Schoolmann
d93f547cfb [PM-21001] Move platform code to new encrypt service interface (#14544)
* Move platform code to new encrypt service interface

* Fix tests

* Fix tests

* Fix cli build
2025-05-20 19:45:40 +02:00
renovate[bot]
b09b22a47b [deps] AC: Update core-js to v3.42.0 (#14476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brandon Treston <btreston@bitwarden.com>
2025-05-19 10:09:33 -04:00
Maciej Zieniuk
239556b55f [PM-18017] Show key connector domain in remove password page (#14695)
* Passed in userId on RemovePasswordComponent.

* Added userId on other references to KeyConnectorService methods

* remove password component refactor, test coverage, enabled strict

* explicit user id provided to key connector service

* redirect to / instead when user not logged in or not managing organization

* key connector service explicit user id

* key connector service no longer requires account service

* key connector service missing null type

* cli convert to key connector unit tests

* remove unnecessary SyncService

* error toast not showing on ErrorResponse

* bad import due to merge conflict

* bad import due to merge conflict

* missing loading in remove password component for browser extension

* error handling in remove password component

* organization observable race condition in key-connector

* usesKeyConnector always returns boolean

* unit test coverage

* key connector reactive

* reactive key connector service

* introducing convertAccountRequired$

* cli build fix

* moving message sending side effect to sync

* key connector service unit tests

* fix unit tests

* move key connector components to KM team ownership

* new unit tests in wrong place

* key connector domain shown in remove password component

* type safety improvements

* convert to key connector command localization

* key connector domain in convert to key connector command

* convert to key connector command unit tests with prompt assert

* organization name placement change in the remove password component

* unit test update

* key connector url required to be provided when migrating user

* unit tests in wrong place after KM code ownership move

* infinite page reload

* failing unit tests

* failing unit tests

---------

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
2025-05-19 08:58:51 -04:00
Github Actions
a82eb8c22b Bumped client version(s) 2025-05-19 10:40:05 +00:00
Maciej Zieniuk
e73f902aee [PM-18576] Fix missing user id on remove password (#13777)
* Passed in userId on RemovePasswordComponent.

* Added userId on other references to KeyConnectorService methods

* remove password component refactor, test coverage, enabled strict

* explicit user id provided to key connector service

* redirect to / instead when user not logged in or not managing organization

* key connector service explicit user id

* key connector service no longer requires account service

* key connector service missing null type

* cli convert to key connector unit tests

* remove unnecessary SyncService

* error toast not showing on ErrorResponse

* bad import due to merge conflict

* bad import due to merge conflict

* missing loading in remove password component for browser extension

* error handling in remove password component

* organization observable race condition in key-connector

* usesKeyConnector always returns boolean

* unit test coverage

* key connector reactive

* reactive key connector service

* introducing convertAccountRequired$

* cli build fix

* moving message sending side effect to sync

* key connector service unit tests

* fix unit tests

* unit tests in wrong place after KM code ownership move

* infinite page reload

* failing unit tests

* failing unit tests

---------

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
2025-05-19 08:51:46 +02:00
SmithThe4th
ad3121f535 [PM-12423] Migrate Cipher Decryption to Use SDK (#14206)
* Created mappings for client domain object to SDK

* Add abstract decrypt observable

* Added todo for future consideration

* Added implementation to cipher service

* Added adapter and unit tests

* Created cipher encryption abstraction and service

* Register cipher encryption service

* Added tests for the cipher encryption service

* changed signature

* Updated feature flag name

* added new function to be used for decrypting ciphers

* Added new encryptedKey field

* added new function to be used for decrypting ciphers

* Manually set fields

* Added encrypted key in attachment view

* Fixed test

* Updated references to use decrypt with feature flag

* Added dependency

* updated package.json

* lint fix

* fixed tests

* Fixed small mapping issues

* Fixed test

* Added function to decrypt fido2 key value

* Added function to decrypt fido2 key value and updated test

* updated to use sdk function without prociding the key

* updated localdata sdk type change

* decrypt attachment content using sdk

* Fixed dependency issues

* updated package.json

* Refactored service to handle getting decrypted buffer using the legacy and sdk implementations

* updated services and component to use refactored version

* Updated decryptCiphersWithSdk to use decryptManyLegacy for batch decryption, ensuring the SDK is only called once per batch

* Fixed merge conflicts

* Fixed merge conflicts

* Fixed merge conflicts

* Fixed lint issues

* Moved getDecryptedAttachmentBuffer to cipher service

* Moved getDecryptedAttachmentBuffer to cipher service

* ensure CipherView properties are null instead of undefined

* Fixed test

* ensure AttachmentView properties are null instead of undefined

* Linked ticket in comment

* removed unused orgKey
2025-05-14 07:30:01 -07:00
Oscar Hinton
9a7089594e [PM-19878] Add core-js to cli (#14696)
* Add core-js to cli

* Add core-js to bit-cli
2025-05-13 16:59:56 +02:00
Todd Martin
4c68f61d47 feat(CLI-SSO-Login): [Auth/PM-21116] CLI - SSO Login - Add SSO Org Identifier option (#14605)
* Add --identifier option for SSO on CLI

* Add option for identifier

* Moved auto-submit after the setting of client arguments

* Adjusted comment

* Changed to pass in as SSO option

* Renamed to orgSsoIdentifier for clarity

* Added more changes to orgSsoIdentifier.
2025-05-13 10:58:48 -04:00
renovate[bot]
9af7963609 [deps] Vault: Update @koa/multer to v3.1.0 (#14495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
2025-05-12 14:58:48 -05:00
renovate[bot]
7d01c42e37 [deps] Vault: Update multer to v1.4.5-lts.2 (#14469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2025-05-12 15:42:21 -04:00
Justin Baur
1b756df749 [PM-14484] ApiService showing html in error message (#14658)
* Make ApiService more testable

* Add ApiService tests

* Switch to only reading text/plain content
2025-05-09 20:21:25 -04:00
Todd Martin
4191bb9533 chore(captcha): [PM-15162] Remove handling of captcha enforcement and bypass token
* Removed captcha references.

* Removed connectors from webpack

* Fixed extra parameter.

* Resolve merge conflicts.

* Fixed extra argument.

* Fixed failing tests.

* Fixed failing test.

* Accessibility cookie cleanup

* Cleaned up accessibility component.

* Deleted old registration endpoint

* Remove unused register request object.

* Fixed merge error that changed font family.

* Fixed formatting from merge.

* Linting
2025-05-09 10:44:11 -04:00
Alec Rippberger
3030eb7552 [PM-19212] Consolidate password set routing to AuthGuard using ForceSetPasswordReason (#14356)
* Consolidates component routing, removing routing to update-temp-password from components. All routing to update-temp-password should happen in the AuthGuard now.

---------

Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
2025-05-08 11:24:52 -05:00
Bernd Schoolmann
744c1b1b49 [PM-21001] Move vault code to new encrypt service interface (#14546)
* Move vault code to new encrypt service interface

* Fix tests
2025-05-06 21:24:53 +00:00
Brandon Treston
fd43222938 [PM-19383] admins unable to download attachments (#14363)
* add admin support for downloading attachments

* fix delete and upload

* fix delete admin to return a response

* fix upload

* add missing param

* use getCipherAdmin

* fix cli
2025-05-05 13:36:49 -04:00
Matt Bishop
8090586b52 Fix some references to master (#14578)
* Fix some references to master

* Fix broken links
2025-05-01 07:18:09 -07:00
Thomas Avery
d43e4757df [PM-7604] Require target UserID for KdfConfigService (#14380)
* Require userId for KdfConfigService

* Update auth team callers

* Update tools team callers
2025-04-29 17:25:27 -05:00
renovate[bot]
438f90c987 [deps] Autofill: Update tldts to v7 (#14510)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 12:20:29 -04:00
Bernd Schoolmann
fd0db40f79 [PM-20492] Refactor symmetric keys - remove key buffer representation, migrate consumers to .toEncoded() (#14371)
* Refactor encrypt service to expose key wrapping

* Fix build

* Undo ts strict removal

* Fix wrong method being used to encrypt key material

* Rename parameters and remove todo

* Add summary to encrypt

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/abstractions/encrypt.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Add tests for unhappy paths

* Add test coverage

* Add links

* Remove direct buffer access

* Fix build on cli

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-25 19:26:39 +02:00
Todd Martin
26273ca072 Update copyright year to 2025 (#14364)
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-04-24 13:46:20 -04:00
renovate[bot]
f521afa3ae [deps] Tools: Update jsdom to v26.1.0 (#14397)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-04-24 14:39:31 +02:00
Github Actions
1b6f75806d Bumped client version(s) 2025-04-21 14:22:41 +00:00
Maciej Zieniuk
4da03821ce move key connector components to KM team ownership (#14008) 2025-04-18 08:23:52 -07:00
Daniel James Smith
170f97da8e [PM-20333] Remove "export-attachments" feature flag (#14310)
* Remove usage of export-attachments feature flag

* Remove export-attachments feature flag definition

* Update export.command documentation

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-04-17 08:58:16 -04:00
renovate[bot]
c4c9db5121 [deps] Vault: Update koa to v2.16.1 [SECURITY] (#14197)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-17 08:49:07 -04:00
aj-bw
c7259b4cb1 BRE-536/Add-ARM-targz-builds-for-desktop-and-cli (#14270)
* Test ARM64 build

* Remove sudo

* Change to public preview runner

* Change cache key for architectures

* Test

* Test

* Test

* remove x86 musl target - troubleshooting build error

* native module troubleshooting

* remove cross-platform for testing

* attempt to resolve cross-platform issue

* support more arm64 build types

* fix missed amd to arm update

* missing dependency during env setup

* lxd troubleshooting

* install lxd with snap instead

* electron-builder debug

* simplified script for testing

* testing

* 22.04 to 20.04

* try ubuntu 24.04 runner

* add dist script

* update build command

* troubleshoot 24.04 compatibility

* remove lxd before merging main

* add comment, bump arm runner down to 22.04

* revert to tar.gz support only for this PR

* testing cli arm builds

* fix build target designation

* adjust runner designation

* runner name typo

* not needed currently

* adjust build.js logic and call in workflow

* address styling feedback and unnecessary rust toolchain call

* simplify build cli os matrix

* revert x86 linux builds to cross-platform command for build.js

---------

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2025-04-17 08:21:24 -04:00
Bernd Schoolmann
5a1b0744f0 [PM-17665] Move cryptofunction service to km (#13285)
* Move cryptofunction service to km

* Fix formatting

* Fix import

* Fix build on desktop

* Fix build on browser and tests
2025-04-10 11:09:35 +02:00
Bernd Schoolmann
1450a033b3 [PM-19469] Add logs for unlock time (#13972)
* Add logs for unlock time

* Undo local flag override

* Update message

* Update messages

* Fix build on chrome
2025-04-02 23:19:53 +02:00
Brandon Treston
9b3c28fcea [PM-19746] Add new permission check to browser (#14075)
* add new permisssions check to browser

* add permission logic to view

* fix tests

* cleanup

* fix permissions model for CLI and desktop

* feedback
2025-04-02 12:49:08 -04:00
Thomas Avery
17f661e3d1 [PM-19287] Feature flag for encrypt service (#13894)
* Extract getFeatureFlagValue to pure function

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

* Add broadcasting abstractions and OnServerConfigChange interface.

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

* Add implementation of onServerConfigChange on encrypt services

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

* Add onServerConfigChange implementation for encrypt worker

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

* Wire up broadcasting in dependency injection

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

* Add unit tests

* Handle subscribing for onServerConfigChange in init services

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2025-04-01 14:14:00 -05:00
Bernd Schoolmann
15738f16ae [PM-18038] Fix safari using outdated biometrics protocol (#13287)
* Fix safari using outdated biometrics protocol

* Remove logging

* Remove log

* Move canEnableBiometricUnlock to biometric service

* Fix build

* Add tests

* Fix type error

* Attempt to fix build

* Fix build

* Fix test failure
2025-03-31 16:59:01 +02:00
Bernd Schoolmann
22039d038d [PM-3475] Remove deprecated keys (#13266)
* Remove deprecated keys

* Fix cli build

* Fix build
2025-03-31 16:58:02 +02:00
Brandon Treston
0fd01ed7ee [PM-18566] Wire up vNextPolicyService for Clients (#13678)
* wire up vNext impl

* wire up vNextPolicyService for browser

* wire up vNextPolicyService for desktop

* wire up vNextPolicyService for cli

* fix test

* fix missed caller

* cleanup

* fix missing property assignment

* fix QA bug for PM-19205

* fix QA bug for PM-19206

* fix QA bug for pm-19228

* cleanup
2025-03-25 11:30:47 -04:00
Justin Baur
a9fd16968f [PM-14999] Remove Sequentialize (#12113)
* Remove Sequentialize

* Delete `clearCaches`
2025-03-25 10:11:45 -04:00
Bernd Schoolmann
27baa92fcf [PM-10749] [BEEEP] New export format: Zip with attachments (#10465)
* Add new export format: zip

* Restrict zip export to just individual vaults

* Add tests

* Remove unused import

* Fix build error

* Fix tests

* Fix test

* Fix retrieval of ciphers by passing in activeUserId

* Guard feature behind `export-attachments`-feature-flag

* Extend cipher filter to also filter out any ciphers that are assigned to an organization

* Added apiService to retrieve AttachmentData (metaData) and then download the attachment

- Added ApiService as a depdency within DI for VaultExportService/IndividualVaultExportService
- Added unit tests for filtering ciphers
- Added unit test for downloading attachment metadata and attachments

* Moved attachment decryption into a separate method and added unit tests

* Added null check for creating the base attachment folder

* Move format check for zip within Org export into an early return/throw

* Add feature flag guard on the CLI

* Extend ExportScopeCallout to display an individual export will contain attachment when zip-format is selected

* Fix adding/removing the zip-export option based on selected vault and state of `export-attachments` feature-flag

* Separate AAA visually using whitespace within tests

* Remove unused error var

* Write test that verifies different http request failures when retrieving attachment data

* Remove uneeded ignore lint rule

* Rewrite test to actually check that ciphers assigned to an org are filtered out

* Introduce ExportedVault return type (#13842)

* Define ExportedVault type unioned by 2 new types that describe a plain-text export vs a blob-based zip-export

* Extend static getFileName to handle formats and add unit-tests

* Introduce new export return type throughout the vault export module

- Update abstractions
- Update return types within implementations
- Update callers/consumers to handle the new return value
- Fix all unit tests

* Add support for new export return type and fix download of blobs via CLI

* Add documentation to public methods

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>

---------

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-03-25 13:30:54 +01:00
renovate[bot]
ac127c1512 [deps] Vault: Update https-proxy-agent to v7.0.6 (#12301)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-18 14:23:48 -04:00
Thomas Avery
a11536a424 [PM-17668] Move DeviceTrustService to KM ownership (#13194)
* move DeviceTrustService to KM ownership

* update codecov
2025-03-17 12:02:44 -05:00
Brandon Treston
4d68952ef3 [PM-18089] Update cipher permissions model and consumers (#13606)
* update cipher permissions model and consumers

* add new property to tests

* fix test, add property to toCipherData()

* add missing ConfigService

* fix story

* refactor

* fix error, cleanup

* revert refactor

* refactor

* remove uneeded test

* cleanup

* fix build error

* refactor

* clean up

* add tests

* move validation check to after featrue flagged logic

* iterate on feedback

* feedback
2025-03-14 09:51:40 -04:00
Thomas Rittson
0c507f54f6 [PM-13323] Move remaining collection code to AC Team (#13731) 2025-03-13 17:18:47 -04:00
Thomas Avery
81335978d8 [PM-17669] Move MasterPasswordService to KM (#13148)
* Move MasterPasswordService to KM
2025-03-13 13:29:27 -05:00
Thomas Avery
7e96b7a9a6 [PM-17670] Move KeyConnectorService to KM ownership (#13277)
* Move KeyConnectorService to KM ownership

* Add to codecov

* Move key connector request models
2025-03-13 09:46:01 -05:00
rr-bw
e268055dc1 feature(set-change-password): [Auth/PM-17648] Create MasterPasswordApiService (#13552)
Creates a MasterPasswordApiService to house our API calls related to setting and changing a master password.
2025-03-12 11:33:44 -07:00
Ike
c0f9754bdf [PM-18943] Update New Device OTP Prompt message for CLI (#13780)
* fix(newDeviceVerification): updating prompt for new device OTP in the CLI
2025-03-12 10:31:05 -04:00