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

2463 Commits

Author SHA1 Message Date
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
SmithThe4th
b4c4eea229 Removed feature flag (#14410) 2025-04-25 10:15:15 -07:00
Bernd Schoolmann
aafc82e1b8 Remove direct key buffer access in encrypt service test (#14434) 2025-04-25 19:11:39 +02:00
Bernd Schoolmann
e4ba98f2d0 Remove key.key.bytelength check in encryptUint8array (#14432) 2025-04-25 17:48:32 +02:00
Alec Rippberger
ab7016fd6b feat(auth): implement view data persistence in 2FA flows
Add persistence to two-factor authentication in the extension login flow. Implements caching of form state to improve user experience when navigating between authentication steps. Includes feature flag for controlled rollout.
2025-04-25 10:02:54 -05:00
Nick Krantz
241cbf8cc9 remove dependency on cipher decryption keys (#14408)
- It was not being used in the observable pipeline and causing multiple decryptions
2025-04-24 15:34:04 -05:00
Bryan Cunningham
116751d4ca add small button variant (#14326)
* adds small button size variant

* makes small icon button same size as small button

* testing small button for extension header

* remove extension changes

* update popout layout story

* revert change to small icon button padding

* add whitespace to see if error resolves

* default buttonType to primary

* default buttonType to secondary

* add comment around why nonNullButtonSize value exists

* add comment to  property about using the non null version

* Update apps/browser/src/platform/popup/layout/popup-layout.stories.ts

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* updated input syntax when using static values

* remove nonNull value coersion

* allow changing of size input in Story

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2025-04-24 15:34:29 -04:00
Jordan Aasen
fe3e6fd198 migrate to tw class name (#14317) 2025-04-23 15:26:53 -07:00
Jordan Aasen
b589951c90 [PM-18520] - Update desktop cipher forms to use the same UI as web app and extension - (#13992)
* WIP - cipher form refactor

* cipher clone

* cipher clone

* finalize item view and form changes

* fix tests

* hide changes behind feature flag

* set flag to false

* create vault items v2. add button selector

* revert change to flag and vault items

* add attachments

* revert change to tsconfig

* move module

* fix modules

* cleanup

* fix import

* fix import

* fix import

* remove showForm

* update feature flag

* wip - cleanup

* fix up services

* cleanup

* fix type errors

* fix lint errors

* add dialog component

* revert changes to menu

* revert changes to menu

* fix vault-items-v2

* set feature flag to FALSE

* add missing i18n keys. fix collection state

* remove generator. update modules. bug fix

* fix restricted imports

* mark method as deprecated. add uri arg back

* fix shared.module

* fix shared.module

* fix shared.module

* add uri

* check and prompt for premium when opening attachments dialog

* move VaultItemDialogResult back

* fix import in spec file

* update copy functions

* fix MP reprompt issue
2025-04-23 11:13:44 -07:00
Bernd Schoolmann
ef80c23707 Fix type 0 not being blocked on key wrapping (#14388)
* Fix type 0 not being blocked on key wrapping

* Move block type0 below key null check
2025-04-23 18:45:29 +02:00
Bernd Schoolmann
60fe8fa7b0 Add comments to send service to make it easier to follow (#14389) 2025-04-23 08:21:45 -04:00
Alec Rippberger
71e720e945 fix(auth): clarify 2FA security key verification text
Updates user interface text to improve clarity when prompting for security key verification during two-factor authentication.

Ref: PM-20055
2025-04-22 23:09:07 -05:00
Daniel James Smith
c08888bbd9 Move feature flags for Data Insights and Reporting (#14375)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-04-22 14:51:14 -05:00
Jordan Aasen
18d47a29df [CL-420][PM-18798] - Berry component and tab navigation (#14135)
* berry component and nav slot

* remove debug

* don't worry about routes

* add announce and tests

* fix story

* use existing notification color. fix border radius

* fix berry component class

* finalize berry component

* fix tests

* fix story

* move logic to tabs-v2 component.

* move navButtons to tabs-v2.component

* fix layout

* move story.

* cleanup
2025-04-22 10:18:10 -07:00
Oscar Hinton
490a46e9b6 [PM-19923] Update autofocus directive to be more aggressive in focusing (#14368)
* Update autofocus directive to be more aggressive in focusing

* Handle checkVisibility not existing (safari < 17.4)

* Tweak phrasing

* Change approach
2025-04-22 11:46:35 -05:00
Bernd Schoolmann
e231286f37 [PM-19731] Refactor encrypt service to expose key wrapping (#14080)
* 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

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-22 13:56:39 +00:00
Shane Melton
d6bda3bcdf [PM-20433] Add view cache options for view cache service signals to allow cached values to persist navigation events (#14348) 2025-04-21 13:26:59 -07:00
Thomas Avery
3a8045d7d0 [PM-19215] Fix Firefox extension biometric unlock autoprompt (#14254)
* Remove restriction from account security component

* Add the ability to manage pop-out to the LockComponentService

* Have the Firefox extension pop-out on biometric auto-prompt unlock
2025-04-21 14:08:09 -05:00
Shane Melton
143473927e [PM-10611] End user notification sync (#14116)
* [PM-10611] Remove Angular dependencies from Notifications module

* [PM-10611] Move end user notification service to /libs/common/vault/notifications

* [PM-10611] Implement listenForEndUserNotifications() for EndUserNotificationService

* [PM-10611] Add missing taskId to notification models

* [PM-10611] Add switch cases for end user notification payloads

* [PM-10611] Mark task related notifications as read when visiting the at-risk password page

* [PM-10611] Revert change to default-notifications service

* [PM-10611] Fix test

* [PM-10611] Fix tests and log warning in case more notifications than the default page size are available

* [PM-10611] Use separate feature flag for end user notifications

* [PM-10611] Fix test
2025-04-21 08:57:57 -07:00
Bernd Schoolmann
43b1f55360 [PM-18697] Remove old symmetric key representations in symmetriccryptokey (#13598)
* Remove AES128CBC-HMAC encryption

* Increase test coverage

* Refactor symmetric keys and increase test coverage

* Re-add type 0 encryption

* Fix ts strict warning

* Remove old symmetric key representations in symmetriccryptokey

* Fix desktop build

* Fix test

* Fix build

* Update libs/common/src/key-management/crypto/services/web-crypto-function.service.ts

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

* Update libs/node/src/services/node-crypto-function.service.ts

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

* Undo changes

* Remove cast

* Undo changes to tests

* Fix linting

* Undo removing new Uint8Array in aesDecryptFastParameters

* Fix merge conflicts

* Fix test

* Fix another test

* Fix test

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-21 14:57:26 +00:00
Bernd Schoolmann
201bdf752b [PM-19728] Device bulk get keys during key rotation (#14216)
* Add support for device list endpoint keys during key rotation

* Update libs/common/src/auth/abstractions/devices/responses/device.response.ts

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

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-21 14:14:13 +02:00
Chase Nelson
f86a5c2b6e [PM-19798] [PM-18807] Fix base64 encoding/decoding with special characters (#14089)
* Refactor base64 encoding/decoding to use BufferLib

* Add tests for base64 encoding and decoding functions

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2025-04-18 14:55:23 -04:00
Vijay Oommen
a829965262 [PM-20386] valuesChanges returns a string (#14338) 2025-04-18 13:05:58 -05:00
Maciej Zieniuk
4da03821ce move key connector components to KM team ownership (#14008) 2025-04-18 08:23:52 -07:00
Bryan Cunningham
cbab354c0e Hide bit-icon component from screen readers by default (#14295)
* adds aria-hidden to bit-icon when no aria-label provided

* add ariaLabel to logo svg usages

* add ariaLabel documentation

* default ariaLable value to undefined

* add logo label to translations

* adds i18n pipe to component

* Add binding to example docs
2025-04-18 10:38:19 -04:00
Jonas Hendrickx
e026799071 [PM-13128] Enable Breadcrumb Policies (#13584)
* [PM-13128] Enable Breadcrumb Policies

* [PM-13128] Enable Breadcrumb Policies

* [PM-13128] wip

* [PM-13128] wip

* [PM-13128] wip

* [PM-13128] wip

* remove dead code

* wip

* wip

* wip

* refactor

* Fix for providers

* revert to functional auth guard

* change prerequisite to info variant

* address comment

* r

* r

* r

* tests

* r

* r

* fix tests

* feedback

* fix tests

* fix tests

* Rename upselling to breadcrumbing

* Address feedback

* Fix build & tests

* Make the guard callback use Observable instead of a promise

* Pm 13128 suggestions (#14041)

* Rename new enum value

* Show the upgrade button when breadcrumbing is enabled

* Show mouse pointer when cursor is hovered above badge

* Do not make the dialogs overlap

* Align badge middle

* Gap

* Badge should be a `button` instead of `span`

* missing button@type

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Alex Morask <amorask@bitwarden.com>
2025-04-18 09:57:27 -04:00
Jared Snider
9d16435d08 docs(ViewModel): Add JSDocs to view to explain proper use (#14214) 2025-04-18 09:52:12 -04:00
Justin Baur
5af12505f1 Switch userVisibleOnly to false (#14202) 2025-04-17 16:01:02 -04:00
Jonas Hendrickx
e0df1ecf0c [PM-19180] Calculate sales tax correctly for sponsored plans (#14129)
* [PM-19180] Sponsored family org no sales tax because they're free

* [PM-19180][DRAFT] Calculate sales tax correctly for sponsored plans with additional storage

---------

Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2025-04-17 11:33:13 -04:00
cyprain-okeke
fa268437ef [PM-17774] Build page for admin sponsored families (#14243)
* Added nav item for f4e in org admin console

* shotgun surgery for adding "useAdminSponsoredFamilies" feature from the org table

* Resolved issue with members nav item also being selected when f4e is selected

* Separated out billing's logic from the org layout component

* Removed unused observable

* Moved logic to existing f4e policy service and added unit tests

* Resolved script typescript error

* Resolved goofy switchMap

* Add changes for the issue orgs

* Added changes for the dialog

* Rename the files properly

* Remove the commented code

* Change the implement to align with design

* Add todo comments

* Remove the comment todo

* Fix the uni test error

* Resolve the unit test

* Resolve the unit test issue

* Resolve the pr comments on any and route

* remove the any

* remove the generic validator

* Resolve the unit test

* Resolve the wrong message

* Resolve the duplicate route

---------

Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2025-04-17 14:59:09 +01: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
Todd Martin
88638c09b3 Fix(login): [PM-20287] Initialize login email state when email is remembered 2025-04-16 19:58:31 -04:00
Jason Ng
9f61b6aaa7 [PM-20182] update colors for intro carousel svg for dark theme (#14280) 2025-04-16 17:14:27 -04:00
Jordan Aasen
defbbd586f [PM-19357] - [Defect] Unauthorised access allows limited access user to change custom hidden field of Items (#14068)
* update tests

* finish tests

* only disallow hidden fields for hiddenPassword users

* fix failing tests

* fix story

* only disable hidden field option when editing
2025-04-16 11:06:40 -07:00
Jonathan Prusik
1efdcacd16 [PM-16641] Remove "inline-menu-positioning-improvements" feature flag (#14225)
* remove inline-menu-positioning-improvements flag

* remove unused LegacyOverlayBackground

* remove unused deprecated files

* appease ts error TS2564

* remove deleted resources from the manifest files
2025-04-16 13:15:43 -04:00
Conner Turnbull
db16c98a1d [PM-17773] Added "Sponsored Families" dropdown nav item in the admin console (#14029)
* Added nav item for f4e in org admin console

* shotgun surgery for adding "useAdminSponsoredFamilies" feature from the org table

* Resolved issue with members nav item also being selected when f4e is selected

* Separated out billing's logic from the org layout component

* Removed unused observable

* Moved logic to existing f4e policy service and added unit tests

* Resolved script typescript error

* Resolved goofy switchMap

---------

Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2025-04-16 11:58:54 -04:00
Shane Melton
f293c15f4d [PM-19538] Add shareReplay to internal orgKeys subscription (#14034) 2025-04-16 08:24:30 -07:00
Shane Melton
8258ea39b0 [PM-18903] Desktop sync issues (#13681)
* [PM-18707] Use different BroadcasterSubscriptionId in base view component to avoid collision with desktop view component

* [PM-18707] Use userId instead of payloadUserId for cipher notification syncs

* [PM-19032] Live Sync on Desktop (#13851)

* migrate the vault-items to an observables rather than async/promises

- this helps keep data in sync with the service state and avoids race conditions

* migrate the view component to an observables rather than async/promises

- this helps keep data in sync with the service state and avoids race conditions

* decrypt saved cipher from server

* bump timeout for upserting ciphers

* mark `go` as async in desktop vault

- previously it was a floating promise

* Revert "mark `go` as async in desktop vault"

This reverts commit fd28f40b18.

* Revert "bump timeout for upserting ciphers"

This reverts commit e963acc377.

* move vault utilities to `common` rather than `lib` to avoid circular dependencies

* use `perUserCache$` for `cipherViews$` to avoid new subscriptions from being created

* use userId from observable rather than locally set to be the most up to date

* [PM-18707] Add clearBuffer$ input to perUserCache$ helper so that  the internal share replay buffers can be cleared

* [PM-18707] Rework forceCipherViews$ to clearBuffer$ refactor

- Add dependency for cipherDecryptionKeys$ for the cipherViews so that decryption is never attempted without keys

* [PM-18707] Add overload to perUserCache to satisfy type checker

* [PM-18707] Fix overloads

* [PM-18707] Add check for empty failed to decrypt ciphers

* [PM-18707] Mark vault component for check after observable emits.

The cipherViews$ observable now persists between subscriptions, meaning that updates via the sync push notifications can occur outside the AngularZone causing delays in updating the view.

---------

Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
Co-authored-by: Nick Krantz <nick@livefront.com>
2025-04-15 12:17:41 -07:00
Bernd Schoolmann
b09305577f [PM-19603] Change asymmetric interface to only allow key encapsulation (#14046)
* Change asymmetric interface to only allow key encapsulation

* Fix naming

* Clean up naming

* 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>

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

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

* Fix test

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-15 16:39:02 +02:00
Todd Martin
356a20a4bc fix(login): [PM-20174] Do not show validation errors on email input on LoginComponent
* Do not show validation errors on input

* Removed one-line function.

* Removed awaits
2025-04-14 15:55:01 -04:00
Thomas Avery
95ea1b22ae [PM-17987] Add feature flag (#13991)
* Add feature flag

* Add unit tests.
2025-04-14 12:47:09 -05:00
Bryan Cunningham
ac1210a7ed remove margin from checkbox hint (#14251) 2025-04-14 12:56:30 -04:00
Vijay Oommen
7e621be6cb [PM-18969] CSV importers should create nested collections (#14007) 2025-04-14 10:46:58 -05:00
Alexander Aronov
8885f5da24 [PM-19914][PM-19913] trim domains and long fields in forwarders (#14141)
* PM-19913: Added max length to the generated_for and description peroperties in the FirefoxRelay API payload
* [PM-19913] Added maxLength restriction to the website and generatedBy methods. Added maxLength limit of 200 to the description of addy.io
2025-04-14 08:42:41 -04:00
Andreas Coroiu
8b64087b32 [PM-18040] Inject ipc content script dynamically (#13674)
* feat: add content script manager

* feat: inject into all pages

* feat: only inject if flag is enabled

* fix: wrong constructor parameters
2025-04-14 14:41:08 +02:00
Todd Martin
f7934b98c6 fix(login): [PM-11502] Support Remember Email option consistently
* Moved saving of SSO email outside of browser/desktop code

* Clarified comments.

* Tests

* Refactored login component services to manage state

* Fixed input on login component

* Fixed tests

* Linting

* Moved web setting in state into web override

* updated tests

* Fixed typing.

* Fixed type safety issues.

* Added comments and renamed for clarity.

* Removed method parameters that weren't used

* Added clarifying comments

* Added more comments.

* Removed test that is not necessary on base

* Test cleanup

* More comments.

* Linting

* Fixed test.

* Fixed base URL

* Fixed typechecking.

* Type checking

* Moved setting of email state to default service

* Added comments.

* Consolidated SSO URL formatting

* Updated comment

* Fixed reference.

* Fixed missing parameter.

* Initialized service.

* Added comments

* Added initialization of new service

* Made email optional due to CLI.

* Fixed comment on handleSsoClick.

* Added SSO email persistence to v1 component.

* Updated login email service.

* Updated setting of remember me

* Removed unnecessary input checking and rearranged functions

* Fixed name

* Added handling of Remember Email to old component for passkey click

* Updated v1 component to persist the email on Continue click

* Fix merge conflicts.

* Merge conflicts in login component.

* Persisted login email on v1 browser component.

* Merge conflicts

* fix(snap) [PM-17464][PM-17463][PM-15587] Allow Snap to use custom callback protocol

* Removed Snap from custom protocol workaround

* Fixed tests.

* Updated case numbers on test

* Resolved PR feedback.

* PM-11502 - LoginEmailSvcAbstraction - mark methods as abstract to satisfy strict ts.

* Removed test

* Changed to persist on leaving fields instead of button click.

* Fixed type checking.

---------

Co-authored-by: Bernd Schoolmann <mail@quexten.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2025-04-10 18:58:49 -04:00
Alec Rippberger
4772362928 refactor(auth): [PM-8976] migrate two-factor setup component to Tailwind and standalone
- Remove Bootstrap styles from two-factor-setup component and replace with Tailwind equivalents
- Convert two factor components to standalone components to move away from LooseComponents
- Replace ul/li list with bit-item-group and bit-item components
- Integrate with the bit design system

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2025-04-10 14:13:11 -05:00
Bryan Cunningham
f24a4d139d remove hint margin in radio button (#14223) 2025-04-10 14:42:15 -04:00
Bryan Cunningham
c59b321dbb adds button story and docs for button with icon spacing (#14198)
* add story & docs for button with icon spacing

* add back block story removed in error

* remove unnecessary args
2025-04-10 14:17:37 -04:00
Alex Morask
eea0bb6d6e [PM-18870] Convert Organization to Business Unit (#14131)
* Add setupBusinessUnit to OrganizationBillingApiService

* Add setup-business-unit.component

* Updated designs and cleanup work

* Update existing logos for Provider Portal and Admin Console

* Fix broken test
2025-04-10 10:06:23 -04:00