Commit Graph

1037 Commits

Author SHA1 Message Date
Thomas Rittson
007b5d9335
[PM-34157] Wire up SDK to NewPolicyService (#20377)
* Add shim in PolicyService to NewPolicyService
* Wire up NewPoilcyService to SDK
* Use SDK enum
2026-05-28 07:14:53 +10:00
Nick Krantz
500345d57f
[PM-37970] Fix vault list icons for Login and Identity with new item types flag (#20818)
* update cipher icons per the new items feature flag

* fix testing dependencies
2026-05-27 16:01:39 -05:00
Stephon Brown
283a0782c2
[PM-35228] Add Premium Status Changed Push Notification (#20498) 2026-05-27 14:32:17 -04:00
Jordan Aasen
97de2515db
[PM-35120] - Update user delete flows with org ownership (#20462)
* update delete account flows

* fix type error

* add account deletion service

* revert i18n key add to IN

* fixes to delete account dialog flow
2026-05-22 09:58:43 -07:00
Will Martin
d7d74825f8
[CL-1046] Add no-bit-dialog-wrapper lint rule (#20698)
* [CL-1046] Add no-bit-dialog-wrapper lint rule

Errors when <bit-dialog> or <bit-simple-dialog> appears inside any
parent HTML element. The dialog selector should be applied as an
attribute on the root element (e.g. <form bit-dialog>) so that the
form receives the dialog's height styling.

* Migrate admin console dialogs to new form pattern

Updates organization member, group, collection, provider, and domain verification dialogs to use <form bit-dialog> pattern following the component library updates.

* Migrate auth settings dialogs to new form pattern

Updates two-factor authentication, WebAuthn, and emergency access dialogs to use <form bit-dialog> pattern following the component library updates.

* Migrate Secrets Manager dialogs to new form pattern

Updates project, service account, access token, and secret dialogs to use <form bit-dialog> pattern following the component library updates.

* Migrate remaining dialogs to new form pattern

Applies the <form bit-dialog> / <form bit-simple-dialog> attribute selector
pattern to the rest of the codebase, satisfying the no-bit-dialog-wrapper
lint rule. 55 templates across auth, admin console, billing, vault,
key management, secrets manager, provider, dirt integrations, importer,
browser, and desktop apps.

* Migrate key rotation dialog to new form pattern
2026-05-20 09:47:14 -04:00
Nick Krantz
2a8e589f2f
[PM-37229] Add bwi-passport icon for passport cipher type (#20712)
* [PM-37229] Add bwi-passport icon and wire it to the passport cipher type

* Fix icons:build script to compile style.css and avoid duplicate SCSS keys

* [PM-37229] Update passport cipher icon tests to expect bwi-passport
2026-05-19 15:26:26 -05:00
Leslie Tilton
d25e043248
Add route providers to featureFlaggedRoute (#20235) 2026-05-18 12:31:24 -05:00
Jared
1b17557475
[PM-37521] Refactor password strength component for improved performance and to properly work (#20650)
* Refactor password strength component for improved performance and readability

- Introduced ChangeDetectorRef to optimize rendering in response to input changes.
- Consolidated visual update logic into a separate method for clarity.
- Enhanced handling of password strength calculations and visual feedback.
- Ensured real-time updates for password strength in the input-password component.

* Enhance password strength component's ngOnChanges method for better performance

- Updated ngOnChanges to debounce rendering only for email or name changes, avoiding unnecessary renders for password updates.
- Improved clarity of the method by explicitly handling password changes.

* Update tests for PasswordStrengthV2Component to include email change handling

- Modified ngOnChanges test cases to simulate email changes using SimpleChange.
- Ensured that password score emissions are correctly tested when email input is updated.
2026-05-15 12:04:45 -04:00
Bernd Schoolmann
ab941afa89
[PM-31061] Implement biometrics migration (#20506)
* Revert "Revert "[PM-31061] Implement biometrics migration (#20127)" (#20455)"

This reverts commit 7ddfddc695.

* Update sdk

* Clean up lock file

* Restore package lock

* Package lock

* Fix tests

* Remove unused mocks

* Cleanup

* Remove imports

* Revert changes to main.ts

* Deduplicate setting of key id

* Cleanup

* Prettier

* Update libs/common/src/key-management/encrypted-migrator/default-encrypted-migrator.spec.ts

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

* Update apps/browser/src/key-management/biometrics/foreground-browser-biometrics.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>
2026-05-15 12:22:41 +09:00
Thomas Avery
28149b04ce
[PM-31054] Add state service for V2UpgradeToken (#20636)
* Add state service for V2UpgradeToken
2026-05-14 10:56:50 -05:00
Nick Krantz
9eb416200b
[PM-36877] Remove nudge from bank account cipher type (#20561) 2026-05-14 08:49:38 -05:00
Brandon Treston
947920ed8d
[PM-34405 | PM-34406] Invite url field (#20557)
* improve type safter for invite link, add allowed domains field, wire up local state

* clean up

* fix reactivity

* clean up

* wip

* fix 404 handling, remove redundant signal

* add shareReplay

* update tests

* fix tests

* fix template, state clearing, more guards, clean up

* clean up

* cache org link by ID

* clean up

* clean up

* fix copy

* clean up

* more clean up
2026-05-13 09:34:25 -04:00
Jackson Engstrom
d7a7bc3554
[PM-32019] Add diamond action chip to archive menu option in desktop (#20186) 2026-05-11 11:42:19 -07:00
rr-bw
a4b7c311fc
chore(feature-flag): [Auth/PM-32833] Remove Input Password Feature Flag (#20306)
This PR removes the `pm-27086-update-authentication-apis-for-input-password` feature flag.
2026-05-11 10:00:47 -07:00
Todd Martin
292b541dee
feat(environment): Use globalEnvironment$ on environment selector 2026-05-08 22:27:43 -04:00
Maciej Zieniuk
dfb5734664
[PM-31112] Decouple local tools crypto from user key (#19433)
* sdk managed state init

* tools user key encryptor using SDK crypto local user data key for encryption

* eslint

* sdk managed state init excluding CLI

* update sdk

* client managed state

* sdk upgrade

* broken browser extension build
2026-05-07 09:10:41 -04:00
SmithThe4th
3635f5a794
[PM-28346] Use SDK for attachment delete operations (#20361)
* Added delete attachment from sdk to cipher sdk service

* Added to cipher service

* Added feature flag

* Updated dependencies and used delete attachment sdk on upload service

* Added response for the admin delete attachment operation
2026-05-06 23:22:50 -04:00
SmithThe4th
afd36d290c
[PM-34036] Skip corrupted attachments during zip vault export (#19976)
* Removed unused error

* Added skipped attachment callout to browser extension

* Pause on desktop dialog when attachment is skipped

* reverted change

* Revert package-lock.json to match main

* Pluralize warning message

* Add error

* Updated description message
2026-05-05 12:56:32 -04:00
Jackson Engstrom
be70072be7
[PM-31826] Update *ngIf to @if and *ngFor to @for in vault lib components (#18817) 2026-05-05 08:27:59 -07:00
Jared
7f895d62fe
[PM-34155] Enhance policy service with accepted policies retrieval and update sync response structure for new sync response (#20336)
* Enhance policy service with accepted policies retrieval and update sync response structure

- Added `acceptedPolicies$` method to `PolicyService` for fetching policies from organizations where the user has an Accepted membership status.
- Updated `DefaultPolicyService` to implement the new `acceptedPolicies$` method.
- Modified `DefaultSyncService` to handle a new `policiesNew` property in the sync response, ensuring backward compatibility with existing `policies`.
- Updated `SyncResponse` class to include the new `policiesNew` property and its mapping logic.

* Add DefaultNewPolicyService and integrate into MainBackground and ServiceContainer

- Introduced DefaultNewPolicyService for managing new policy formats.
- Updated MainBackground and ServiceContainer to include newPolicyService.
- Adjusted sync logic in DefaultSyncService to handle new policies.
- Refactored policy service abstractions to accommodate new policy management.
- Added tests for new policy service integration.

* Add unit tests for DefaultNewPolicyService and enhance policy handling in DefaultPolicyService

- Introduced comprehensive tests for DefaultNewPolicyService, covering upsert and replace functionalities.
- Added tests to ensure correct filtering of policies based on organization status in DefaultPolicyService.
- Enhanced policy synchronization logic in DefaultSyncService to handle new policies effectively.

* Refactor NewPolicyService initialization and remove organization dependency

- Updated the instantiation of DefaultNewPolicyService in both MainBackground and ServiceContainer to only require StateProvider.
- Removed organizationService dependency from DefaultNewPolicyService and its related tests, simplifying the service's interface.
- Cleaned up unused code and tests related to organization policies, ensuring the service focuses solely on state management.

* Adds use of InternalNewPolicyService to same places InternalPolicyService syncs

* Refactor server notifications tests to include InternalNewPolicyService mock and update sync service to handle empty policy sources correctly.

* Refactor server notifications tests to import InternalNewPolicyService and InternalPolicyService from their respective paths, improving code clarity and organization.

* Update MainBackground and ServiceContainer to use InternalNewPolicyService, enhancing consistency in policy service implementation across the application.
2026-05-04 11:11:01 -04:00
Oscar Hinton
b4800071f9
[PM-34380] Remove SASS from apps/web (#19859)
Removes SASS from apps/web build system. The icons and
multi select SASS files are compiled into CSS that are
then included.
2026-05-04 08:52:36 -04:00
Jared Snider
0e3e959a68
Fix flaky test (#20429) 2026-04-30 17:41:07 -04:00
Jared
4f1fe27e60
[PM-34918] use sdk for collection decryption (#20136)
* Add Collection Encryption Service and integrate into collection handling

- Introduced `CollectionEncryptionService` and its default implementation `DefaultCollectionEncryptionService` for handling collection encryption and decryption.
- Updated `DefaultCollectionService` to utilize the new encryption service based on feature flags.
- Refactored collection-related classes to support SDK-based encryption operations.
- Added necessary imports and updated service providers in Angular module for dependency injection.
- Enhanced collection models to support SDK format conversions for encryption tasks.

* Implement encryption functionality in CollectionEncryptionService

- Added `encrypt` method to `CollectionEncryptionService` for encrypting collection views.
- Updated `DefaultCollectionEncryptionService` to include the new `encrypt` method, ensuring proper handling of SDK encryption.
- Modified `DefaultCollectionService` to utilize the encryption service based on feature flags.
- Enhanced collection and collection view models to support SDK format conversions for encryption tasks.

* refactor(collections): Update collection decryption methods and handle encryption support

- Modified `fromSdkCollectionView` to include `sourceCollection` for preserving `defaultUserCollectionEmail`.
- Updated decryption methods in `DefaultCollectionEncryptionService` to pass the original collection.
- Marked `encrypt` method as unsupported in the SDK, directing users to the legacy key-service path.
- Removed SDK feature flag checks from `DefaultCollectionService`'s `encrypt` method.

* refactor(collections): Update feature flag for collection decryption to PM35153

- Changed references from PM34918CollectionEncryptionService to PM35153CollectionSdkDecryption in both service and test files.
- Adjusted the feature flag checks to align with the new decryption implementation.

* Implement collection encryption using SDK in DefaultCollectionEncryptionService

* Refactor collection decryption in DefaultCollectionEncryptionService to handle errors individually and improve logging

* Add polyfills for Symbol.dispose and Symbol.asyncDispose in test setup; add unit tests for DefaultCollectionEncryptionService and collection SDK mapping

* Refactor error handling in DefaultCollectionEncryptionService to throw errors instead of returning EMPTY, improving error propagation and logging consistency.

* Refactor collection decryption and enhance type mapping

- Updated the `decrypt` method in `default-collection-encryption.service.ts` to utilize `decryptMany` for improved error handling.
- Added exhaustive bidirectional mapping for `CollectionType` and `SdkCollectionType` in `collection.ts`.
- Enhanced tests in `collection-sdk-mapping.spec.ts` to verify roundtrip conversions for `CollectionTypes`.
- Adjusted `Collection` and `CollectionView` classes to use the new type mappings for SDK interactions.

* Refactor DefaultCollectionEncryptionService to use a more concise method for encrypting collections. Update collection-sdk-mapping tests to utilize SdkEncString for better type safety. Simplify NewItemNudgeComponent's logic for showing nudge spotlight based on cipher type, ensuring null checks are handled appropriately.

* Refactor NewItemNudgeComponent to use strict null checks for cipher type comparison, enhancing code clarity and consistency.
2026-04-30 14:25:23 -05:00
Bernd Schoolmann
7ddfddc695
Revert "[PM-31061] Implement biometrics migration (#20127)" (#20455)
This reverts commit c10e581a63.
2026-04-30 12:21:59 -05:00
Brandon Treston
7c6a0bc24f
[PM-34394] Organization invite service (#20367)
* Scaffold generate invite link lib, api service WIP

* add missing properties

* refresh lock file

* revert lockfile

* lock file

* clean up lock file (used wrong node version)

* fix lock file

* implement invite link state and service

* clean up

* clean up

* fix tests
2026-04-30 12:24:18 -04:00
Jared
9abb854520
[PM-33951] automatically confirm pending users on admin login (#20331)
* Add bulk auto-confirm functionality for organization users

- Introduced methods to retrieve pending auto-confirm users and to bulk auto-confirm them in the OrganizationUserApiService.
- Added OrganizationUserPendingAutoConfirmResponse model to handle responses for pending auto-confirmation.
- Implemented logic in DefaultAutomaticUserConfirmationService to automatically confirm users who accepted their invitations while the admin was offline.
- Updated feature flags to enable bulk auto-confirmation on login.

These changes enhance the user management experience by streamlining the confirmation process for organization users.

* Enhance MainBackground class by adding authService, accountService, and configService dependencies to the constructor. This update improves service integration for background operations.

* Add bulk auto-confirm functionality on user login

- Implemented the `initBulkAutoConfirmOnLoginSweep` method in `DefaultAutomaticUserConfirmationService` to trigger bulk auto-confirmation for users transitioning from Locked to Unlocked status.
- Enhanced unit tests to verify the behavior of the sweep service under different authentication states.
- Updated the service to utilize `AuthenticationStatus` for improved state management during user confirmation processes.

These changes streamline the user confirmation workflow, ensuring timely processing of pending confirmations upon user login.

* Refactor DefaultAutomaticUserConfirmationService for improved user confirmation handling

- Updated the `initBulkAutoConfirmOnLoginSweep` method to utilize a set for tracking seen user IDs, preventing duplicate processing during user state transitions.
- Enhanced error handling in the bulk auto-confirmation process to gracefully manage transient errors.
- Introduced a new `resolveAutoConfirmOrg` method to streamline organization retrieval logic for user confirmation.
- Updated unit tests to reflect changes in the handling of account information and ensure correct behavior during user confirmation processes.

These modifications enhance the efficiency and reliability of the user confirmation workflow, particularly during login transitions.

* Update BulkAutoConfirmOnLogin feature flag value to reflect new implementation

* Enhance unit tests for DefaultAutomaticUserConfirmationService to validate feature flag behavior. Added checks to ensure subscriptions are not set up when the feature flag is disabled and confirmed correct behavior during user state transitions. Updated the `initBulkAutoConfirmOnLoginSweep` method to be asynchronous for proper feature flag handling.
2026-04-30 11:44:42 -04:00
Bernd Schoolmann
c10e581a63
[PM-31061] Implement biometrics migration (#20127)
* Implement biometrics migration

* Cleanup

* Cleanup and disable on non-desktop

* Clean up tests

* Clean up tests

* Cleanup tests

* Update sdk-internal to 0.2.0-main.689

* Fix test

* Cleanup

* Remove abstract default impl

* Add test

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* Fix build

* Fix types

---------

Co-authored-by: bw-ghapp[bot] <178206702+bw-ghapp[bot]@users.noreply.github.com>
2026-04-30 12:27:58 +09:00
rr-bw
7103bbaf7e
fix(sso-required-cache): (Auth) [PM-30447] ssoRequiredCache fix (#19879)
Updates the `ssoRequiredCache` structure from `string[]` to `SsoRequiredCacheEntry[]`, which stores both the email and the webVaultUrl at the time of a successful SSO login.

This change was necessary because the previous `string[]` structure only stored email strings, but if a user used the same email to create an account on multiple different environments — where one account was required to use SSO and the other was not — then Extension and Desktop would fail to distinguish between these two accounts. Extension/Desktop would simply see that the email is in the cache, and then disable alternate login buttons any time that email was entered, regardless of environment (i.e. regardless of whether the user was truly required to use SSO.)

The new `SsoRequiredCacheEntry[]` format allows us to distinguish between accounts that have the same email, but are created on different environments and therefore might have dissimilar SSO Required policies applied.
2026-04-29 10:26:37 -07:00
SmithThe4th
264bca0a2e
[PM-32686] Add bank account item type (#19302)
* Add devclarity commands

* added doc and skills

* Added cipher type skill

* Refined the cipher type skills a bit

* core models and enum

* Wire BankAccount into cipher container classes

* Add BankAccount icon(incomplete), vault filters, and shared UI components

* Localization keys

* Add BankAccount into web vault UI

* Add BankAccount into browser extension UI

* Add BankAccount into desktop vault UI

* Add BankAccount support to CLI

* copy actions

* Remove .claude/commands files from branch

* Updated to match vault/PM-32687-cipher-type-skill

* update bank account copy options on web

* add copy options for bank account on browser

* update bank account copy fields for both versions of the vault

* update `hasBankAccount` logic to consider all fields

* add PIN and Account Number to protected fields for reprompt service

* update bank account section to have readonly properties

* localize bank account view - account type

* remove duplicate import

* add events for bank account

* migrate form field to use content children to allow for OnPush consumers to update fields

* fix strict typings

* fix failing tests from bank account changes

* display all bank account details for the cli

* add bank icon

* add copy option for iban

* remove bank account from cipher menu

* update bank account implementation based on main

* address local claude feedback

* address the fixme

* local code review changes

* update SDK and fix BankAccount adjacent typings

* make IBAN and SWIFT fields hidden by default

* clean up encrypted string tests

* add IBAN and Swift to protected fields

* fix test

* add BankAccount to cipher-types.md

* remove filtering for cli commands

---------

Co-authored-by: Patrick Honkonen <phonkonen@bitwarden.com>
Co-authored-by: Nick Krantz <nick@livefront.com>
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
2026-04-28 13:04:34 -05:00
blackwood
f9a9e220c6
Allow change-login-password invocation in non-Angular contexts (#15150) 2026-04-28 12:39:23 -04:00
Brandon Treston
6d42bbfbe5
[PM-34775] Generate Invite Link Lib and API Service (#20301)
* Scaffold generate invite link lib, api service WIP

* add missing properties

* refresh lock file

* revert lockfile

* lock file

* clean up lock file (used wrong node version)

* fix lock file

* clean up

* more lockfile issues
2026-04-28 11:54:20 -04:00
Bernd Schoolmann
7eb6fdc4a0
[PM-32784] Increase search service search performance by 50x and defer indexing (#19251)
* Make basic search fast

* Defer indexing

* Fix tests

* Handle admin console

* Clean up comment

* Add tests

* Always clear cipher index on edit

* Improve timeout behavior

* Extract lunr indexing and untangle logic

* Fix tests

* Undo change

* Cleanup

* Cleanup and typing issues

* Fix

* Fix build

* Prettier and eslint

* Fix

* Fix type errors and tests

* Rewrite lunr search index

* Fix tests

* Fix issues

* Add comment

* Cleanup

* Fix old usage

* Cleanup

* Apply feedback

* Prettier

* Fix typos

* Break lock in case lock was not released

* Move is archived and is trash to callers

* Prettier

* Apply cli archive and trash filter

---------

Co-authored-by: JaredScar <thewolfbadger@gmail.com>
2026-04-21 23:27:01 +09:00
Bernd Schoolmann
5126b62ee8
[PM-35330] Fix state not being updated on change kdf (#20259)
* Fix state not being updated on change kdf

* Add one more missing state

* Fix DI

* Update tests

* Fix cli DI

* Prettier

* Prettier

* Eslint
2026-04-21 11:30:05 +09:00
Bryan Cunningham
04b1714fae
[CL-1108] Migrate billing CTAs to new icon API (#19483)
* [CL-1033] Migrate billing CTAs to new icon API

Migrates buttons and links in billing components (browser, web, libs) to use the new icon API.

* add back broken loading behavior

* add back variable removed in error

---------

Co-authored-by: Vicki League <vleague@bitwarden.com>
2026-04-20 16:18:23 -04:00
Jared Snider
9962193f63
Auth/Innovation/PM-34210 - Desktop - Add devices dialog (#19797)
* [PM-34210] Move DeviceManagementComponentService provider to JslibServicesModule

The provider was incorrectly registered only in the web app's core.module.ts.
Moving it to JslibServicesModule makes it available to all clients (web, desktop,
CLI) without each needing to register it explicitly. Browser extension keeps its
own ExtensionDeviceManagementComponentService override which takes DI precedence.

* [PM-34210] Add pm-34210-desktop-add-devices feature flag

Adds the PM34210_DesktopAddDevices flag to gate the new Devices menu item
on the desktop Account menu. Defaults to true locally for development.

* [PM-34210] Add desktop device management dialog, service, and translations

- Adds DeviceManagementDialogComponent as a temporary dialog wrapper around
  the shared DeviceManagementComponent, matching the ChangePasswordDialog pattern
- Adds DesktopDeviceManagementComponentService with showHeaderInformation=false
  since the dialog provides its own header via bit-dialog
- Registers the desktop service in services.module.ts to override the jslib default
- Adds 13 missing device management i18n keys to the desktop en/messages.json

* [PM-34210] Add Devices item to desktop Account menu

Wires the feature-flagged Devices menu item into the desktop Electron Account
menu, positioned after Change Password. When clicked, sends openDevicesDialog
to the renderer which opens DeviceManagementDialogComponent via DialogService.

* Move device-management dialog on desktop to correct auth owned file.

* PM-34210 - Update all TODOs with proper ticket

* PM-34210 - Feature flag - don't check in true. duh

* PM-34210 - clean up incorrect todo

* PM-34210 - Fix desktop auth request answering service not including auth request id so that the device management page can upsert the device w/ the pending auth request.

* PM-34210 - Per PR feedback clean up dialog component of unused stuff.

* PM-34210 - Add new translations for devices screen to desktop
2026-04-20 12:50:09 -04:00
Bryan Cunningham
ccc4b11f9d
[CL-1111] Migrate key management CTAs to new icon API (#19486) 2026-04-20 11:27:25 -04:00
Shane Melton
3140be4396
[PM-14883] Strip non-numeric characters in credit card number display… (#20070)
* [PM-14883] Strip non-numeric characters in credit card number display pipe

* [PM-14883] Move credit card number pipe to vault and add unit tests
2026-04-17 14:56:16 -07:00
Jared Snider
77a0341f2e
Auth/PM-34506 - LoginStrategyService - Refactor cache and timeout out into own services (#20108)
* PM-34506 - Extract LoginStrategyCacheService as single owner of mid-auth cache state

* PM-34506 - Refactor LoginStrategySessionTimeoutService: inject cache service, add MessageListener, expose abstraction

* PM-34506 - Remove cache state and timer logic from LoginStrategyService, delegate to collaborating services

* PM-34506 - Register LoginStrategyCacheService and LoginStrategySessionTimeoutService in all client DI contexts

* PM-34506 - Components read loginSessionTimeout$ from LoginStrategySessionTimeoutServiceAbstraction

* PM-34506 - Add tests for null cache, and non-API error cache-clear paths in LoginStrategyService

* PM-34506 - Add sessionTimeout test for logInNewDeviceVerification with no cached session

* PM-34506 - Rename abstractions to follow Default prefix convention (no Abstraction suffix)

* PM-34506 - Use fake timers in startSessionTimeout test to eliminate flaky date assertion

* PM-34506 - Move registerTaskHandler into DefaultLoginStrategySessionTimeoutService constructor, remove registerSessionTimeoutTask

* PM-34506 - PR feedback - DefaultLoginStrategySessionTimeoutService - make cache clear more resilient.

* PM-34506 - 2FA Auth Comp - fix tests

* PM-34506 - rename login strategy default service files to include default- prefix

Aligns file names with class names and the established codebase convention where
default implementations are prefixed with `default-` (e.g. default-logout.service.ts).

* PM-34506 - TEMP - Default Login Strategy Session Timeout - adjust to 30 seconds to make QA's life easier.

* PM-34506 - DefaultLoginStrategySessionTimeoutService - revert temp change and set LOGIN_SESSION_TIMEOUT_LENGTH back to 5 min
2026-04-17 12:47:12 -04:00
Daniel James Smith
dc94f964d2
[SM-1762] Bump Jest to 30.3.0 (#20211)
* Bump jest packages

jest is a transient dependency of ts-jest but because angular-devkit/build-angular drags in an older version of jest, we have to add jest 30.3.0 to our dependencies

* Fix some typescript issues due to stricter types on mockImplementation

* Update guide link in snapshots

* Fix jest-environment paths

* Fix typescript linting errors

* Address typescript errors due stricter mockImplementation

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2026-04-17 17:48:29 +02:00
Mike Amirault
f9e98d8611
[PM-31438] Send unsaved edits dialog (#19425)
* [PM-31438] Add save edits dialog to web vault Send page

* Fix Access Intelligence component

* Match design spec, address PR comment

* Fix lint problem

* Lots of lint fixes

* Test fix, add change lost during merge conflict

* Change close methods return type to DialogCloseRef

* Fix Dialog types

* One more type fix

* Address QA findings, fix problems from merge

* A couple of build fixes

* Address AI review comments

* Fix desktop build and lint
2026-04-17 09:50:05 -04:00
Jared Snider
76e0ee1b33
Auth/Innovation/PM-4659 - Device Management - Add Last Activity Date (#19784)
* PM-4659 - Refactor DeviceView and add lastActivityDate to DeviceResponse

Adds lastActivityDate (nullable) to DeviceResponse for backwards compatibility
with older server versions. Cleans up DeviceView by removing the response
sub-property escape hatch and declaring all properties directly on the view.

* PM-4659 - Add PM4516_DevicesLastActivityDate feature flag

Adds feature flag and its DefaultFeatureFlagValue entry (defaults to false).

* PM-4659 - Refactor sort utils: rename, restructure, and add sortDevicesWithActivity

Renames resort-devices.helper.ts to utils/device-sort.utils.ts and renames all
functions (resort → sort). Adds sortDevicesWithActivity with the new sort order:
current session → pending requests → most recently active → first login fallback.
Adds full test coverage for all three exported functions.

* PM-4659 - Add recently active display to device management

Adds 'Recently active' column/row to the device management table and item group
views, gated on the PM4516_DevicesLastActivityDate feature flag. Includes a pure
getDeviceLastActivityDateI18nKey utility that maps last activity dates to i18n
keys using calendar-day comparison in the user's local timezone (Math.round for
DST safety). Adds i18n keys for all activity buckets to web and browser locales.

* PM-4659 - DeviceManagement - split into two sections to play around with refactoring the layout.

* PM-4659 - DeviceManagementItemGroupComp - refactor to meet figma better

* PM-4659 - DeviceManagementTable - fix recent activity sort.

* PM-4659 - Device Management Item Group Comp - add missing margin top

* PM-4659 - Add tech debt todo for device sort

* PM-4659 - Guard against future lastActivityDate due to server clock skew

* PM-4659 - DeviceManagment - RecentActivitySort updated to separate func, updated logic per dicussion with product, and wrote tests for the sort.

* PM-4659 - Tiny clean up items

* PM-4659 - Device Sort - recentlyActiveSortFn - update docs

* PM-4659 - Upsert lastActivityDate and recentlyActiveText when pending auth request arrives for known device

* PM-4659 - Reset table sort to default when a pending auth request arrives

* PM-4659 - getDeviceLastActivityDateI18nKey - add more test scenarios

* PM-4659 - Update recentlyActive i18n keys and messages to use explicit rolling-window labels (Past 7/14/30 days)

* PM-4659 - Show isTrusted status for pending auth request devices in showRecentlyActive block
2026-04-16 13:32:44 -04:00
Leslie Xiong
cb69c529b1
[CL-966] Updated Progress Component (#19072) 2026-04-15 12:51:57 -07:00
Maciej Zieniuk
d40bbcfd54
[PM-31270] New default argon2id in change kdf component (#20058)
* new Argon2Id defaults for change kdf component

* explicit default kdf construction

* ts strict fix

* require kdf params

* require kdf params in tests
2026-04-15 11:58:57 +02:00
Bernd Schoolmann
8730a27b9e
[PM-30584] Add unlock for key connector with SDK (#19367)
Some checks failed
Scan / Check PR run (push) Has been cancelled
Testing / Run typechecking (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-browser junit:junit-browser.xml name:Browser paths:apps/browser bitwarden_license/bit-browser]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-cli junit:junit-cli.xml name:CLI paths:apps/cli bitwarden_license/bit-cli]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-desktop junit:junit-desktop.xml name:Desktop paths:apps/desktop]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-libs junit:junit-libs.xml name:Libs paths:libs bitwarden_license/bit-common]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-web junit:junit-web.xml name:Web paths:apps/web bitwarden_license/bit-web]) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
* Add unlock for key connector with SDK

* Cleanup merge conflicts

* Cleanup

* Eslint error

* Fix tests

* Fix tests

* Eslint fix

* Fix comment

* Prettier

* Remove setting masterkeyencrypteduserkey to state

* Remove unused enlint directive

* Rename feature flag

* Fix order of setting state

* Fix test build

* Fix cli

* Eslint

* Fix build error

* Fix build error

* Undo changes to development.json

* Prevent unflagged changes

* Apply feedback around flag caching

* Apply feedback

* Cleanup
2026-04-14 11:08:02 +09:00
Jonathan Prusik
2c2067388a
[PM-33139] Targeting Rules initial implementation (#19693)
* create the FillAssistTargetingRules feature flag

* create TargetingRulesService

* move TargetingRulesService functionality into DomainSettingsService

* use targeting rules to qualify relevant fields

* add user autofill settings toggle for Fill Assist feature

* add feature flag check to getTargetingRulesForUrl

* add TargetingRulesDataService to update local state from data source

* enable the server to specify an override URI for targeting rules data

* add working data shape

* update data shape

* update logic to match new data shape expectations

* switch from hostname to host to support port inclusions

* add resource cache-buster

* do not update meta timestamp on resource fetch failure

* consolidate email and password update category to account update

* update targeting rules maps consumer logic

* add tests

* add support for host unicode key lookup

* cleanup

* address missing www-prefixed punycode URI case handling

* reduce targeting rules data fetching interval to 6 hours

* add punycode overflow guard and other edges

* cleanup

* add state handling for environment switching

* move constants

* update logic to match provider changes

* codify targeting rules form category requirement

* remove targeting rules totp implementation

* refactor targeting rules storage to key off resource domain

* use constants instead of string literals in cipher to field mapping

* add some basic schema validation
2026-04-13 16:35:20 -05:00
Daniel James Smith
d90ca0b509
[PM-32919] Migrate DeleteAccountDialog to shared code (#19308)
Some checks failed
Scan / Check PR run (push) Has been cancelled
Testing / Run typechecking (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-browser junit:junit-browser.xml name:Browser paths:apps/browser bitwarden_license/bit-browser]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-cli junit:junit-cli.xml name:CLI paths:apps/cli bitwarden_license/bit-cli]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-desktop junit:junit-desktop.xml name:Desktop paths:apps/desktop]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-libs junit:junit-libs.xml name:Libs paths:libs bitwarden_license/bit-common]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-web junit:junit-web.xml name:Web paths:apps/web bitwarden_license/bit-web]) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
* Move DeleteAccountDialogComponent from web to libs/auth/angular

Export via libs/auth/angular barrel file
Replace imports from web's SharedModule by direct imports
Update import of UserVerificationFormInputComponent

Add eslint ignore to imports from bitwarden/components

* Use new DeleteAccountDialogComponent on desktop

* Delete desktop specific DeleteAccountComponent and UserVerificationComponent

* Move DeleteAccountDialogComponent from libs/auth/angular to libs/angular/auth

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2026-04-11 07:27:18 +02:00
Vicki League
28b90554dd
[CL-1130] Fix storybook a11y and console errors for billing files (#19916) 2026-04-10 12:50:40 -04:00
Bernd Schoolmann
a942e21b22
[PM-31119] Run side-effects in sdk unlock service (#20004)
* Run side-effects in sdk unlock service

* Revert feature flag

* Tests and fix cli

* Set user ever had user key and add comment

* Update sdk

* Prettier

* Cleanup

* Only set biometric unlock when biometric enabled

* Clean up tests

* Fix DI

* Cleanup

* Cleanup

* Prettier

* Add test coverage and rename

* Cleanup tests

* Prettier

* Cleanup
2026-04-10 12:08:48 +02:00
Jared
79c6b51599
[PM-26383] Remove feature flag to enable autoconfirm (#20015)
* Refactor: Remove ConfigService dependency from auto-confirm related components

- Eliminated ConfigService from MainBackground, AutoConfirmPolicy, UserLayoutComponent, WebVaultPromptService, and organizationPolicyGuard.
- Updated logic to directly use organization properties instead of feature flags for auto-confirm functionality.
- Adjusted tests in DefaultAutomaticUserConfirmationService to reflect the removal of feature flag checks.
- Cleaned up unused imports related to ConfigService across various files.

* Refactor: Update date handling in tests and remove unused feature flag checks

- Changed date calculation in WebVaultExtensionPromptService tests to use milliseconds for accuracy.
- Removed unused feature flag checks from WebVaultPromptService tests, simplifying the logic and improving clarity.

* Refactor: Update organizationPolicyGuard to include ConfigService in feature callback

- Modified the organizationPolicyGuard to accept ConfigService as an additional parameter in the feature callback.
- Adjusted the SendComponent route to align with the updated guard implementation.

* Fix: Adjust date calculation in WebVaultExtensionPromptService tests for accuracy

- Updated the test to set the exact date to 30 days prior using setDate method for clarity and to avoid potential issues with DST boundaries.
2026-04-09 15:36:38 -04:00
Nick Krantz
14cd2ad341
[PM-26713] Refactor Attachment Uploads to use XMLHTTPRequest (#19634)
* allow consumers of upload service to input block size

* implement progress bar for cipher attachment uploads

* refactor to use a constant for available block sizes

* rework tests to use AzureUploadBlockSize

* update cipher attachments to ensure 100% is shown for all attachments

* do not allocate real memory in test

* update file uploads to use `XMLHttpRequest` when possible to track progress

* remove unused block size

* update tests + make options optional

* fix unit tests to align with single block approach

* add optional chaining for optional parameter

* remove duplicate import

* catch error from xhr send

* remove redundant try/catch block

* use if/else syntax in attachment template

* add `applyPlatformHeaders` to consolidate header creations between methods.

* add feature flag for file upload changes for progress

* update constructor parameters

* only pass object when feature flag is enabled
2026-04-09 13:23:33 -05:00