* PM-5501 - VaultTimeoutSettingsSvc - fix setVaultTimeoutOptions condition which needed to use never instead of null.
* PM-5501 - Fix browser and desktop not showing the never lock warning
* PM-5501 - Use true equality.
* Fix the subscription page issue for existing providers
* Merge branch 'main' into ac-2570-existing-providers-see-new-cb-experience-on-admin-console-org-billing-subscription-page
* Fix pr comment on error if the user isn't a provider user
* Resolve the pr comment on error for non provider user
* Remove unused property
* PM-5501 - VaultTimeoutSettingsSvc - refactor var names in getVaultTimeoutAction
* PM-5501 - Add state definitions and key definitions + test deserialization of key defs.
* PM-5501 - Add state provider dep to VaultTimeoutSettingsSvc
* PM-5501 - Refactor getVaultTimeout
* PM-5501 - VaultTimeoutSettingsService - Build getMaxVaultTimeoutPolicyByUserId helper
* PM-5501 - (1) Update state definitions (2) convert KeyDefs to UserKeyDefs (2) Remove everBeenUnlocked as we won't need it
* PM-5501 - VaultTimeoutSettingsSvc - POC for getVaultTimeoutActionByUserId$ method + new private determineVaultTimeoutAction helper.
* PM-5501 - VaultTimeoutSettingsSvc - build set and observable get methods for vault timeout settings
* PM-5501 - Update web references to use new vault timeout setting service methods
* PM-5501 - VaultTimeoutSettingsSvc - write up abstraction js docs
* PM-5501 - VaultTimeoutSettingsSvc abstraction - finish tweaks
* PM-5501 - VaultTimeoutSettingsSvc - add catchError blocks to observables to protect outer observables and prevent cancellation in case of error.
* PM-5501 - Remove vault timeout settings from state service implementation.
* PM-5501 - VaultTimeoutSettingsServiceStateProviderMigrator first draft
* PM-5501 - WIP - replace some state service calls with calls to vault timeout settings svc.
* PM-5501 - Replace state service calls in login strategies to get vault timeout settings data with VaultTimeoutSettingsService calls.
* PM-5501 - Fix login strategy tests
* PM-5501 - Update login strategy tests to pass
* PM-5501 - CryptoSvc - share VaultTimeout user key def to allow crypto svc access to the vault timeout without creating a circular dep.
* PM-5501 - Fix dependency injections.
* PM-5501 - ApiSvc - replace state svc with vault timeout settings svc.
* PM-5501 - VaultTimeoutSettingsServiceStateProviderMigrator more cleanup
* PM-5501 - Test VaultTimeoutSettingsServiceStateProviderMigrator
* PM-5501 - VaultTimeoutSettingsSvc tests updated
* PM-5501 - Update all setVaultTimeoutOptions references
* PM-5501 - VaultTimeoutSettingsSvc - Update setVaultTimeoutOptions to remove unnecessary logic and clean up clearTokens condition.
* PM-5501 - Fix vault timeout service tests
* PM-5501 - Update VaultTimeoutSettings state tests to pass
* PM-5501 - Desktop - system svc - fix build by replacing use of removed method.
* PM-5501 - Fix CLI by properly configuring super class deps in NodeApiService
* PM-5501 - Actually finish getitng deps fixed to get CLI to build
* PM-5501 - VaultTimeoutSettingsSvc.determineVaultTimeoutAction - pass userId to getAvailableVaultTimeoutActions to prevent hang waiting for an active user.
* PM-5501 - VaultTimeoutSettingSvc test - enhance getVaultTimeoutActionByUserId$ to also test PIN scenarios as an unlock method
* PM-5501 - bump migration version
* PM-5501 - Refactor migration to ensure the migration persists null vault timeout values.
* PM-5501 - Bump migration version
* PM-5501 - Fix web build issues introduced by merging main.
* PM-5501 - Bump migration version
* PM-5501 - PreferencesComponent - revert dep change from InternalPolicyService to standard PolicyService abstraction
* PM-5501 - Address all PR feedback from Jake
Co-authored-by: Jake Fink <jfink@bitwarden.com>
* PM-5501 - VaultTimeoutSettingsSvc tests - add tests for setVaultTimeoutOptions
* PM-5501 - VaultTimeoutSettingsSvc - setVaultTimeoutOptions - Update tests to use platform's desired syntax.
* PM-5501 - Fix tests
* PM-5501 - Create new VaultTimeout type
* PM-5501 - Create new DEFAULT_VAULT_TIMEOUT to allow each client to inject their default timeout into the VaultTimeoutSettingService
* PM-5501 - Migrate client default vault timeout to new injection token
* PM-5501 - Update VaultTimeoutSettingsSvc to use VaultTimeout type and apply default vault timeout if it is null.
* PM-5501 - Update vaultTimeout: number to be vaultTimeout: VaultTimeout everywhere I could find it.
* PM-5501 - More changes based on changing vaultTimeout from number to VaultTimeout type.
* PM-5501 - VaultTimeoutSvc - Update shouldLock logic which previously checked for null (never) or any negative values (any strings except never) with a simple string type check.
* PM-5501 - More cleanup of vaultTimeout type change - replacing null checks with "never" checks
* PM-5501 - VaultTimeoutSettingsSvc - refactor determineVaultTimeout to properly treat string and numeric vault timeouts.
* PM-5501 - Update vault timeout settings service tests to reflect new VaultTimeout type.
* PM-5501 - VaultTimeoutSettingsService - add more test cases for getVaultTimeoutByUserId
* PM-5501 - (1) Remove "immediately" as 0 is numerically meaningful and can be used with Math.min (2) Add VaultTimeoutOption interface for use in all places we show the user a list of vault timeout options.
* PM-5501 - VaultTimeoutSettingSvc - update tests to use 0 as immediately.
* PM-5501 - VaultTimeoutInputComp - Add new types and update applyVaultTimeoutPolicy logic appropriately.
* PM-5501 - Add new types to all preferences and setting components across clients.
* PM-5501 - Fix bug on web where navigating to the preferences page throws an error b/c the validatorChange function isn't defined.
* PM-5501 - WIP on updating vault timeout setting migration and rollback + testing it.
* PM-5501 - Update VaultTimeoutSettingsSvc state provider migration and tests to map existing possible values into new VaultTImeout type.
* PM-5501 - Fix vault timeout settings state tests by changing number to new VaultTimeout type.
* PM-5501 - Fix crypto svc auto key refresh test to use "never" instead of null.
* PM-5501 - Add clarifying comment to vaulttimeout type
* PM-5501 - Desktop app comp - replace systemTimeoutOptions with vault timeout type.
* PM-5501 - Update vault timeout service tests to use VaultTimeout type.
* PM-5501 - VaultTimeoutSettingsSvc - (1) Fix bug where vault timeout action didn't have a default like it did before (2) Fix bug in userHasMasterPassword where it would incorrectly return the active user stream for a given user id as a fallback. There is no guarantee the given user would match the active user so the paths are mutually exclusive.
* PM-5501 - Login Strategy fix - Move retrieval of vault timeout settings and setting of the tokens until after account init and user decryption options set as those opts are needed to properly determine the user's available vault timeout actions.
* PM-5501 - Fix vault timeout settings svc tests
* PM-5501 - VaultTimeoutSettingSvc - move default logic to determine methods + refactor default vault timeout action to properly default to lock in scenarios the user has lock available.
* Update libs/angular/src/components/settings/vault-timeout-input.component.ts
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
* PM-5501 - Per PR feedback, cleanup commented out vault timeout options
* PM-5501 - Fix vault timeout input comp lint issues
* PM-5501 - Per PR feedback from Cesar, update VaultTimeout type to use const so we can avoid any magic string usage. Awesome.
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
* PM-5501 - CLI - use "never" as default vault timeout instead of null.
* PM-5501 - Fix broken tests
* PM-5501 - Bump migration version
* PM-5501 - Fix build errors after merging main.
* PM-5501 - Update mockMigrationHelper to pass along client type so tests will respect it.
* PM-5501 - Update VaultTimeoutSettingsServiceStateProviderMigrator and tests to use new CLI client type to convert undefined values to never so that CLI users don't lose their session upon running this migration.
* PM-5501 - Bump migration version
* PM-5501 - Fix migration tests to use new authenticated user format
* PM-5501 Update rollback tests
* PM-5501 - Adjust migration based on feedback.
* PM-5501 - Per Jake's find, fix missed -2
Co-authored-by: Jake Fink <jfink@bitwarden.com>
* PM-5501 - Add user id to needsStorageReseed.
Co-authored-by: Jake Fink <jfink@bitwarden.com>
* PM-5501 - Per PR feedback, setVaultTimeoutOptions shouldn't accept null for vault timeout anymore.
* PM-5501 - Per PR feedback, add null checks for set methods for setting vault timeout or vault timeout action.
* PM-5501 - Per PR feedback, add more context as to why we need vault timeout settings to persist after logout.
* PM-5501 - Per PR feedback, fix userHasMasterPassword
* PM-5501 - VaultTimeoutSettingsService - fix userHasMasterPassword check by checking for null decryption options.
* PM-5501 - Remove state service from vault timeout settings service (WOOO)
* PM-5501 - Bump migration version
* PM-5501 - Account Security comp - refactor to consider ease of debugging.
* PM-5501 - (1) Add checks for null vault timeout and vault timeout actions (2) Add tests for new scenarios.
* PM-5501 - VaultTimeoutSettingsSvc - setVaultTimeoutOptions - fix bug where nullish check would throw incorrectly if immediately (0) was picked as the timeout.
* PM-5501 - Per PR feedback, clean up remaining token service methods which accept null for timeout and add tests. .
* PM-5501 - Fix nit
---------
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
* [AC-2484] Fix bug where Custom Users with "Delete any collection" permission incorrectly see "Can Edit" permission for Unassigned Collection
* [AC-2484] Undo change on permission tooltip permission check
* [AC-2484] Fix permission text for unassigned collection
* Move pop-out.component into platform ownership
* Make pop-out.component standalone
* Fix no-floating-promises
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* initial commit
* fixed issue with clearing search index state
* clear user index before account is totally cleaned up
* added logout clear on option
* removed redundant clear index from logout
* Implemented user verification logic for the different use cases, added functions to pompt for user to set pin
* added missing await and removed else if conditionals
* fixed no return after user sets pin
* added comment to further explain user verification when user is coming from lock screen
* [PM-7836] UV not properly used when creating an item from [+] or Save passkey as new item (#8993)
* added user verification using the save new login button and + button
* removed commented out code
* [PM-7808][PM-7848] UV Preferred/Required, Item has MP reprompt, user without MP incorrectly bypasses UV and When UV = discouraged, cannot save passkey to item using [+] button (#9015)
* Move about.component into tools ownership
* Split out account security settings
Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json
* Move vault-timeout-input.component to auth
* Move await-desktop-dialog.component to auth
* Add transition for account-security
* Create notifications settings component
* Move excluded-domains component over to be owned by team-autofill
* Add notifications entry to settings screen
* Move excluded domains from settings to notifications settings screen
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* move pinKeyEncryptedUserKey
* move pinKeyEncryptedUserKeyEphemeral
* remove comments, move docs
* cleanup
* use UserKeyDefinition
* refactor methods
* add migration
* fix browser dependency
* add tests for migration
* rename to pinService
* move state to PinService
* add PinService dep to CryptoService
* move protectedPin to state provider
* update service deps
* renaming
* move decryptUserKeyWithPin to pinService
* update service injection
* move more methods our of crypto service
* remove CryptoService dep from PinService and update service injection
* remove cryptoService reference
* add method to FakeMasterPasswordService
* fix circular dependency
* fix desktop service injection
* update browser dependencies
* add protectedPin to migrations
* move storePinKey to pinService
* update and clarify documentation
* more jsdoc updates
* update import paths
* refactor isPinLockSet method
* update state definitions
* initialize service before injecting into other services
* initialize service before injecting into other services (bw.ts)
* update clearOn and do additional cleanup
* clarify docs and naming
* assign abstract & private methods, add clarity to decryptAndMigrateOldPinKeyEncryptedMasterKey() method
* derived state (attempt)
* fix typos
* use accountService to get active user email
* use constant userId
* add derived state
* add get and clear for oldPinKeyEncryptedMasterKey
* require userId
* move pinProtected
* add clear methods
* remove pinProtected from account.ts and replace methods
* add methods to create and store pinKeyEncryptedUserKey
* add pinProtected/oldPinKeyEncrypterMasterKey to migration
* update migration tests
* update migration rollback tests
* update to systemService and decryptAndMigrate... method
* remove old test
* increase length of state definition name to meet test requirements
* rename 'TRANSIENT' to 'EPHEMERAL' for consistency
* fix tests for login strategies, vault-export, and fake MP service
* more updates to login-strategy tests
* write new tests for core pinKeyEncrypterUserKey methods and isPinSet
* write new tests for pinProtected and oldPinKeyEncryptedMasterKey methods
* minor test reformatting
* update test for decryptUserKeyWithPin()
* fix bug with oldPinKeyEncryptedMasterKey
* fix tests for vault-timeout-settings.service
* fix bitwarden-password-protected-importer test
* fix login strategy tests and auth-request.service test
* update pinService tests
* fix crypto service tests
* add jsdoc
* fix test file import
* update jsdocs for decryptAndMigrateOldPinKeyEncryptedMasterKey()
* update error messages and jsdocs
* add null checks, move userId retrievals
* update migration tests
* update stateService calls to require userId
* update test for decryptUserKeyWithPin()
* update oldPinKeyEncryptedMasterKey migration tests
* more test updates
* fix factory import
* update tests for isPinSet() and createProtectedPin()
* add test for makePinKey()
* add test for createPinKeyEncryptedUserKey()
* add tests for getPinLockType()
* consolidate userId verification tests
* add tests for storePinKeyEncryptedUserKey()
* fix service dep
* get email based on userId
* use MasterPasswordService instead of internal
* rename protectedPin to userKeyEncryptedPin
* rename to pinKeyEncryptedUserKeyPersistent
* update method params
* fix CryptoService tests
* jsdoc update
* use EncString for userKeyEncryptedPin
* remove comment
* use cryptoFunctionService.compareFast()
* update tests
* cleanup, remove comments
* resolve merge conflict
* fix DI of MasterPasswordService
* more DI fixes
* Move about.component into tools ownership
* Split out account security settings
Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json
* Move vault-timeout-input.component to auth
* Move await-desktop-dialog.component to auth
* Add transition for account-security
* Create appearance settings component
* Add entry in settings to navigate to the appearance settings page
* Add transition animation for settings to appearance and back
* Remove settings from options that are now under appearance
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Move about.component into tools ownership
* Split out account security settings
Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json
* Move vault-timeout-input.component to auth
* Move await-desktop-dialog.component to auth
* Move folder.component to vault/popup/settings
* Move sync.component to vault/popup/settings
* Create vault settings component
Move controls from settings.component.html to vault-settings.component.html
Register VaultSettingsComponent within app.module
Register route for VaultSettingsComponent
Add new string in en/messages.json
* Fix routing for back navigation on child pages of vault settings
* Add transitions to vault-settings sub-pages
* Add transition for account-security
* Add an await to popping out the extension
* Use "Vault" instead of "Vault settings" as title
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Move about.component into tools ownership
* Split out account security settings
Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json
* Move vault-timeout-input.component to auth
* Move await-desktop-dialog.component to auth
* Add transition for account-security
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>