* 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
* 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
* 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.
* fix: add try/catch for malformed JSON input in parseEmail
* fix formatting and extra closing brace
---------
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
* 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.
* refactor to use CGS with test coverage
* respond to AI review
* implement strategy to resolve PM-10699
* return early when hardLimits violated
* Address PR comments
* More PR comment fixes
* remove force flag
---------
Co-authored-by: Mike Amirault <mamirault@bitwarden.com>
* 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>
* 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
* 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
* 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
* 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