* [AC-2603] Add unmanaged property to CollectionAdminView and response models
* [AC-2603] Cleanup CollectionViews
- Remove getters that have been replaced with Unmanaged property
- Remove AddAccess that is also being replaced
- Add canEditUnmanagedCollections() helper to organization
* [AC-2603] Replace old AddAccess logic with Unmanaged flag
* [AC-2603] Fix failing test
* [AC-2603] Ensure Add Access badge/toggle only shows when V1 flag is enabled
* [AC-2603] Undo change to canEditUserAccess and canEditGroupAccess
Custom users should not get access to an unmanaged collection with only Manage Groups and Manage User permissions. That is still reserved for admin/owners and EditAnyCollection custom users.
magical black-box key retrieval is slow, due to needing to repeatedly resolve (and potentially decrypt) keys. Doing the work up front is both more explicit and much faster.
It would be preferable to move OrganizationId to an opaque type in the models, but that has rippling effects all over the place and ultimately is stopped by vault filtering on strings rather than ids, but still calling the property `organizationId`, we need to fix that first.
* [PM-6825] Add temporary vault page header
* [PM-6825] Expose cipherViews$ observable
* [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse
* [PM-6825] Introduce VaultPopupItemsService
* [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components
* [PM-6825] Add VaultListItems to VaultV2 component
* [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic
* [PM-6825] Add temporary Vault icon
* [PM-6825] Add empty and no results states to Vault tab
* [PM-6825] Add unit tests for vault popup items service
* [PM-6825] Negate noFilteredResults placeholder
* [PM-6825] Cleanup new Vault components
* [PM-6825] Move new components into its own module
* [PM-6825] Fix missing button type
* [PM-6825] Add booleanAttribute to showAutofill input
* [PM-6825] Replace empty refresh BehaviorSubject with Subject
* [PM-6825] Combine *ngIfs for vault list items container
* [PM-6825] Use popup-section-header component
* [PM-6825] Use small variant for icon buttons
* [PM-6825] Use anchor tag for vault items
* [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly
* [PM-6825] Add Tailwind classes to new Vault icon
* [PM-6825] Remove temporary header comment
* [PM-6825] Fix auto fill suggestion font size and padding
* [PM-6825] Use tailwind for vault icon styling
* [PM-6825] Add libs/angular to tailwind.config content
* [PM-6825] Cleanup missing i18n
* [PM-6825] Make VaultV2 standalone and cleanup Browser App module
* [PM-6825] Use explicit type annotation
* [PM-6825] Use property binding instead of interpolation
* Create ForegroundSyncService For Delegating `fullSync` calls to the background
* Relax `isExternalMessage` to Allow For Typed Payload
* Null Coalesce The `startListening` Method
* Filter To Only External Messages
* Add permission checks for org vault bulk actions
* Show checkboxes for all collections except Unassigned
* Separate individual and admin logic between CollectionView
and CollectionAdminView
* Remove heading for error toasts per design feedback
* Update activity when switching users
* Clear data of designated user
* Do not switchMap to null, always to Promise or Observable
* handle uninitialized popup services
* Switch to new account immediately and log out as inactive.
Split up done logging out and navigation so we can always display expire warning.
* Do not navigate in account switcher, main.background takes care of it
* Ignore storage updates from reseed events
* Remove loading on cancelled logout
* Catch missed account switch errors
* Avoid usage of active user state in sync service
Send service does not currently support specified user data
manipulation, so we ensure that the notification was sent to the
active user prior to processing the notification.
* Clear sequentialize caches on account switch
These caches are used to ensure that rapid calls to an async method are not repeated. However, the cached promises are valid only within a given userId context and must be cleared when that context changes.
* Revert `void` promise for notification reconnect
* Update libs/angular/src/services/jslib-services.module.ts
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* Handle switch account routing through messaging background -> app
* Use account switch status to handle unlocked navigation case.
* Revert "Handle switch account routing through messaging background -> app"
This reverts commit 8f35078ecb.
---------
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* [AC-1707] Add feature flag
* [AC-1707] Prevent loading ciphers for provider users in the org vault when the feature flag is enabled
* [AC-1707] Ensure new canEditAllCiphers logic only applies to organizations that have FC enabled
* [AC-1707] Update editAllCiphers helper to check for restrictProviderAccess feature flag
* [AC-1707] Remove un-used vaultFilterComponent reference
* [AC-1707] Hide vault filter for providers
* [AC-1707] Add search to vault header for provider users
* [AC-1707] Hide New Item button for Providers when restrict provider access feature flag is enabled
* [AC-1707] Remove leftover debug statement
* [AC-1707] Update canEditAllCiphers references to consider the restrictProviderAccessFlag
* [AC-1707] Fix collections component changes from main
* [AC-1707] Fix some feature flag issues from merge with main
* [AC-1707] Avoid 'readonly' collection dialog for providers
* [AC-1707] Fix broken Browser component
* [AC-1707] Fix broken Desktop component
* [AC-1707] Add restrict provider flag to add access badge logic
* Use account service to track accounts and active account
* Remove state service active account Observables.
* Add email verified to account service
* Do not store account info on logged out accounts
* Add account activity tracking to account service
* Use last account activity from account service
* migrate or replicate account service data
* Add `AccountActivityService` that handles storing account last active data
* Move active and next active user to account service
* Remove authenticated accounts from state object
* Fold account activity into account service
* Fix builds
* Fix desktop app switch
* Fix logging out non active user
* Expand helper to handle new authenticated accounts location
* Prefer view observable to tons of async pipes
* Fix `npm run test:types`
* Correct user activity sorting test
* Be more precise about log out messaging
* Fix dev compare errors
All stored values are serializable, the next step wasn't necessary and was erroring on some types that lack `toString`.
* If the account in unlocked on load of lock component, navigate away from lock screen
* Handle no users case for auth service statuses
* Specify account to switch to
* Filter active account out of inactive accounts
* Prefer constructor init
* Improve comparator
* Use helper methods internally
* Fixup component tests
* Clarify name
* Ensure accounts object has only valid userIds
* Capitalize const values
* Prefer descriptive, single-responsibility guards
* Update libs/common/src/state-migrations/migrate.ts
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* Fix merge
* Add user Id validation
activity for undefined was being set, which was resulting in requests for the auth status of `"undefined"` (string) userId, due to key enumeration. These changes stop that at both locations, as well as account add for good measure.
---------
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* [PM-7710] Avoid re-indexing ciphers on current tab component and re-setting null storage values for popup components
* [PM-7710] Avoid re-indexing ciphers on current tab component and re-setting null storage values for popup components
* PM-6689 - Add security stamp to Token state
* PM-6689 - Remove Security Stamp from account and state service
* PM-6689 - Add security stamp get and set to token service + abstraction + tests
* PM-6689 - Add migration for security stamp, test it, and register it with migrator
* PM-6689 - Update sync service + deps to use token service.
* PM-6689 - Cleanup missed usages of account tokens which has been removed.
* PM-6689 - Per PR feedback, remove unnecessary data migration as the security stamp is only in memory and doesn't need to be migrated.
* Resolve updated values from updates
Uses the now returned updated values from cipher service to guarantee-return the updated cipher for CLI edits
* Use updated cipher for creation
* Use updated cipher for editing collections
* Await async methods
Cipher data more closely approximates server responses. TODO: this should really use actual response types
* [PM-5876] Adjust LP Fileless Importer to Suppress Download with DOM Append in Manifest v3
* [PM-5876] Incorporating jest tests for affected logic
* [PM-5876] Fixing jest test that leverages rxjs
* [PM-5876] Updating documentation within BrowserApi.executeScriptInTab
* [PM-5876] Implementing jest tests for the new LP suppress download content scripts
* [PM-5876] Adding a change to webpack to ensure we do not package the mv2 side script for `lp-suppress-import-download.mv2.ts` if building the extension for mv3
* [PM-5876] Implementing changes based on feedback during code review
* [PM-5876] Implementing changes based on feedback during code review
* [PM-5876] Implementing changes based on feedback during code review
* [PM-5876] Implementing changes based on feedback during code review
* [PM-5876] Implementing a configuration to feed the script injection of the Fileless Importer CSV download supression script
* [PM-5744] Adjust injection of `page-script.ts` within FIDO 2 implementation to ensure mv3 compatibility
* [PM-5744] Adjusting structure of manifest.json to clean up implementation and ensure consistency between mv2 and mv3
* [PM-5744] Reverting inclusion of the ConsoleLogService
* [PM-4791] Injected content scripts prevent proper XML file display and disrupt XML responses
* [PM-5744] Adjust FIDO2 content script injection methodology to be compatible with manifest v3
* [PM-5744] Adjusting references to Fido2Service to mirror change of name to Fido2Background
* [PM-5744] Migrating runtime background messages that are associated with Fido2 into Fido2Background
* [PM-5744] Fixing named reference within Fido2Background
* [PM-5744] Migrating all Fido2 messages from the runtime.background.ts script to the fido2.background.ts script
* [PM-5744] Removing unnecessary dependency from runtime background
* [PM-5744] Removing unnecessary dependency from runtime background
* [PM-5744] Reworking how we handle init of Fido2Background
* [PM-5744] Reworking page-script.ts to ensure that it can destory its global values on unload
* [PM-5744] Reworking page-script.ts to ensure that it can destory its global values on unload
* [PM-5744] Implementing separated injection methodology between manifest v2 and v3
* [PM-4791] Adjsuting reference for Fido2 script injection to ensure it only triggers on https protocol types
* [PM-5744] Removing unnecessary message and handling reload of content scripts based on updates on observable
* [PM-5744] Refactoring content-script implementation for fido2
* [PM-5744] Refactoring content-script implementation for fido2
* [PM-5744] Reworking implementation to avoid having multiple contenType checks within the FIDO2 content scripts
* [PM-5744] Re-implementing the messageWithResponse within runtime.background.ts
* [PM-5744] Reverting change to autofill.service.ts
* [PM-5744] Removing return value from runtime.background.ts process message call
* [PM-5744] Reworking how we handle injection of the fido2 page and content script elements
* [PM-5744] Adjusting how we override the navigator.credentials request/reponse structure
* [PM-5744] Working through jest tests for the fido2Background implementation
* [PM-5744] Finalizing jest tests for the Fido2Background implementation
* [PM-5744] Stubbing out jest tests for content-script and page-script
* [PM-5744] Implementing a methodology that allows us to dynamically set and unset content scripts
* [PM-5744] Applying cleanup to page-script.ts to lighten the footprint of the script
* [PM-5744] Further simplifying page-script implementation
* [PM-5744] Reworking Fido2Utils to remove references to the base Utils methods to allow the page-script.ts file to render at a lower file size
* [PM-5744] Reworking Fido2Utils to remove references to the base Utils methods to allow the page-script.ts file to render at a lower file size
* [PM-5744] Implementing the `RegisterContentScriptPolyfill` as a separately compiled file as opposed to an import
* [PM-5744] Implementing methodology to ensure that the RegisterContentScript polyfill is not built in cases where it is not needed
* [PM-5744] Implementing methodology to ensure that the RegisterContentScript polyfill is not built in cases where it is not needed
* [PM-5744] Reverting package-lock.json
* [PM-5744] Implementing a methodology to ensure we can instantiate the RegisterContentScript polyfill in a siloed manner
* [PM-5744] Migrating chrome extension api calls to the BrowserApi class
* [PM-5744] Implementing typing information within the RegisterContentScriptsPolyfill
* [PM-5744] Removing any eslint-disable references within the RegisterContentScriptsPolyfill
* [PM-5744] Refactoring polyfill implementation
* [PM-5744] Refactoring polyfill implementation
* [PM-5744] Fixing an issue where Safari was not resolving the await chrome proxy
* [PM-5744] Fixing jest tests for the page-script append method
* [PM-5744] Fixing an issue found where collection of page details can trigger a context invalidated message when the extension is refreshed
* [PM-5744] Implementing jest tests for the added BrowserApi methods
* [PM-5744] Refactoring Fido2Background implementation
* [PM-5744] Refactoring Fido2Background implementation
* [PM-5744] Adding enums to the implementation for the Fido2 Content Scripts and working through jest tests for the BrowserApi and Fido2Background classes
* [PM-5744] Adding comments to the FIDO2 content-script.ts file
* [PM-5744] Adding jest tests for the Fido2 content-script.ts
* [PM-5744] Adding jest tests for the Fido2 content-script.ts
* [PM-5744] Adding jest tests for the Fido2 page-script.ts
* [PM-5744] Working through an attempt to jest test the page-script.ts file
* [PM-5744] Finalizing jest tests for the page-script.ts implementation
* [PM-5744] Applying stricter type information for the passed params within fido2-testing-utils.ts
* [PM-5744] Adjusting documentation
* [PM-5744] Adjusting implementation of jest tests to use mock proxies
* [PM-5744] Adjusting jest tests to simply implementation
* [PM-5744] Adjust jest tests based on code review feedback
* [PM-5744] Adjust jest tests based on code review feedback
* [PM-5744] Adjust jest tests based on code review feedback
* [PM-5744] Adjusting jest tests to based on feedback
* [PM-5744] Adjusting jest tests to based on feedback
* [PM-5744] Adjusting jest tests to based on feedback
* [PM-5744] Adjusting conditional within page-script.ts
* [PM-5744] Removing unnecessary global reference to the messager
* [PM-5744] Updating jest tests
* [PM-5744] Updating jest tests
* [PM-5744] Updating jest tests
* [PM-5744] Updating jest tests
* [PM-5744] Updating how we export the Fido2Background class
* [PM-5744] Adding duplciate jest tests to fido2-utils.ts to ensure we maintain functionality for utils methods pulled from platform utils
* [PM-5189] Addressing code review feedback
* [PM-5744] Applying code review feedback, reworking obserable subscription within fido2 background
* [PM-5744] Reworking jest tests to avoid mocking `firstValueFrom`
* [PM-5744] Reworking jest tests to avoid usage of private methods
* [PM-5744] Reworking jest tests to avoid usage of private methods
* [PM-5744] Implementing jest tests for the ScriptInjectorService and updating references within the Browser Extension to use the new service
* [PM-5744] Converting ScriptInjectorService to a dependnecy instead of a static class
* [PM-5744] Reworking typing for the ScriptInjectorService
* [PM-5744] Adjusting implementation based on feedback provided during code review
* [PM-5744] Adjusting implementation based on feedback provided during code review
* [PM-5744] Adjusting implementation based on feedback provided during code review
* [PM-5744] Adjusting implementation based on feedback provided during code review
* [PM-5744] Adjusting how the ScriptInjectorService accepts the config to simplify the data structure
* [PM-5744] Updating jest tests to cover edge cases within ScriptInjectorService
* [PM-5744] Updating jest tests to reference the ScriptInjectorService directly rather than the underlying ExecuteScript api call
* [PM-5744] Updating jest tests to reflect provided feedback during code review
* [PM-5744] Updating jest tests to reflect provided feedback during code review
* [PM-5744] Updating documentation based on code review feedback
* [PM-5744] Updating how we extend the abstract ScriptInjectorService
* [PM-5744] Updating reference to the frame property on the ScriptInjectionConfig
* refactored injector of services on the browser service module
* refactored the search and popup serach service to use state provider
* renamed back to default
* removed token service that was readded during merge conflict
* Updated search service construction on the cli
* updated to use user key definition
* Reafctored all components that refernce issearchable
* removed commented variable
* added uncommited code to remove dependencies not needed anymore
* added uncommited code to remove dependencies not needed anymore
* create mp and kdf service
* update mp service interface to not rely on active user
* rename observable methods
* update crypto service with new MP service
* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests
* update auth service and finish strategies
* auth request refactors
* more service refactors and constructor updates
* setMasterKey refactors
* remove master key methods from crypto service
* remove master key and hash from state service
* missed fixes
* create migrations and fix references
* fix master key imports
* default force set password reason to none
* add password reset reason observable factory to service
* remove kdf changes and migrate only disk data
* update migration number
* fix sync service deps
* use disk for force set password state
* fix desktop migration
* fix sso test
* fix tests
* fix more tests
* fix even more tests
* fix even more tests
* fix cli
* remove kdf service abstraction
* add missing deps for browser
* fix merge conflicts
* clear reset password reason on lock or logout
* fix tests
* fix other tests
* add jsdocs to abstraction
* use state provider in crypto service
* inverse master password service factory
* add clearOn to master password service
* add parameter validation to master password service
* add component level userId
* add missed userId
* migrate key hash
* fix login strategy service
* delete crypto master key from account
* migrate master key encrypted user key
* rename key hash to master key hash
* use mp service for getMasterKeyEncryptedUserKey
* fix tests
* fix user key decryption logic
* add clear methods to mp service
* fix circular dep and encryption issue
* fix test
* remove extra account service call
* use EncString in state provider
* fix tests
* return to using encrypted string for serialization
* create mp and kdf service
* update mp service interface to not rely on active user
* rename observable methods
* update crypto service with new MP service
* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests
* update auth service and finish strategies
* auth request refactors
* more service refactors and constructor updates
* setMasterKey refactors
* remove master key methods from crypto service
* remove master key and hash from state service
* missed fixes
* create migrations and fix references
* fix master key imports
* default force set password reason to none
* add password reset reason observable factory to service
* remove kdf changes and migrate only disk data
* update migration number
* fix sync service deps
* use disk for force set password state
* fix desktop migration
* fix sso test
* fix tests
* fix more tests
* fix even more tests
* fix even more tests
* fix cli
* remove kdf service abstraction
* add missing deps for browser
* fix merge conflicts
* clear reset password reason on lock or logout
* fix tests
* fix other tests
* add jsdocs to abstraction
* use state provider in crypto service
* inverse master password service factory
* add clearOn to master password service
* add parameter validation to master password service
* add component level userId
* add missed userId
* migrate key hash
* fix login strategy service
* delete crypto master key from account
* migrate master key encrypted user key
* rename key hash to master key hash
* use mp service for getMasterKeyEncryptedUserKey
* fix tests
* Adding the key definitions and tests and initial send state service
* Adding the abstraction and implementing
* Planning comments
* Everything but fixing the send tests
* Moving send tests over to the state provider
* jslib needed name refactor
* removing get/set encrypted sends from web vault state service
* browser send state service factory
* Fixing conflicts
* Removing send service from services module and fixing send service observable
* Commenting the migrator to be clear on why only encrypted
* No need for service factories in browser
* browser send service is no longer needed
* Key def test cases to use toStrictEqual
* Running prettier
* Creating send test data to avoid code duplication
* Adding state provider and account service to send in cli
* Fixing the send service test cases
* Fixing state definition keys
* Moving to observables and implementing encryption service
* Fixing key def tests
* The cli was using the deprecated get method
* The observables init doesn't need to happen in constructor
* Missed commented out code
* If enc key is null get user key
* Service factory fix
* Create tracker that can await until expected observables are received.
* Test dates are almost equal
* Remove unused class method
* Allow for updating active account in accout service fake
* Correct observable tracker behavior
Clarify documentation
* Transition config service to state provider
Updates the config fetching behavior to be lazy and ensure that any emitted value has been updated if older than a configurable value (statically compiled).
If desired, config fetching can be ensured fresh through an async.
* Update calls to config service in DI and bootstrapping
* Migrate account server configs
* Fix global config fetching
* Test migration rollback
* Adhere to implementation naming convention
* Adhere to abstract class naming convention
* Complete config abstraction rename
* Remove unnecessary cli config service
* Fix builds
* Validate observable does not complete
* Use token service to determine authed or unauthed config pull
* Remove superfluous factory config
* Name describe blocks after the thing they test
* Remove implementation documentation
Unfortunately the experience when linking to external documentation is quite poor. Instead of following the link and retrieving docs, you get a link that can be clicked to take you out of context to the docs. No link _does_ retrieve docs, but lacks indication in the implementation that documentation exists at all.
On the balance, removing the link is the better experience.
* Fix storybook
* updated vault filter service to make use of collection service
* removed fix me
* reverted to use reload collections on org vault as collection admin service does not support state management yet
* fixed statement
* collections component shows disable readOnly collections in the org vault edit collections modal, and will check if org allows Owners up manage all collections in ciphers
* create new user decryption options service
* rename new service to user decryption options
* add hasMasterPassword to user decryption options service
* migrate device trust service to new user decryption options service
* add migration for user-decryption-options
* migrate sync service and calls to trust-device-service
* rename abstraction file
* migrate two factor component
* migrate two factor spec
* migrate sso component
* migrate set-password component
* migrate base login decryption component
* migrate organization options component
* fix component imports
* add missing imports
- remove state service calls
- add update user decryption options method
* remove acct decryption options from account
* lint
* fix tests and linting
* fix browser
* fix desktop
* add user decryption options service to cli
* remove default value from migration
* bump migration number
* fix merge conflict
* fix vault timeout settings
* fix cli
* more fixes
* add user decryption options service to deps of vault timeout settings service
* update login strategy service with user decryption options
* remove early return from sync bandaid for user decryption options
* move user decryption options service to lib/auth
* move user decryption options to libs/auth
* fix reference
* fix browser
* check user decryption options after 2fa check
* update migration and revert tsconfig changes
* add more documentation
* clear user decryption options on logout
* fix tests by creating helper for user decryption options
* fix tests
* pr feedback
* fix factory
* update migration
* add tests
* update missed migration num in test
* add showFavicons to domain settings
* replace usages of disableFavicon with showFavicons via the domain settings service and remove/replace settings service
* create migration for disableFavicon
* cleanup
* Added billing account profile state service
* Update usages after removing state service functions
* Added migrator
* Updated bw.ts and main.background.ts
* Removed comment
* Updated state service dependencies to include billing service
* Added missing mv3 factory and updated MainContextMenuHandler
* updated autofill service and tests
* Updated the remaining extensions usages
* Updated desktop
* Removed subjects where they weren't needed
* Refactored billing service to have a single setter to avoid unecessary emissions
* Refactored has premium guard to return an observable
* Renamed services to match ADR
f633f2cdd8/docs/architecture/clients/presentation/angular.md (abstract--default-implementations)
* Updated property names to be a smidgen more descriptive and added jsdocs
* Updated setting of canAccessPremium to automatically update when the underlying observable emits
* Fixed build error after merge conflicts
* Another build error from conflict
* Removed autofill unit test changes from conflict
* Updated login strategy to not set premium field using state service
* Updated CLI to use billing state provider
* Shortened names a bit
* Fixed build
* added showCards and Identities to vault settings and then added migration file
* added migration file and removed fields from domain
* fixed merge conflicts
* create domain settings state provider
* replace callsites for defaultUriMatch and neverDomains with DomainSettingsService equivalents
* replace callsites for equivalentDomains with DomainSettingsService equivalents and clean up unused AccountSettingsSettings
* add migrations for domain settings state
* do not use enum for URI match strategy constants and types
* add getUrlEquivalentDomains test
* PR suggestions/cleanup
* refactor getUrlEquivalentDomains to return an observable
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* update tests
* add UriMatchStrategy docs notes
* service class renames
* use service abstraction at callsites previously using service class directly
---------
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* funnel rp name or id to the cipher name on save
* remove comment
* add rp name and id to addCipher function
---------
Co-authored-by: Merissa Weinstein <merissaweinstein@merissas-mbp-2.lan>