* Sent initiation path for organization and user signups
* Rename organizationQueryParameter > organizationTypeQueryParameter
* Jared's feedback
* Split PM & SM initiation path
* create auth request service
* copy methods from auth crypto service
* register new auth request service
* remove refs to auth request crypto service
* remove auth request crypto service
* remove passwordless login method from login strategy service
* add docs to auth request service
* [PM-6416] Inline autofill menu does not show if notification bar turned off
* [PM-6416] Inline autofill menu does not show if the notification bar has been turned off
* [deps] Tools: Update electron to v28.2.4
* Bump version in electron-builder.json
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* [PM-6352] Autofill functionality not working with re-hydtrated DOM elements
* [PM-6352] Autofill functionality not working with re-hydtrated DOM elements
* [PM-6352] Fixing issue found with chrome.dom.openOrClosedShadowRoot call
* [PM-6352] Implementing jest tests and adding utils methods where appropriate
* [PM-6352] Implementing jest tests and adding utils methods where appropriate
* [PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker
* [PM-5742] Implementing jest tests for the updated BrowserApi methods
* [PM-5742] Implementing jest tests to validate logic within added API calls
* [PM-5742] Implementing jest tests to validate logic within added API calls
* [PM-5742] Fixing broken Jest tests
* [PM-5742] Fixing linter error
* [PM-5881] Adjust usage of the `chrome.extension.getViews` API to ensure expected behavior in manifest v3
* [PM-5881] Reworking how we handle early returns from `reloadOpenWindows`
* [PM-5881] Implementing jest test to validate changes within BrowserApi.reloadOpenWindows
* migrate clearClipboard account setting to autofill settings state provider
* replace state service get/set clearClipboard with autofill settings service equivalents
* PR suggestions cleanup
* [PM-5679] Capture all form data from page when selecting "New item" even if popout is already open
* [PM-5679] Capture all form data from page when selecting "New item" even if popout is already open
* [PM-5697] Fixing floating promise within the handleExtensionMessage method
* [AC-2195] Update canEditAnyCipher permission to make an exception for Custom users with editAnyCollection permission
* [AC-2195] Update V1 FC flag check to include check for an organization's FC status
* [AC-2195] Remove redundant collection management setting check that was hiding the restricted access message for custom users with deleteAnyCollection
* [AC-2195] Ensure users with canEditAnyCollections can edit all collections
* WIP admin console layout
* Update icons
* Migrate more things
* Migrate the last pages
* Move header to web
* Fix story not working
* Convert header component to standalone
* Migrate org layout to standalone
* Enable org switcher
* Add AC to product switcher
* Migrate provider portal to vertical nav
* Migrate PM
* Prettier fixes
* Change AC and PP to use secondary variant layout & update logos
* Remove full width setting
* Remove commented code
* Add header to report pages
* Add provider portal banner
* Fix banner for billing pages
* Move vault title to header
* Prevent scrollbar jumping
* Move send button to header
* Replace search input with bit-search
* Remove unused files and css
* Add banner
* Tweak storage option
* Fix duplicate nav item after merge
* Migrate banner state to state provider framework
* [AC-2078] Fix device approvals header
* [PM-5861] Hide AC from product switcher for users that do not have access
* [PM-5860] Fix Vault and Send page headers
* [AC-2075] Fix missing link on reporting nav group
* [AC-2079] Hide Payment Method and Billing History pages for self-hosted instances
* [AC-2090] Hide reports/event log nav items for users that do not have permission
* [AC-2092] Fix missing provider portal option in product switcher on page load
* Add null check for organization in org layout component
* [AC-2094] Fix missing page header for new client orgs page
* [AC-2093] Update New client button styling
* Fix failing test after merge
* [PM-2087] Use disk-local for web layout banner
* [PM-6041] Update banner copy to read "web app"
* [PM-6094] Update banner link to marketing URL
* [PM-6114] add CL container component to VVR pages (#7802)
* create bit-container component
* add container to all page components
* Fix linting errors after merge with main
* Fix product switcher stories
* Fix web-header stories
* mock org state properly in product switcher stories (#7956)
* refactor: move web layout migration banner logic into a service (#7958)
* make CL codeowner of web header files
* move migration banner logic to service; update stories
* [PM-5862] Ensure a sync has run before hiding navigation links
* Remove leftover banner global state
* Re-add dropped selfHosted ngIf
* Add rel noreferrer
* Remove comment
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
* [PM-673] Safari Notification Bar Does Not Show Folders
* [PM-673] Refactoring Context Menu Implementations to Ensure Pages with No Logins Can Dismiss Notification Bar
* [PM-673] Refactoring typing information for the LockedVaultPendingNotificationsItem typing
* [PM-673] Refactoring typing information for notification background
* [PM-673] Finishing out typing for potential extension messages to the notification bar;
* [PM-673] Working through implementation details for the notification background
* [PM-673] Fixing issues present with messaging re-implementation
* [PM-673] Fixing issue with folders not populating within Safari notification bar
* [PM-673] Fixing jest test issues present within implementation
* [PM-673] Fixing issue present with webVaultUrl vulnerability
* [PM-673] Fixing XSS Vulnerability within Notification Bar;
* [PM-5670] Putting together a partial implementation for having messages appear on network error within the notification bar
* [PM-673] Incorporating status update for when user has successfully saved credentials
* [PM-673] Incorporating status update for when user has successfully saved credentials
* [PM-5949] Refactor typing information for notification bar
* [PM-5949] Fix jest tests for overlay background
* [PM-5949] Removing unnused typing data
* [PM-5949] Fixing lint error
* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method
* [PM-5949] Fixing jest test for overlay
* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation
* [PM-5950] Adding jest test for cipherContextMenu.update method
* [PM-5950] Adding documentation for method within MainContextMenuHandler
* [PM-5950] Adding jest tests for the mainContextMenuHandler
* [PM-673] Stripping unnecessary work for network drop issue
* [PM-673] Stripping unnecessary work for network drop issue
* [PM-2753] Prompt to Save New Login Credentials Silently Drops Data on Network Error
* [PM-673] Stripping out work done for another ticket
* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-2753] Implementing jest tests to validate logic changes
* [PM-2753] Implementing jest tests to validate logic changes
* [PM-2753] Implementing jest tests to validate logic changes
* [PM-2753] Implementing jest tests to validate logic changes
* [PM-2753] Incorporating addition of green and red borders when success or error events occur
* [PM-5950] Fixing unawaited context menu promise
* [PM-673] Merging changes in from main and fixing merge conflicts
* [PM-2753] Merging work in from main and resolving merge conflicts
* [PM-673] Fixing issue where updates to the added login were not triggering correctly
* [PM-673] Merging changes in from main and fixing merge conflicts
* Fix nextMock arguments
* Add state for biometric prompts
* Use biometric state for prompts
* Migrate biometric prompt data
* wire up biometric state to logouts
* Add migrator to migrate list
* Remove usages of prompt automatically
Explicitly list non-nulled state as intentional
* `npm run prettier` 🤖
* Fix web lock component
* create key generation service
* replace old key generation service and add references
* use key generation service in key connector service
* use key generation service in send service
* user key generation service in access service
* use key generation service in device trust service
* fix tests
* fix browser
* add createKeyFromMaterial and tests
* create ephemeral key
* fix tests
* rename method and add returns docs
* ignore material in destructure
* modify test
* specify material as key material
* pull out magic strings to properties
* make salt optional and generate if not provided
* fix test
* fix parameters
* update docs to include link to HKDF rfc
* [PM-5741] Reworking usage of `window` object in BrowserApi.reloadExtension method
* [PM-5741] Reworking usage of `window` object in BrowserApi.reloadExtension method
* Move user key memory state to state providers
Note: state service observable change is because these updates are no longer internal to the class, but reporter directly to account service through crypto service on update of a user key
* remove decrypted user key state
Note, we're going to move the encrypted cryptoSymmetric key (and associated master key encrypted user keys) as part of the master key service creation. Crypto service will no longer be responsible for the encrypted forms of user key.
* Deprecate notices belong on abstraction
* Allow for single-direction status updates
This is necessary since we don't want to have to guarantee that the update to logged out occurs after the update to locked.
* Remove deprecated subject
It turns out the set for cryptoMasterKey was also unused 🎉
* [AC-2193] Hide collection access restricted state when there are visible sub-collections
* [AC-2193] Undo change to showCollectionAccessRestricted
* [AC-2193] Update not items and access restricted views to only show if there are both no collections or items available
* [PM-673] Safari Notification Bar Does Not Show Folders
* [PM-673] Refactoring Context Menu Implementations to Ensure Pages with No Logins Can Dismiss Notification Bar
* [PM-673] Refactoring typing information for the LockedVaultPendingNotificationsItem typing
* [PM-673] Refactoring typing information for notification background
* [PM-673] Finishing out typing for potential extension messages to the notification bar;
* [PM-673] Working through implementation details for the notification background
* [PM-673] Fixing issues present with messaging re-implementation
* [PM-673] Fixing issue with folders not populating within Safari notification bar
* [PM-673] Fixing jest test issues present within implementation
* [PM-673] Fixing issue present with webVaultUrl vulnerability
* [PM-673] Fixing XSS Vulnerability within Notification Bar;
* [PM-5670] Putting together a partial implementation for having messages appear on network error within the notification bar
* [PM-673] Incorporating status update for when user has successfully saved credentials
* [PM-673] Incorporating status update for when user has successfully saved credentials
* [PM-5949] Refactor typing information for notification bar
* [PM-5949] Fix jest tests for overlay background
* [PM-5949] Removing unnused typing data
* [PM-5949] Fixing lint error
* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method
* [PM-5949] Fixing jest test for overlay
* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation
* [PM-5950] Adding jest test for cipherContextMenu.update method
* [PM-5950] Adding documentation for method within MainContextMenuHandler
* [PM-5950] Adding jest tests for the mainContextMenuHandler
* [PM-673] Stripping unnecessary work for network drop issue
* [PM-673] Stripping unnecessary work for network drop issue
* [PM-673] Stripping out work done for another ticket
* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-673] Implementing unit test coverage for newly introduced logic
* [PM-5950] Fixing unawaited context menu promise
* [PM-673] Merging changes in from main and fixing merge conflicts
* [PM-673] Fixing issue where updates to the added login were not triggering correctly
* [PM-673] Merging changes in from main and fixing merge conflicts
* [PM-5949] Refactor typing information for notification bar
* [PM-5949] Fix jest tests for overlay background
* [PM-5949] Removing unnused typing data
* [PM-5949] Fixing lint error
* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method
* [PM-5949] Fixing jest test for overlay
* [PM-5950] Fix Context Menu Update Race Condition and Refactor Implementation
* [PM-5950] Adding jest test for cipherContextMenu.update method
* [PM-5950] Adding documentation for method within MainContextMenuHandler
* [PM-5950] Adding jest tests for the mainContextMenuHandler
* [PM-5950] Removing unnecessary return value from MainContextMenuHandler.create method
* [PM-5950] Fixing unawaited context menu promise
* [PM-4756] feat: set BE and BS flags
* [PM-4755] feat: add support for credProps.rk
* [PM-4755] feat: add extension support to page-script object mapping
* Create state for biometric client key halves
* Move enc string util to central utils
* Provide biometric state through service
* Use biometric state to track client key half
* Create migration for client key half
* Ensure client key half is removed on logout
* Remove account data for client key half
* Remove unnecessary key definition likes
* Remove moved state from account
* Fix null-conditional operator failure
* Simplify migration
* Remove lame test
* Fix test type
* Add migrator
* Remove state that is never read.
* Remove unnecessary biometric state
We don't need to determine platform in desktop background, it can be done in the UI at any time.
* Fix merge
* Use platform utils to identify OS desktop type
* [deps] Tools: Update electron to v28.2.3
* Bump version in electron-builder
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* update collection service to use new state provider framework, remove stateservice from collection service, update collections state provider with migrate file and unit test
* enable duo for desktop
* added missing return path in main.ts
* updated logic in component
* removed switch added await; updated logic in main.
* addressed subscription concerns in main; updated formatting in 2fa component
* Update Duo case in locales
* Create MigrationRunner
- Create MigrationRunner Service for running migrations in StateService
- Create web override so that migrations also run against `localStorage`
* Fix Web StateService
* Fix WebMigrationRunner
* Fix CLI
* Fix ElectronStateService
* Update Comment
* More Common Scenarios
* Move libs/exporter into libs/tools/*
Migrating all files from libs/exporter over to libs/tools/export/vault-export/vault-export-core
Rename package to vault-export-core
Fix all file paths
* Update libs and tsconfig imports
* Fix client imports
* Fix eslint, jest and package-lock.json
* Update CODEOWNERS
* Add README.md to whitelist-capital-letters
* Fix vault-export-service tests not running
* Update libs/tools/export/vault-export/README.md
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
* Fix types imports
* Export types from vault-export-core
* Fixed content of README
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
* Removed passwordless-login feature flag
* Removed conditional on login component.
* Added back reference accidentally deleted.
* Fixed initialization of the service in tests.
* Removed unused private variable.
* Updated DI to remove configService
* Undid changes to workspace file.
* Undid all changes to workspace file
* Undid merge changes to collection dialog
* Linting
* Begin migration of autofill settings
Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>
* add browser dependency for AutofillSettingsService
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* update autofill settings service
* replace usages of stateService get/set autofillOnPageLoad with autofillSettingsService
* replace usages of stateService get/set autofillOnPageLoadDefault with autofillSettingsService
* replace usages of stateService get/set autoCopyTotp with autofillSettingsService
* replace usages of stateService get/set autoFillOnPageLoadCalloutIsDismissed with autofillSettingsService
* replace usages of stateService get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService
* replace usages of get/set autoFillOverlayVisibility with autofillSettingsService
* inlineMenuVisibility should use global state
* add the AutofillSettingsService to background scripts
* fix typing
* replace additional usages of get/set autoFillOverlayVisibility and disableAutoTotpCopy with autofillSettingsService equivalents
* replace additional usages of get/set autofillOnPageLoadDefault with autofillSettingsService equivalent
* replace additional usages of get/set activateAutoFillOnPageLoadFromPolicy with autofillSettingsService equivalent
* remove additional deprecated and unused state service calls
* improve naming conventions and consistency
* fix missing mock for policy service test
* replace missing overlay background tests
* cleanup
* fix double inversion
* fix reference to wrong setter
* move handleActivateAutofillPolicy out of BrowserPolicyService
* create state migration script
* resolve linting issues
* remove migrated setting properties
* add AutofillSettingsSErvice to jslib-services
* handle conditional content script loading via autofillOnPageLoad check
* add deprecated note to getFromLocalStorage
* add jsdoc decorators to new autofill service methods
* handle undefined globalState
* move autofill settings out of BrowserPolicyService
* Move autofill settings code out of policyService
* fix tests
* fix typo in state definition
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Cesar Gonzalez <cagonzalezcs@users.noreply.github.com>
Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Colton Hurst <coltonhurst@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* [deps] Tools: Update electron to v28.2.2
* Bump version in electron-builder.json
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* [PM-5949] Refactor typing information for notification bar
* [PM-5949] Fix jest tests for overlay background
* [PM-5949] Removing unnused typing data
* [PM-5949] Fixing lint error
* [PM-5949] Adding jest tests for convertAddLoginQueueMessageToCipherView method
* [PM-5949] Fixing jest test for overlay
* Change passphrase generator's default wordSeparator to the empty string ''
* Create DefaultPassphraseGenerationOptions
* Use DefaultPassphraseGenerationOptions.wordSeparator in passphrase generation
* Add `empty` separator option to passphrase generator CLI and an example
* Change DefaultPassphraseGenerationOptions numWords to 3
* Use `DefaultPassphraseGenerationOptions.numWords` in CLI passphrase gen
* [AC-1124] Add getManyFromApiForOrganization to cipher.service.ts
* [AC-1124] Use getManyFromApiForOrganization when a user does not have access to all ciphers
* [AC-1124] Vault changes
- Show new collection access restricted view
- Include unassigned ciphers for restricted admins
- Restrict collections when creating/cloning/editing ciphers
* [AC-1124] Update edit cipher on page navigation to check if user can access the cipher
* [AC-1124] Hide ciphers from restricted collections
* [AC-1124] Ensure providers are not shown collection access restricted view
* [AC-1124] Modify add-edit component to call the correct endpoint when a restricted admin attempts to add-edit a cipher
* [AC-1124] Fix bug after merge with main
* [AC-1124] Use private this._organization
* [AC-1124] Fix broken builds
* create sso service
* rename sso service to sso-login service
* rename service
* add references to sso login service and update state calls
* fix browser
* fix desktop
* return promises
* remove sso state from account and global objects
* more descriptive org sso identifier method names
* fix sso tests
* fix tests
* Disable node integration and enable context isolation
* Review comments
* Log in renderer through IPC
* Missed imports
* Mock electron API
* resourcesPath is undefined in the preload, but process.windowsStore works correctly
* Replace fromBufferToUtf8 conditional implementation for the `buffer` package
The current non-node implementation is different than the node implementation,
as the non-node would break when the contents can't be parsed as a URI component.
Replacing the impl by the `buffer` package makes the result match in both environments.
* Fix lint
* Add some more tests
* Remove buffer from devDependencies
* [PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker
* [PM-5742] Implementing jest tests for the updated BrowserApi methods
* [PM-5742] Implementing jest tests to validate logic within added API calls
* [PM-5742] Implementing jest tests to validate logic within added API calls
* [PM-5742] Fixing broken Jest tests
* [PM-5742] Fixing linter error
* [AC-1899] Only take the first emission of feature flags and organizations to avoid overwriting form values
* [AC-1899] Fix flexibleCollections flag to update when selected org changes
* [AC-1899] Prettier
* Wire up key definitions for OrganizationService
[`AC-2009`: Transition OrganizationService to use StateProvider](
https://bitwarden.atlassian.net/browse/AC-2009)
In order to support the new `StateProvider` APIs for managing
application state this commit modifies `OrganizationService` in the following
ways:
1. Adding a `KeyDefinition` object to `OrganizationService` to store the
`organization` record in `StateProvider`.
1. Injecting `StateProvider` and wiring up `OrganizationService` to read
from the `organizations` key definition for the active user account.
1. Expanding the capabilities of `OrganizationData` to be able to read
itself from a JSON string. Previously this was handled directly by
`StateService`.
1. Updating tests to include requirements for testing against
`StateProvider`.
1. Marking the existing `StateService`-backed `organizations`
`Observable` and `BehaviorSubject` as deprecated.
This is largely unimplemented code with no intended visible effects to
the system. Implementing getting & updating the `organizations` value
from `StateProvider` will the next step in this work.
* Rework null check on OrganizationData
* Remove deprecation signals for the time being
* Move key definition inline with its service
* Create date objects when deserialzing json from state
* added state definition and key definition
* created vault settings service
* created enable passkeys migrations
* created enable passkeys migrations
* renamed the state definition
* created vault settings service
* updated enable passkey key definition
* updated references with vault settings service
* renamed files to avoid conflict
* removed set and get enable passkeys from state service
* removed comment
* fixed comments
* added readonly keyword
* removed service registartion from service module
* removed readonly keyword from abstract class
* swicted to used optional chaining
* renamed files
* added disk-local argument for web
* [PM-5277] Introduce lastSync state via State Providers
* [PM-5277] Add migrator and tests
* [PM-5277] Use memory for web storage location
* [PM-5277] Remove lastSync methods from state service
* [PM-5277] Remove lastSync from AccountProfile
* [PM-5277] Use string instead of Date to fix serialization for chrome.storage API in Browser
* [PM-5277] Only set account if lastSync was deleted during migration
* [PM-5277] Fix spec file
* added state definitionand key definition for folder service
* added data migrations
* created folder to house key definitions
* deleted browser-folder-service and added state provider to the browser
* exposed decrypt function so it can be used by the key definition, updated folder service to use state provider
* removed memory since derived state is now used
* updated test cases
* updated test cases
* updated migrations after merge conflict fix
* added state provider to the folder service constructor
* renamed migration file
* updated comments
* updated comments
* removed service registartion from browser service module and removed unused set and get encrypted folders from state service
* renamed files
* added storage location overides and removed extra methods
* refactor login strategies into own service
* create login service factory
* replaces instances of authService with loginStrategyService
* replace more instances of authService
* move logout back to auth service
* add browser dependencies
* fix desktop dependencies
* fix cli dependencies
* fix lint and test files
* fix anonymous hub deps
* fix webauthn-login service deps
* add loginstrategyservice to bg
* move login strategy service and models to auth folder
* revert changes to tsconfig
* use alias for imports
* fix path
---------
Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
* [PM-5368] Open Duo auth url. Add BroadcastChannel listener for duo result.
* [PM-5368] Remove debug line. Use PlatformUtilService to launch Uri.
* PM-5368 - Some progress on getting new frameless duo implementation in place
* PM-5368 - Base2FAComp - Save off duoFramelessUrl for use later on as user must be given the option to remember the device before launching the duo frameless flow in the new tab.
* PM-5368 - Web - 2FA Comp - (1) Only show larger width when showing backwards compatible duo (2) Stack buttons per new design (3) selectedProviderType === providerType.OrganizationDuo is correct check for when org requires DUO
* PM-5368 - Web - 2FA Comp - translate duo stuff
* PM-4613 - Browser 2FA - Get most of DUO frameless in place. WIP. Must figure out how to transfer state from popup to popout + add popout logic to auth-popout-windows.ts. Converted existing useAnotherTwoStepMethod button to use new comp lib bitButton per design.
* PM-4613 - Browser 2FA Comp - (1) HTML - add margin around duo frameless text to match figma (2) Get popout extension logic working properly - now closes existing popup
* PM-4613 - TODO figure out communication between web and browser as broadcast channel will not work.
* PM-5368 - Base comp + web changes - (1) Base component now has a setupDuoResultListener method for child classes to override (2) Web overrides setupDuoResultListener and cleans up broadcast channel once a duo result comes through.
* PM-4613 - Browser - (1) Add window message handling to content-message-handler content script to pass along the duo result message to the browser extension (2) 2FA comp - override setupDuoResultListener and use browserMessagingApi to listen to duoResult and submit when it comes through.
* PM-5368 - Web - 2FA comp - only clean up duo result channel on ngDestroy so that user can re-submit if an error occurs.
* PM-5368 and PM-4613 - (1) Update base 2FA comp to only initialize duo result listener once as init is called any time the user changes 2FA option if multiple are present (duo org and duo personal) (2) Each client now will only create a listener once even if it is called more than once (3) On web, only try to clean up the duoResultChannel if it was created to avoid erroring on other 2FA methods.
* PM-5368 - Base 2FA comp - add TODO to remove duo SDK handling once we remove the duo-redirect flag
* PM-5368 - Per PR feedback, avoid repetition of duo provider check by using a new public property for isDuoProvider
* PM-4613 - Per PR feedback: (1) Deconstruct code out of data (2) Add test for duoResult.
---------
Co-authored-by: André Bispo <abispo@bitwarden.com>
* Create state for biometric client key halves
* Move enc string util to central utils
* Provide biometric state through service
* Use biometric state to track client key half
* Create migration for client key half
* Ensure client key half is removed on logout
* Remove account data for client key half
* Remove unnecessary key definition likes
* Remove moved state from account
* Fix null-conditional operator failure
* Simplify migration
* Remove lame test
* Fix test type
* Add migrator
* Prefer userKey when legacy not needed
* Fix tests
* [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3
* [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3
* [PM-5976] Removing usage of pinging system and keeping reworked top-level registration of window message listener events
* [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts
* [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts
* [PM-5976] Removing the useCapture value within the window message event listener
* [deps] Tools: Update electron to v28.2.1
* Bump version in electron-builder.json
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Implementing pinging system for SSO to address issue on Safari with race condition
* Implementing pinging system for SSO to address issue on Safari with race condition
* [PM-5976] Updating references within sso.ts
---------
Co-authored-by: Cesar Gonzalez <cgonzalez@bitwarden.com>
* PM-5976 - Only try to initiate browser SSO when document is ready to avoid race condition between browser content script message listener being registered and the browser sso initiating message being sent.
* PM-5976 - adjust initiateBrowserSsoIfDocumentReady per PR feedback
* Got trial page working without the form set up
* Set up the form to create SM subscription
* Add free SM trial page and sign up
* Conner's changes
* fixed imports
* Set isFromSecretsManagerTrial
* Fixed OrgKey location
* Add isFromSecretsManager prop to free org create
* Add LTO callout
* Switch LTO to background box
* Defect: AC-2081
* Fixed typo "Secrets Manger" to "Secrets Manager"
* Removed discount price logic for storage and secrets manager prices since they don't apply
---------
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
* Added logic to only return organisations where user has import permissions and collections that he manages on Import
* Changed the UnassignedCollections validation logic
* Added validation to check if the user is coming from AdminConsole on the import component
* Added import collection service abstraction to allow get admin collections
* Corrected feature flag reads on import component
* Refactor import component methods ngOnInit and performImport to improve codescene
Using FeatureFlag Observable
* Modified validation to allow import if user has organizations to import into
* Using the new organization flexiblecollections property on import
* Created collection-admin-import.service to return all the org collections to the import on Admin Console
* Small changes on import flexible collections
* Fix linting issues
* changed canAccessImport rules and deprecated canAccessImportExport
* Validating if user canAccessImportExport instead of admin before calling the handleOrganizationImportInit.
* AC-2095 - Corrected getAllAdminCollections from ImportCollectionAdminService to properly get all the collections on AdminConsole
* Reverting AC-2095
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Split export service into vault and org export service
* Changed CLI logic to use split export logic
* correct unit tests
* Created individual export service, export service making the calls for org and ind vault
* Improved code readability
* Merged PasswordProtectedExport with Export methods to simplify calls
* Some small refactor
* [AC-1492] Managed collections export (#7556)
* Added managed collections export method
Added logic to show orgs on export that the user can export from
* Merge branch 'tools/AC-1492/split-export-services' into tools/AC-1492/export-flexible-collections
# Conflicts:
# apps/web/src/app/admin-console/organizations/tools/vault-export/org-vault-export.component.ts
# apps/web/src/app/tools/vault-export/export.component.ts
* Change export to use new organization.flexiblecollection flag
* Little refactor changing parameter names and reduzing the size of export.component.ts ngOnInit
* Removed unused service from export constructor and removed unnecessary default value from org export service parameter
* Simplified organizations selection for vault export to only verify if it has flexiblecollections
* removed unecessary services from ExportComponent constructor on popup
* Fixed possible race condition on managed export
* Fix calling init() on undefined in biometrics.service.ts
* Add guard on osSupportsBiometric
* Create NoopBiometricsService instead of method guards
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Checking type instead of send.type on send's add-edit.component
* Fix linting issues
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* PM-5242 - First working draft of copying out web CL implementation of user verification form and dialog components into standalone libs/auth components which could be used in any client.
* PM-5242 - Rename UserVerificationFormComponent to UserVerificationFormInputComponent b/c it doesn't actually have a form and is meant to slot into a form as an input.
* PM-5242 - Update libs/auth angular index to take renamed component into account
* PM-5242 - Clean up UserVerificationDialogComponent as have much cleaner design approach now (maintain existing func while simply adding new requirements for client side validation for passkeys)
* PM-5242 - UserVerificationFormInput component - WIP draft of new client and server split of user verification logic
* PM-5242 - UserVerificationFormInput - WIP - Lots of progress on client side verification layout - more to do
* PM-5242 - UserVerificationFormInputComponent - Add hasMultipleVerificationMethods property so we can only show alternate methods if user has them.
* PM-5242 - UserVerificationFormInputComponent - rename hasMultipleVerificationMethods to hasMultipleClientVerificationOptions
* PM-5242 - Add new user verification biometrics fingerprint icon with proper secondary fill so it displays properly on all themes.
* PM-5242 - Create enum for tracking client user verification states
* PM-5242 - UserVerificationFormInputComponent - WIP - (1) Got biometrics layout working except for error state (2) Emitting active client verification option and biometrics result to dialog (3) Properly identifying if biometrics is enabled in a platform agnostic way (4) Translations TODO
* PM-5242 - UserVerificationDialogComponent - (1) Wire up new inputs and outputs for UserVerificationFormInput (2) Don't show submit button when clientside biometrics verification active
* PM-5242 - UserVerificationFormInputComponent - wired up biometrics failure and retry handling + re-arranged comp properties to put inputs & outputs at the top
* PM-5242 - UserVerificationFormInput component - Add logic to prevent currently active client verification method from being shown an option
* PM-5242 - UserVerificationFormInput - adjust margins
* PM-5242 - User verification dialog and form input comps - replace Verification with VerificationWithSecret type where applicable
* PM-5242 - UserVerificationFormComp - Default to server for backwards compatibility and to avoid requiring the input at all
* PM-5242 - UserVerificationFormInputComp - (1) Rename processChanges to processSecretChanges (2) Short circuit processSecretChanges when biometrics is active (3) Add new function for determining type of verification that has a secret.
* PM-5242 - UserVerificationDialog - Support custom, optional callout in dialog body.
* PM-5242 - UserVerificationDialogComp - support custom confirm button text and type.
* PM-5242 - UserVerificationDialog - Add user verification dialog result type to allow for handling all possible verification scenarios
* PM-5242 - UserVerificationFormInputComp - tweak comment
* PM-5242 - UserVerificationFormInput comp html - add placeholder text for no client verifications found scenario
* PM-5242 - UserVerificationDialogComponent - (1) Add confirm & cancel to dialog result (2) Add cancel method vs using bitDialogClose for specificity (3) Adjust naming of output property to properly specify that it is scoped to client verification (4) Adjust layout of dialog html to handle when no client side verification methods are found.
* PM-5242 - UserVerificationFormInput - Clean up test code
* PM-5242 - UserVerificationFormInput - For server verification, we don't need to check if the user has a local master key hash as we will generate a hash to send to the server for comparison.
* PM-5242 - UserVerificationFormInput html - Remove now unnecessary dev warning as I've provided a default
* PM-5242 - UserVerification Dialog & Form Input - add translations on all clients for all visible text.
* PM-5242 - UserVerificationFormInput html - remove no active client verification handling from form input comp as it is instead emitted upwards to parent dialog component to be handled there.
* PM-5242 - UserVerificationDialogComp - (1) Make UserVerificationDialogResult.noAvailableClientVerificationMethods optional because it isn't needed in cancel flows (thanks Will) (2) Modify static open to intercept closed observable event in order to always return a UserVerificationDialogResult as BitDialog returns empty string when the user clicks the x
* PM-5242 - UserVerificationDialogComp - Simplify dialog param names to remove redundant dialog
* PM-5242 - UserVerificationDialogParams - update comments to match new names
* PM-5242 - UserVerificationDialog Storybook - WIP first draft
* PM-5242 - UserVerificationDialogStoryComponent - WIP - try out having imports the same as the standalone component
* PM-5242 - UserVerificationDialogStoryComponent - more WIP - building now - some stuff displaying
* PM-5242 - UserVerificationDialogStoryComponent - some progress on providers setup
* PM-5242 - Not going to use storybook for user verification dialog
* PM-5242 - UserVerificationDialogComp - move types into own file + add docs
* PM-5242 - Update auth index to export user-verification-dialog.types
* PM-5242 - UserVerificationFormInput & UserVerificationService - Extract out getAvailableVerificationOptions logic into service
* PM-5242 -UserVerificationDialogComponent - Update close logic to handle escape key undefined scenario
* PM-5242 - UserVerificationFormInput - add getInvalidSecretErrorMessage for properly determining invalid secret translation
* PM-5242 - UserVerificationDialogComp - Refactor submit logic to handle different return methodologies in existing MP and OTP user verification service code vs new PIN flow (e.g., throwing an error instead of returning false)
* PM-5242 - PinCryptoService - change error logs to warnings per discussion with Justin
* PM-5242 - UserVerificationFormInput - Biometrics flow on desktop - remove accidentally added period in couldNotCompleteBiometrics translation key.
* PM-5242 - UserVerificationFormInput HTML - Re-arrange order of other client verification options to match design
* PM-5242 - UserVerificationFormInputComponent - Reset inputs as untouched on change of client verification method.
* PM-5242 - UserVerificationDialogComponent - Remove TODO as existing secret change logic turns invalidSecret false when biometrics is swapped to.
* PM-5242 - UserVerificationFormInputComponent - getInvalidSecretErrorMessage - fix PIN error message not being returned.
* PM-5242 - UserVerificationDialogComponent - Add documentation and examples to open method.
* PM-5242 - UserVerificationDialogComponent - tweak open docs
* PM-5242 - Remove accidental period from translation keys on browser & web
* PM-5242 - UserVerificationFormInputComponent - OTP flow needed button module to work
* PM-5242 - UserVerificationDialogParams - Add docs explaining that noAvailableClientVerificationMethods is only for desktop & browser.
* PM-5242 - User-verification-form-input - Adjust layout to meet new design requirements - (1) On load, send OTP without user clicking a button (2) Allow resending of the codes (3) show a code sent message for 3 seconds
* PM-5242 - Browser User Verification - Instantiate PinCryptoService and UserVerification service AFTER instantiating vaultTimeoutSettingsService so that it isn't undefined at run time.
* PM-5242 - JslibServices Module - UserVerificationService - add missing PlatformUtilsServiceAbstraction dependency.
* PM-5242 - Desktop Native Messaging Service - Wrap biometric getUserKeyFromStorage call in try catch because it throws an error if the user cancels the biometrics prompt and doesn't send a response to the browser extension when using the biometrics unlock bridge to the desktop app and OS.
* PM-5242 - Browser Extension - NativeMessagingBackground - if the desktop biometricUnlock command is executed with a canceled (not adjusting misspelling to keep side effects at a min) response, don't bother continuing.
* PM-5242 - BrowserCryptoService - When retrieving the user key via desktop biometrics, return null for user key if the user fails or cancels the biometrics prompt. Otherwise, if there is a user key in memory after unlock, biometrics user verification will always just return the user key from state regardless of if the user has successfully passed the biometrics prompt or not.
* PM-5242 - BrowserCryptoService - extra comments
* PM-5242 - Clean up translations - (1) Remove unused defaultUserVerificationDialogConfirmBtnText (2) Refactor name of defaultUserVerificationDialogTitle to just be verificationRequired which matches existing naming conventions.
* PM-5242 - CLI - fix order of service instantiations to ensure that vaultTimeoutSettingsService isn't undefined for PinCryptoService and UserVerificationService
* PM-5242 - Rename UserVerificationDialogParams to UserVerificationDialogOptions to match existing naming conventions of other CL comps.
* PM-5242 - UserVerificationDialogComponent - dialogParams renamed to dialogOptions
* PM-5242 - UserVerificationService Abstraction - Per PR feedback, use keyof for verificationType
* PM-5242 - UserVerificationBiometricsIcon - Per PR feedback, use https://jakearchibald.github.io/svgomg/ to optimize SVG by 50%.
* PM-5242 - Per PR feedback, clarify UserVerificationDialogOptions.clientSideOnlyVerification comment.
* PM-5242 - UserVerificationTypes - Add comments clarifying all text passed to the UserVerificationDialog are translation keys
* PM-5242 - UserVerificationDialogComp - fix extra new line per PR feedback
* PM-5242 - UserVerificationDialogTypes - per PR feedback and discussion with Will M., export ButtonType from CL so we (and consumers of the dialog) can properly import it via standard CL import.
* PM-5242 - BrowserCryptoService - Adjust comments per PR feedback.
* PM-5242 - UserVerificationDialogComponent - make ActiveClientVerificationOption readonly as it only for component html
* PM-5242 - UserVerificationDialogComp html - finish comment
* PM-5242 - BrowserCryptoService - add returns js doc per PR feedback.
* PM-5242 - UserVerificationDialogComponent - per PR feedback, add unexpected error toast.
* PM-5242 - UserVerificationService - getAvailableVerificationOptions - update params to use keyof like abstraction
* PM-5242 - Mark all existing client specific implemetations of user verification as deprecated.
* Add `disk-local` option for web
* Fix `web` DI
* Update libs/common/src/platform/state/state-definition.ts
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Rely On Default Implementation for Most of Cache Key
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* [PM-5806] Remove the autofill overlay menu from textarea fields
* [PM-5806] Running prettier
* [PM-5806] Implementing a new AutofillConstant to more easily exclude overlay types
* [PM-5806] Implementing a new AutofillConstant to more easily exclude overlay types
* [PM-5682] Chrome's extension API for retrieving closed ShadowRoots from elements causes performance issues when passed a Node with nested children
* [PM-5682] Updating jest test to reflect logic changes
* [PM-5682] Removing instances of instanceof check to facilitate better performance
* [PM-5682] Fixing jest test to ensure code coverage
* [PM-5682] Fixing merge conflict
* [PM-5617] Re-Add Setting to Turn Off Default Browser Autofill
* [PM-5617] Re-Add Setting to Turn Off Default Browser Autofill
* [PM-5617] Removing the privacy optional permission from Firefox
* [PM-5617] Adding jest tests to validate the behavior within BrowserApi
* [PM-5617] Adjusting messaging based on feedback from design
* [PM-5617] Adjusting messaging based on feedback from design
* [PM-5617] Adjusting messaging based on feedback from design
* [PM-5617] Removing unnecessary configService dependency
* keep collections in filters highlighted when featureflag is on and user navigates to a specific collection
* apply flexible collections logic to the bitcrumbs and filters in org view
* [PM-5488] Master Password Re-prompt Not Triggering Correctly When Autofilling From Command
* [PM-5488] Master Password Re-prompt Not Triggering Correctly When Autofilling From Command
* [PM-5488] Adjusting how we handle debouncing the password reprompt window
* exclude non-standard search inputs from identity autofill
* exclude non-standard search inputs from all autofill
* check against excluded login field types when loading password fields
* clean up logic and add tests
* add SearchFieldNames values
* add flag to deter process reload if cancel is clicked on biometrics
* rename flag
* store biometrics cancelled to disk instead of integrating with process reload
* allow auto-prompt when opening app
The better place for this is arguably in environment configurations, but I don't want to expand that functionality more than it has to in hopes that this is a rare/one-off occurrence.
* Remove unused feature flag
* Replace feature flag ref with org flag
* Remove deprecated feature flag to discourage use
* Add check to org.canCreateNewCollections
* Adjust init logic of components to avoid race conditions
* Make canCreateNewCollections logic more explicit
* Resolve merge conflicts with vault changes
* Update comments
* Remove uses of old feature flag
* Remove last of old feature flag
* Clean up feature flag
* Fix linting
* Fix linting
* PM-4596 - PinCryptoService first draft
* PM-4596 - PinCryptoService - Refactor pinKeyEncryptedKey retrievals out into own method getPinKeyEncryptedKeys
* PM-4596 - npm ci + npm run prettier to fix lint issues
* PM-4596 - PinCryptoService - Add kdf types
* PM-4596 - PinCryptoService - Refactor pin validation into own helper method.
* PM-4596 - Rename pin-crypto.service.ts to pin-crypto.service.implementation.ts
* PM-4596 - PinCryptoService - add additional logging for error states.
* PM-4596 - JslibServicesModule - register new PinCryptoService and PinCryptoServiceAbstraction
* PM-4596 - PinCryptoService - modify decryptUserKeyWithPin signature to not require email to match MP verification process in user verification service.
* PM-4596 - Lock components - use new PinCryptoService.decryptUserKeyWithPin(...) to get user key + refactor base comp unlock with pin method to improve
* PM-4596 - Lock component - if too many invalid attempts, added toast explaining that we were logging the user out due to excess PIN entry attempts
* PM-4596 - UserVerificationService - (1) Refactor verifyUser(...) to use switch + separate methods for a cleaner parent method + better extensibility for PIN & biometrics which are TBD (2) Add PIN support to validateInput(...)
* PM-4596 - UserVerificationService - add PIN and biometrics functions to verifyUser(...)
* PM-4596 - PinCryptoService Spec - start test file - instantiates properly
* PM-4596 - PinCryptoService tests - WIP
* PM-4596 - PinCryptoService tests - WIP - got success cases working
* PM-4596 - pin-crypto.service.implementation.spec.ts renamed to pin-crypto.service.spec.ts
* PM-4596 - PinCryptoService.getPinKeyEncryptedKeys(...) - add comment + var name change for clarity
* PM-4596 - PinCryptoService tests - test invalid, null return scenarios
* PM-4596 - CLI - bw.ts - update UserVerificationService instantiation to include new pinCryptoService
* PM-4596 - PinCryptoService - import VaultTimeoutSettingsServiceAbstraction instead of implementation for factory creation to get browser building
* PM-4596 - (1) Create pinCryptoServiceFactory for browser background (2) Add it to the existing userVerificationServiceFactory
* PM-4596 - Browser - Main.background.ts - Add pinCryptoService and add to userVerificationService dependencies
* PM-4596 - UserVerificationService - per PR feedback simplify returns of verifyUserByPIN(...) and verifyUserByBiometrics(...)
* PM-4596 - Messages.json on desktop & browser - per PR feedback, adjust tooManyInvalidPinEntryAttemptsLoggingOut translation text to remove "you"
* PM-4596 - VerificationType enum - fix line copy mistake and give BIOMETRICS own, unique value.
* PM-4596 - VerificationType - rename BIOMETRICS to Biometrics to match existing MasterPassword value case.
* PM-4596 - Update verification type to consider whether or not a secret exists as we have added a new verification which doesn't have a type. Add new server and client side verification types. Update all relevant code to pass compilation checks.
* PM-4596 - More verification type tweaking
* PM-4596 - Verification - verificationHasSecret - tweak logic to be more dynamic and flexible for future verification types
* PM-4596 - UpdateTempPasswordComp - use new MasterPasswordVerification
* PM-4596 - Desktop - DeleteAcctComp - use VerificationWithSecret to solve compile error w/ accessing secret
* PM-4596 - Per discussions with Andreas & Will, move new Pin Crypto services into libs/auth + added @bitwarden/auth path to CLI tsconfig + added new, required index.ts files for exporting service abstractions & implementations
* PM-4596 - Fixed missed import fixes for lock components across clients for pin crypto service after moving into @bitwarden/auth
* PM-4596 - More PinCryptoService import fixes to get browser & desktop building
* PM-4596 - Update desktop lock comp tests to pass by providing new pin crypto service.
* PM-4596 - User verification service -update todo
* PM-4596 - PinCryptoService - per PR feedback, fix auto import wrong paths.
* PM-4596 - PinCryptoService tests - fix imports per PR feedback
* PM-4596 - UserVerificationSvc - rename method to validateSecretInput per PR feedback
* Fix imports
* PM-4596 - PinCryptoService - Refactor naming for clarity and move test cases into describes per PR feedback
* reorg libs/auth; expose only libs/auth/core to cli app
* PM-4596 - UserVerification - Resolve import issue with importing from libs/auth. Can't use @bitwarden/auth for whatever reason.
* PM-4596 - Fix desktop build by fixing import
* PM-4596 - Provide PinCryptoService to UserVerificationService
* PM-4596 - PinCryptoServiceFactory - you cannot import services from @bitwarden/auth in the background b/c it brings along the libs/auth/components and introduces angular into the background context which doesn't have access to angular which causes random test failures. So, we must separate out the core services just like the CLI to only bring along the angular agnostic services from core.
* PM-4596 - Refactor libs/auth to have angular / common + update all imports per discussion with Matt & Will. Introduced circular dep between PinCryptoService + VaultTimeoutSettingsService + UserVerificationService
* PM-4596 - VaultTimeoutSettingsService - Refactor UserVerificationService out of the service and update all service instantiations and tests. The use of the UserVerificationService.hasMasterPassword method no longer needs to be used for backwards compatibility. This resolves the circular dependency between the PinCryptoService, the UserVerificationService, and the VaultTimeoutSettingsService. We will likely refactor the hasMasterPassword method out of the UserVerificationService in the future.
* PM-4596 - Update CL tsconfig.libs.json to add new auth/common and auth/angular paths for jslib-services.module imports of pin crypto service to work and for test code coverage to run successfully.
* PM-4596 - Address PR feedback
* PM-4596 - Update root tsconfig (only used by storybook) to add new libs/auth paths to fix chromatic build pipeline.
* PM-4596 - Actually update tsconfig with proper routes to fix storybook
* PM-4596 - UserVerificationService - verifyUserByBiometrics - add error handling logic to convert failed or cancelled biometrics verification to a usable boolean
* PM-4596 - Add missing await
* PM-4596 - (1) Add log service and log to user verification service biometric flow to ensure errors are at least revealed to the console (2) Fix factory missing PinCryptoServiceInitOptions
* PM-4596 - Use the correct log service abstraction
* PM-4596 - Remove unused types per PR review
---------
Co-authored-by: William Martin <contact@willmartian.com>