* Added button type to each button element related to the vault team
* Removed disable statement comment
* [PM-1399] Resolve eslint errors for button type - admin-console (#5275)
* Added button type to each button element related to the admin console team
* Added button type to each button element related to the billing team
* Removed disable statement comment
* [PM-1399] Resolve eslint errors for button type - tools (#5284)
* Added button type to each button element related to the tools team
* Added button type to each button element related to the tools team
* Added button type to each button element related to the auth team (#5295)
This PR introduces a generic `DialogService` which can be used by all the clients. This allows us to decouple dialogs from the `PlatformUtilsHelper`.
The `DialogService` provides a new method, `openSimpleDialog` which is the new interface for that type of dialogs.
This gives us 3 different implementations:
- Web: DialogService modern dialogs
- Browser: SweetAlert
- Desktop: Native electron based
* [PM-233] "No Items" graphic is overlapping on several screens
* [PM-233] Removing setting search input as readonly/disabled when "Send" functionality is disabled
Upgrade Electron to version 24, node to 18 and npm to 9. Electron changed to using node 18 in 23, with node 18 using npm 9 as default.
There doesn't seem to be any breaking changes except the deprecation of Windows 7, 8.1, and Server 2012. A somewhat undocumented breaking change was that elements in the title bar are now draggable which broke the account switching selector. Resolved by adding a no-drag css rule.
- electronjs.org/blog/electron-22-0
- electronjs.org/blog/electron-23-0
- electronjs.org/blog/electron-24-0
* Add disableFavicon$ to stateService
* Change IconComponent's ChangeDetectionStrategy and use disableFavicon$ observable
* Only get first result from disableFavicon observable
* Move disabledFavicon$ to SettingsService
* Update usage of disableFavicon to use SettingsService
* Remove getting and setting of disabledFavicon on login
* Settings service observable adjustments
* Fix for popup initially having a null value for the disableFavicon setting in settingsService
* Move disabledFavicon$ subscription to ngOnInit
* feat: experiment with observables
* Remove SettingsService from browser app component
* Fix storybook changes
* Update apps/web/src/app/vault/components/vault-items/vault-items.stories.ts
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* Fix mock function signature
---------
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* [PM-1351] Add property to server-config.response. Change config to be able to fetch without being authed.
* [PM-1351] fetch every hour.
* [PM-1351] fetch on vault sync.
* [PM-1351] browser desktop fetch configs on sync complete.
* [PM-1351] Add methods to retrieve feature flags
* [PM-1351] Add enum to use as key to get values feature flag values
* [PM-1351] Remove debug code
* [PM-1351] Get flags when unauthed. Add enums as params. Hourly always fetch.
* [PM-1351] add check for authed user using auth service
* [PM-1351] remove unnecessary timer on account unlock
* [PM-687] refactor observable in base accept component
* [PM-687] add emergency access invitation to global state
* [PM-687] save invite to state and check on login
* [PM-687] move emergency access check above queryParams observable
* Logic for calculating if we should apply height fix for safari
* Revert safari height fix for safari >= 16.1
* Deprecate static isBrowser funcions, using them directly is incorrect
* Changes based on feedback
* Update CSS to use & selector
---------
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Locking all non-active accounts prior to active lead to process reload
issues.
Remove unnecessary routing
Prefer Record keys to deep Account object value
Await promises
* [AC-1340] Calling Cipher DeleteAdmin endpoints when user has canEditAnyCollection permission
* [AC-1340] Fixed CLI and Desktop builds
* [AC-1340] Changed CipherService delete methods parameter 'orgAdmin' to 'asAdmin' and to nullable
* [AC-1340] Changed variable names from 'orgAdmin' to 'asAdmin'
* [AC-1340] Reverted change on DeleteCommand
* PM-1887 - Fix Account Creation Terms of service checkbox not clickable in Safari. Reworked check for breaches and terms of service checkboxes to be implemented with Tailwind instead of a mix of Tailwind & Bootstrap as well. Confirmed checkboxes still work in Edge, Firefiox, and Chrome as well as Safari now.
* PM-1887 - Add for="<id>" attributes to bit-labels for accessibility.
* PM-1887 - Make ID consistent w/ dashes instead of underlines and dashes.
* Create and register new libs/exporter
Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint
* Migrate exportService to libs/exporter
Move exportService (abstraction and impl) into libs/exporter
Refactored exportService to be split into vault-export and event-export
Created barrel-files for both exports
Moved export.service.spec.ts into vault-export
Created an export-helper, which helps build the filename (extract method refactor from ExportService)
* Move components in libs/angular into tools-subfolder
Moved components
Updated imports in jslib-services.module and jslib.module
* Register libs/exporter with browser and fix imports
Move export.component into tools-subfolder
* Register libs/exporter with cli and fix imports
Move export.command into tools-subfolder
* Register libs/exporter with desktop and fix imports
Move export.component into tools-subfolder
* Move export models to libs/exporter
* Update web imports
* Update package-lock.json
* Move export models back as it would create circular dependency
Reponse models in common rely on export models which are in libs/exporter, which relies on common
* Fix up web for event-export
* Update CODEOWNERS
* Add export-models to team-tools-dev
* Simplify domain import
* Moving EventExport into web
* [AC-779] fix: policy link
* [AC-779] fix: search string set by url not showing in input field
* [AC-779] fix: navigation to cipher events
* [AC-779] fix: collection link
* [AC-779] chore: clean up old components
* [AC-779] chore: remove some copy pasta
* Fail on unsupported export format
Issue #5194: https://github.com/bitwarden/clients/issues/5194
The cli previously would take any value for the export format and
default to unencrypted json if it wasn't a supported format. This
behavior is a little dangerous because if for instance typed
"json_encrypted" instead of "encrypted_json" and naively saved the file
you might be surprised to learn the payload was not actually encrypted
even though the command completed successfully.
This change adds a guard clause when converting the string value passed
in via `--format` into the type `ExportFormat` to ensure that the format
provided is one of the supported types.
* Move isSupportedExportFormat to private method
* [EC-1070] Introduce flag for enforcing master password policy on login
* [EC-1070] Update master password policy form
Add the ability to toggle enforceOnLogin flag in web
* [EC-1070] Add API method to retrieve all policies for the current user
* [EC-1070] Refactor forcePasswordReset in state service to support more options
- Use an options class to provide a reason and optional organization id
- Use the OnDiskMemory storage location so the option persists between the same auth session
* [AC-1070] Retrieve single master password policy from identity token response
Additionally, store the policy in the login strategy for future use
* [EC-1070] Introduce master password evaluation in the password login strategy
- If a master password policy is returned from the identity result, evaluate the password.
- If the password does not meet the requirements, save the forcePasswordReset options
- Add support for 2FA by storing the results of the password evaluation on the login strategy instance
- Add unit tests to password login strategy
* [AC-1070] Modify admin password reset component to support update master password on login
- Modify the warning message to depend on the reason
- Use the forcePasswordResetOptions in the update temp password component
* [EC-1070] Require current master password when updating weak mp on login
- Inject user verification service to verify the user
- Conditionally show the current master password field only when updating a weak mp. Admin reset does not require the current master password.
* [EC-1070] Implement password policy check during vault unlock
Checking the master password during unlock is the only applicable place to enforce the master password policy check for SSO users.
* [EC-1070] CLI - Add ability to load MP policies on login
Inject policyApi and organization services into the login command
* [EC-1070] CLI - Refactor update temp password logic to support updating weak passwords
- Introduce new shared method for collecting a valid and confirmed master password from the CLI and generating a new encryption key
- Add separate methods for updating temp passwords and weak passwords.
- Utilize those methods during login flow if not using an API key
* [EC-1070] Add route guard to force password reset when required
* [AC-1070] Use master password policy from verify password response in lock component
* [EC-1070] Update labels in update password component
* [AC-1070] Fix policy service tests
* [AC-1070] CLI - Force sync before any password reset flow
Move up the call to sync the vault before attempting to collect a new master password. Ensures the master password policies are available.
* [AC-1070] Remove unused getAllPolicies method from policy api service
* [AC-1070] Fix missing enforceOnLogin copy in policy service
* [AC-1070] Include current master password on desktop/browser update password page templates
* [AC-1070] Check for forced password reset on account switch in Desktop
* [AC-1070] Rename WeakMasterPasswordOnLogin to WeakMasterPassword
* [AC-1070] Update AuthServiceInitOptions
* [AC-1070] Add None force reset password reason
* [AC-1070] Remove redundant ForcePasswordResetOptions class and replace with ForcePasswordResetReason enum
* [AC-1070] Rename ForceResetPasswordReason file
* [AC-1070] Simplify conditional
* [AC-1070] Refactor logic that saves password reset flag
* [AC-1070] Remove redundant constructors
* [AC-1070] Remove unnecessary state service call
* [AC-1070] Update master password policy component
- Use typed reactive form
- Use CL form components
- Remove bootstrap
- Update error component to support min/max
- Use Utils.minimumPasswordLength value for min value form validation
* [AC-1070] Cleanup leftover html comment
* [AC-1070] Remove overridden default values from MasterPasswordPolicyResponse
* [AC-1070] Hide current master password input in browser for admin password reset
* [AC-1070] Remove clientside user verification
* [AC-1070] Update temp password web component to use CL
- Use CL for form inputs in the Web component template
- Remove most of the bootstrap classes in the Web component template
- Use userVerificationService to build the password request
- Remove redundant current master password null check
* [AC-1070] Replace repeated user inputs email parsing helpers
- Update passwordStrength() method to accept an optional email argument that will be parsed into separate user inputs for use with zxcvbn
- Remove all other repeated getUserInput helper methods that parsed user emails and use the new passwordStrength signature
* [AC-1070] Fix broken login command after forcePasswordReset enum refactor
* [AC-1070] Reduce side effects in base login strategy
- Remove masterPasswordPolicy property from base login.strategy.ts
- Include an IdentityResponse in base startLogin() in addition to AuthResult
- Use the new IdentityResponse to parse the master password policy info only in the PasswordLoginStrategy
* [AC-1070] Cleanup password login strategy tests
* [AC-1070] Remove unused field
* [AC-1070] Strongly type postAccountVerifyPassword API service method
- Remove redundant verify master password response
- Use MasterPasswordPolicyResponse instead
* [AC-1070] Use ForceResetPassword.None during account switch check
* [AC-1070] Fix check for forcePasswordReset reason after addition of None
* [AC-1070] Redirect a user home if on the update temp password page without a reason
* [AC-1070] Use bit-select and bit-option
* [AC-1070] Reduce explicit form control definitions for readability
* [AC-1070] Import SelectModule in Shared web module
* [AC-1070] Add check for missing 'at' symbol
* [AC-1070] Remove redundant unpacking and null coalescing
* [AC-1070] Update passwordStrength signature and add jsdocs
* [AC-1070] Remove variable abbreviation
* [AC-1070] Restore Id attributes on form inputs
* [AC-1070] Clarify input value min/max error messages
* [AC-1070] Add input min/max value example to storybook
* [AC-1070] Add missing spinner to update temp password form
* [AC-1070] Add missing ids to form elements
* [AC-1070] Remove duplicate force sync and update comment
* [AC-1070] Switch backticks to quotation marks
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Add new organization invite process (#4841)
* [AC-431] Added properties 'key' and 'keys' to OrganizationUserAcceptRequest
* [AC-431] On organization accept added check for 'initOrganization' flag and send encrypt keys if true
* [AC-431] Reverted changes on AcceptOrganizationComponent and OrganizationUserAcceptRequest
* [AC-431] Created OrganizationUserAcceptInitRequest
* [AC-431] Added method postOrganizationUserAcceptInit to OrganizationUserService
* [AC-431] Created AcceptInitOrganizationComponent and added routing config. Added 'inviteInitAcceptedDesc' to messages
* [AC-431] Remove blank line
* [AC-431] Remove requirement for logging in again
* [AC-431] Removed accept-init-organization.component.html
* Update libs/common/src/abstractions/organization-user/organization-user.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Sending collection name when initializing an org
* [AC-431] Deleted component accept-init-organization and incorporated logic into accept-organization
* Update libs/common/src/abstractions/organization-user/organization-user.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-431] Returning promise chains
* [AC-431] Moved ReAuth check to org accept only
* [AC-431] Fixed import issues
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-434] Hide billing screen for reseller clients (#4955)
* [AC-434] Retrieving ProviderType for each Org
* [AC-434] Hide subscription details if user cannot manage billing
* [AC-434] Renamed providerType to provider-type
* [AC-434] Reverted change that showed Billing History and Payment Methods tabs
* [AC-434] Hiding Secrets Manager enroll
* [AC-434] Renamed Billing access variables to be more readable
* Apply suggestions from code review
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-434] Reduce duplication in permission code
* [AC-434] npm prettier
* [AC-434] Changed selfhost subscription permission
* [AC-434] Added canEditSubscription check for change plan buttons
* [AC-434] Removed message displaying provider name in subscription
* [AC-434] canEditSubscription logic depends on canViewSubscription
* [AC-434] Hiding next charge value for users without billing edit permission
* [AC-434] Changed canViewSubscription and canEditSubscription to be clearer
* [AC-434] Altered BillingSubscriptionItemResponse.amount and BillingSubscriptionUpcomingInvoiceResponse.amount to nullable
* [AC-434] Reverted change on BillingSubscriptionItemResponse.amount
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Updated IsPaidOrgGuard reference from org.CanManageBilling to canEditSubscription
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* SG-1026 - Documenting / slight refactoring of notification-bar - WIP
* SG-1026 - More documentation WIP
* SG-1026 - Continued documentation of notification bar + testing theories for specific sites as part of research to identify areas for possible improvement + added types where appropriate.
* SG-1026 - getSubmitButton docs
* SG-1026 - Autofill Service tweak - On account creation (ex: talkshoe.com), even if the pageDetails contained a valid form to watch, the loadPasswordFields method parameter for fillNewPassword being false for inputs with autoCompleteType of "new-password" would cause the account creation form to not be watched (null form data returned to notification bar). Setting this to true will help capture more account creations in the above specified scenario.
* SG-1026 - Additional documentation / comment clean up
* SG-1026 - Remove unused pageDetails array
* SG-1026 - These changes address form detection issues for the password change form on talkshoe.com: (1) Update autofill.service getFormsWithPasswordFields(...) method to group autofill.js found password type fields under a single form in a very specific scenario where the most likely case is that it is a password change form with poorly designed mark up in a SPA (2) Notification bar - when listening to a form, we must use both the loginButtonNames and the changePasswordButton names as we don't know what type of form we are listening to (3) Notification bar - on page change, we must empty out the watched forms array to prevent forms w/ the same opId being added to the array on SPA url change (4) Notification bar - getSubmitButton update - If we cannot find a submit button within a form, try going up one level to the parent element and searching again (+ added save to changePasswordButtonNames). (5) Notification bar - when listening to a form with a submit button, we can attach the formOpId to the button so we can only have DOM traversal in one location and retrieve the form off the button later on in the form submission logic. For now, I'm just adding it as a fallback, but it could be the primary approach with more testing.
* SG-1026 - On first load of the notification-bar content script, we should start observing the DOM immediately so we properly catch rendered forms instead of waiting for a second. This was especially prevelant on refreshing the password change form page on talkshoe.com.
* SG-1026 - Due to the previous, timeout based nature of the calls to collectPageDetailsIfNeeded (now handlePageChange), the mutation observer could get setup late and miss forms loading (ex: refreshing a password change page on talkshoe.com). DOM observation is now setup as fast as possible on page load for SPAs/Non SPAs and on change for SPAs by having the mutation observer itself detect page change and deterministically calling handlePageChange(). However, with these changes, page detail collection still only occurs after a minimum of ~1 second whether or not it was triggered from the mutation observer detecting forms being injected onto the page or the scheduleHandlePageChange running (which has a theoretical maximum time to page detail collection of ~1.999 seconds but this does require the mutation observer to miss the page change in a SPA which shouldn't happen).
* SG-1026 - Identified issue with current form retrieval step in autofill service which prevents multi-step account creation forms from being returned to the notification-bar content script from the notification.background.ts script.
* SG-1026 - Add logic to formSubmitted to try and successfully process multi-step login form (email then password on https://login.live.com/login.srf) with next button that gets swapped out for a true submit button in order to prompt for saving user credentials if not in Bitwarden. This logic works *sometimes* as the submit button page change often stops the submit button event listeners from being able to fire and send the login to the background script. However, that is a separate issue to be solved, and sometimes is better than never. This type of logic might be useful in solving the multi-step account creation form on https://signup.live.com/signup but that will require additional changes to the autofill service which current intercepts forms without passwords and prevents them from reaching the notification-bar.ts content script.
* SG-1026 - Add note explaining the persistence of the content script
* SG-1026 - Update stack overflow link to improve clarity.
---------
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
* [EC-974] feat: scaffold new vault-items component
* [EC-974] feat: add basic mocked data to story
* [EC-974] feat: add initial table version
* [EC-974] chore: split rows into separate components
* [EC-974] chore: rename item row to cipher row
* [EC-974] feat: create common vault item interface
* [EC-974] feat: use cdk virtual scrolling
* [EC-974] fix: tweak `itemSize`
* [EC-974] chore: move vault-items component to app/vault folder
* [EC-974] feat: initial support for extra column
* [EC-974] feat: start adding org badge
Having issues with modules import
* [EC-974] feat: add working owner column on collections row
* [EC-974] feat: add owner to ciphers
* [EC-974] fix: org name badge bugs when reused
* [EC-974] feat: fix and translate columns
* [EC-974] feat: allow collections to be non-editable
* [EC-974] feat: use data source
* [EC-974] fix: remove profile name from vault items
* [EC-974] feat: add events
* [EC-974] feat: add support for copy event
* [EC-974] feat: add support for collections column
* [EC-974] feat: add support for group badges
* [EC-974] chore: rename for consistency
* [EC-974] feat: change story to use template
* [EC-974] feat: add support for launching
* [EC-974] feat: add support for attachements
* [EC-974] feat: add stories for all use-cases
* [EC-974] feat: add support for cloning
* [EC-974] feat: add support for moving to organization
* [EC-974] feat: add support for editing cipher collections
* [EC-974] feat: add support for event logs
* [EC-974] feat: add support for trash/delete/restore
* [EC-974] feat: add support for editing collections
* [EC-974] feat: add support for access and delete collections
* [EC-974] feat: don't show menu if it's empty
* [EC-974] feat: initial buggy implementation of selection
* [EC-974] feat: implement bulk move
* [EC-974] feat: add support for bulk moving to org
* [EC-974] feat: add support for bulk restore
* [EC-974] feat: add support for bulk delete
* [EC-974] feat: add ability to disable the table
* [EC-974] feat: create new filter function based on routed model
* [EC-974] wip: start replacing vault items component
* [EC-974] feat: add support for fetching ciphers
* [EC-974] feat: hide trash by default
* [EC-974] feat: add support for the rest of the data
* [EC-974] feat: implement organization filtering using org badge
* [EC-974] feat: fix navigation to "my vault"
* [EC-974] feat: don't show bulk move options when filtering on org items
* [EC-974] feat: prepare for disabling table
* [EC-974] fix: add missing router link to collections
* [EC-974] feat: connect all outputs
* [EC-974] fix: list not properly refreshing after delete
* [EC-974] feat: limit selection to top 500 items
* [EC-974] feat: implement refresh tracker
* [EC-974] feat: use refresh tracker to disable vault items
* [EC-974] feat: add empty list message
* [AC-974] feat: add initial load with spinner and fix empty -> show list bug
* [EC-974] feat: replace action promise with simple loading boolean
* [EC-974] feat: refactor individual vault header
* [EC-974] feat: cache and make observables long lived
* [EC-974] feat: implement searching
* [EC-974] feat: add support for showing collections
* [EC-974] feat: add ciphers to org vault list
* [EC-974] feat: show group column
* [EC-974] feat: tweak settings for org vault
* [EC-974] feat: implement search using query params
* [EC-974] feat: add support for events that are common with individual vault
* [EC-974] feat: add support for all events
* [EC-974] feat: add support for empty list message and no permission message
* [EC-974] feat: always show table
* [EC-974] feat: fix layout issues due to incorrect row height
* [EC-974] feat: disable list if empty
* [EC-974] feat: improve sync handling
* [EC-974] feat: improve initial loading sequence
* [EC-974] feat: improve initial load sequence in org vault
* [EC-974] refactor: simplify and optimize data fetching
* [EC-974] feat: use observables from org service
* [EC-974] feat: refactor org vault header
* [EC-974] fix: data not refreshing properly
* [EC-974] fix: avoid collection double fetching
* [EC-974] chore: clean up refresh tracker
* [EC-974] chore: clean up old vault-items components
* [EC-974] chore: clean up old code in vault component
* [EC-974] fix: reduce rows in story
The story ends up too big for chromatic.
* [EC-974] docs: tweak and typo fixes of asyncToObservable docs comment
* [EC-974] fix: `attachements` typo
* [EC-974] chore: remove review question comment
* [EC-974] chore: remove unused `securityCode` if statement
* [EC-974] fix: use `takeUntill` for legacy dialogs
* [EC-974] fix: use CollectionDialogTabType instead of custom strings
* [EC-974] fix: copy implementation
* [EC-974] fix: use `useTotp` to check for premium features
* [EC-974] fix: use `tw-sr-only`
* [EC-974] chore: remove unecessary eslint disable
* [EC-974] fix: clarify vault item event naming
* [EC-974] fix: remove `new` from `app-new-vault-items`
* [EC-974] fix: collection row not disabled during loading
* [EC-974] chore: simplify router links without path changes
* [EC-974] feat: invert filter function to get rid of `cipherPassesFilter`
* [EC-974] fix: move `NestingDelimiter` to collection view
Nesting is currently only a presentational construct, and the concept does not exist in our domain.
* [EC-974] fix: org vault header not updating when switching org
* [EC-974] fix: table sizing jumping around
* [EC-974] fix: list not refreshing after restoring item
* [EC-974] fix: re-add missing unassigned collection
* [EC-974] fix don't show new item button in unassigned collection
* [EC-974] fix: navigations always leading to individual vault
* [EC-974] fix: remove checkbox when collections are not editable
* [EC-974] fix: null reference blocking collections from refreshing after delete
* [EC-974] fix: don't show checbox for collections that user does not have permissions to delete
* [EC-974] fix: navigate away from deleted folder
* [EC-974] chore: clean up un-used output
* [EC-974] fix: org badge changing color randomly
* [EC-974] fix: lint issues after merge
* [EC-974] fix: lower amount of ciphers in story
chromatic doesn't like large snapshots
* [EC-974] fix: "all collections" not taking `organizationId` filter into account
* [EC-974] fix: make sure unassigned appears in table too
* [EC-974] feat: add unassigned to storybook
* [EC-974] fix: forced row height not being applied properly
* [EC-974] fix: hopefully fix table jumping once and for all
* [EC-974] fix: attachemnts getting hidden
* [EC-974] feat: extract collection editable logic to parent component
* [EC-974] feat: separately track editable items
* [EC-974] feat: optimize permission checks
* [EC-974] fix: bulk menu hidden on chrome
:lolcry:
* [EC-974] fix: don't show groups column if org doesnt use groups
* [EC-974] feat: make entire row clickable
* [EC-974] fix: typo resulting in non-editable collections
* let node-ipc use individual pipes on Windows
This fixes an issue with multiple users on Windows. There should be an individual Windows pipe used for communication between browser plugin and desktop for each user. However, the naming scheme used the same name for every user. This change adds some uniqueness with a hash over username and unique directory name.
* Fix ipc socket root for native-messaging too
* use only homedir as unique
* Prefer callback over error-flow to prompt for password
Remove error-flow to request file password
Prefer callback, which has to be provided when retrieving/creating an instance.
Delete ImportError
Call BitwardenPasswordProtector for all Bitwarden json imports, as it extends BitwardenJsonImporter
Throw errors instead of returning
Return ImportResult
Fix and extend tests import.service
Replace "@fluffy-spoon/substitute" with "jest-mock-extended"
* Fix up test cases
Delete bitwarden-json-importer.spec.ts
Add test case to ensure bitwarden-json-importer.ts is called given unencrypted or account-protected files
* Move file-password-prompt into dialog-folder
* Add import success dialog
* Fix typo
* Only list the type when at least one got imported
* update copy based on design feedback
* Remove unnecessary /index import
* Remove promptForPassword_callback from interface
PR feedback from @MGibson1 that giving every importer the ability to request a password is unnecessary. Instead, we can pass the callback into the constructor for every importer that needs this functionality
* Remove unneeded import of BitwardenJsonImporter
* Fix spec constructor
* Fixed organizational import
Added an else statement, or else we'd import into an org and then also import into an individual vault
* fix: renamed to billing sync token
* Use translated string
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Move URI matching logic into uriView
* Fix url parsing: always assign default protocol, otherwise no protocol with port is parsed incorrectly
* Codescene: refactor domain matching logic
* Fix encrypted export using fixed PBKDF2 iterations
* Replace hardcoded KdfType in importer
* Clean up kdf handling in password-protected export
* Extract BitwardenPasswordProtectedFileFormat
* Rename bitwarden-json-types
* Move StateService import to fix linting issue
* Make linter happy
* Use abstraction instead of implementation
---------
Co-authored-by: Daniel James Smith <djsmith@web.de>
* Prevent rerouting to dispaly modal message, and refactored components where thsi was used
* Added upgrade badge to organization reports view
* created guard to prevent free organization users from accessing reports
* Added isUpgradeRequired getter to organization class
* Modifiewd reports home to pass upgrade badge and add new guard to organization reports module
* Fixed routing bug when routing to billing subscription page
* Refactored to use async pipe and observables
* Renamed getter name to be more descriptive
* Removed checkAccess from reports
* Renamed guard
* Removed unused variables
* Lint fix
* Lint fix
* prettier fix
* Corrected organiztion service reference
* Moved homepage to ngonInit
* [PM-1629] Update the upgrade dialog for users without billing rights (#5102)
* Show dialog with description when user does not have access to the billing page
* switched conditions to nested if to make the logic clearer
* Split out api methods into sendApiService
* Move SendService and abstraction
* Libs updates
* Web updates
* CLI updates
* Desktop updates
* libs send service fixes
* browser factory additions
* Browser updates
* Fix service injection for CLI SendReceiveCommand
* Deprecate directly calling send state service methods
* SendService observables updates
* Update components to use new observables
* Modify CLI to use state service instead of observables
* Remove unnecessary await on get()
* Move delete() to InternalSendService
* SendService unit tests
* Split fileUploadService by send and cipher
* send and cipher service factory updates
* Add file upload methods to get around circular dependency issues
* Move api methods from sendService to sendApiService
* Update cipherService to use fileApi methods
* libs service injection and component changes
* browser service injection and component changes
* Desktop component changes
* Web component changes
* cipher service test fix
* Fix file capitalization
* CLI service import and command updates
* Remove extra abstract fileUploadService
* WIP: Condense callbacks for file upload
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
* Send callbacks for file upload
* Fix circular service dependencies
* Fix response return on upload
* Fix function definitions
* Service injection fixes and bug fixes
* Fix folder casing
* Service injection cleanup
* Remove deleted file from capital letters whitelist
* Create new SendApiService for popup
* Move cipherFileUploadService to vault
* Move SendFileUploadService methods into SendApiService
* Rename methods to remove 'WithServer'
* Properly subscribe to sendViews
* Fix Send serialization
* Implement fromJSON on sendFile and sendText
* [PM-1347] Fix send key serialization (#4989)
* Properly serialize key on send fromJSON
* Remove call that nulled out decrypted sends
* Fix null checks in fromJSON methods for models
* lint fixes
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Added optional chaining to folder view object to handle when the foilder value is null
* Set folder to null during cleanup and added check on the view component to check if the folder is nul before rendering the html
* [PM-108] Fingerprint is calculated based on pubKey
* [PM-108] Change userId to userEmail. Remove fingerprint from AuthResponse
* [PM-130][PM-107] Remove fingerprint from request and clients UI
* Create and register new libs/importer
Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint
* Move importer-related files to libs/importer
* Move importer-spec-related files to libs/importer
Move import.service.spec
* Update package-lock.json
* Set CODEOWNERS for new libs/importer
* Register libs/importer with cli and fix imports
* Register libs/importer with web and fix imports
* Move importOption into models
Rename importOptions to import-options
* Fix linting issues after updating prettier
* Only expose necessary files from libs/importer
Fix tsconfig files
- Removes the trailing /index on imports in web/cli
As the spec-files no longer can access the internals via @bitwarden/importer they import by path (../src/importers)
* Add barrel files to vendors with more than one importer
* add settingsService.getEquivalentDomains
* check that an iframe URL matches cipher.login.uris before autofilling
* disable autofill on page load if it doesn't match
* show a warning to the user on regular autofill if it doesn't match
---------
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
* Only pass necessary service to power-monitor
PowerMonitorMain only requires the messagingService instead of a full reference to Main
* Remove never changing constructor params
Window.main has a defaultWidth and defaultHeight that never change, so they do not need to get passed in from outside
hideTitleBar is always true, so there is no need to make it a param
* Remove projectName from updater
This is likely another relict from sharing this previously with dircetory-connector and is not needed anymore
* Only pass necessary service to MenuMain
MenuMain only needs service references instead of a full reference to Main
* Refactor biometrics service
Create BiometricsService that takes care of loading the platformspecifc services, hiding the implementation details
Make it clearer which dependencies are needed by a specific biometrics-service (compile-error vs runtime-error)
Add unit tests
Isolate biometrics import/exports with a barrel file
* Fix#3148
recordActivity was only getting called when user-activity in the main window is recognized
When using biometrics to unlock, the Windows Hello/TouchID prompt would be focused and no input would be recognised. LastActive would have an old value and the vault would get locked
* Improve reloading with biometrics
* Mock import of desktop-native
* Add mock for "@bitwarden/desktop-native-linux-x64-musl"
* Revert "Add mock for "@bitwarden/desktop-native-linux-x64-musl""
This reverts commit 69771b94bf.
* mock the exports of desktop-native
* Pass process.platform inot BiometricsService
* [EC-1046] add activate autofill policy to web
* [EC-1046] add local setting if policy needs to be set
* [AC-1046] activate autofill on page load if flag exists
* [AC-1046] move activation to current tab page
* [AC-1046] add warning to autofill policy
* [AC-1046] add useActivateAutofillPolicy to organization reponse
* [AC-1046] autofill to auto-fill
* work: moving the form
* fix: lint do be crazy sometimes
* fix: remove debug stuff
* fix: dialogService
* per Danielle Flinn: option 1, leave sizing wide.
* work: move modules to own container
* work: reorg modules
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
* [EC-1086] fix: faulty orgId override
When single vault policy was in effect the orgId that the user belongs to was was always set for new ciphers for new ciphers. This was overwriting the client organization's id when a provider was trying to create new items in their clients vault.
* [AC-1086] chore: remove uneccessary assignments
* init refactor
* Fix current user access checks
* Add in warning dialogs that are aware of other APs
* cleanup handlers; refresh sa list on removal
* Code review updates
* [SM-580] Add warning dialog for Service account People tab (#4893)
* Add warning dialog from figma
* move dialog out of access selector component; add after delete event; remove people-sa logic
* remove commented code and unused service
* Updates to work with SM-581
---------
Co-authored-by: William Martin <contact@willmartian.com>
---------
Co-authored-by: William Martin <contact@willmartian.com>
* [EC-775] feat: add compatibility layer from #4154
* [EC-775] fix: ciphers not reloading on filter change
* [EC-775] feat: add support for cipher types
* [EC-775] feat: implement organization switching
* [EC-775] feat: remove invalid folder and collection checks
Had to remove these becuase they were causing double navigations on each click.
* [EC-775] fix: fix reverse data flow race condition
vault-filter.component was pushing up old filter models which would sometimes overwrite new filter models that came from the routed filter service.
* [EC-775] fix: No folder use-case not working
* [EC-775] feat: make navigation behave like master
* [EC-775] feat: add support for trash
* [EC-775] chore: simplify findNode
* [EC-775] feat: add support for org vault
* [EC-775] feat: add support for orgId in path
* [EC-775] feat: use proper treenode constructor
* [EC-775] chore: remove unnecessary variable
* [EC-775] docs: add docs to relevant classes
* [EC-775] chore: use existing function for searching tree
* [EC-775] fix: hide "new" button in trash view
* [EC-775] feat: add explicit handling for `AllItems`
* [EC-775] fix: prune folderId when changing organization
* [EC-775] fix: properly use `undefined` instead of `null`
* [EC-775] chore: simplify setters using ternary operator
* [EC-775] feat: add static typing to `type` filter
* [EC-775] feat: use new `All` variable for collections
* [EC-775] feat: return `RouterLink` compatible link from `createRoute`
* [EC-775] feat: add ordId path support to `createRoute`
* [EC-775] fix: interpret params differently in org vault
This is needed due to how defaults used to work when using `state-in-code`. We really want to get rid of this type of logic going forward.
* [EC-775] doc: clarify `createRoute`
* [EC-775] fix: better `type` typing
* [EC-775] feat: remove support for path navigation
It's better that we circle back to this type of navigationt when we're working on the VVR and have more knowledge about how this is supposed to work.
* [EC-775] fix: refactor bridge service to improve readability
Refactor follows feedback from PR review
* Init service layer changes
* refactor service to inherit abstract
* refactor access-selector component
* update access selector in projects
* add service accounts access selector
* update i18n
* fix delete action; use useExisting in providers
* update static permissions
* service account people should be readwrite on creation
* use setter instead of observable input
* remove warning callout
* remove abstract service
* truncate name in table
* remove extra comments
* Add projects access policy page
* Add locale
* use map instead of forEach
* refactor view factories
* update SA people copy
* map list responses
* Swap to using granted policies endpoints
* Remove text-xl from icon
---------
Co-authored-by: Thomas Avery <tavery@bitwarden.com>
Co-authored-by: William Martin <contact@willmartian.com>
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Init service layer changes
* refactor service to inherit abstract
* refactor access-selector component
* update access selector in projects
* add service accounts access selector
* update i18n
* fix delete action; use useExisting in providers
* update static permissions
* service account people should be readwrite on creation
* use setter instead of observable input
* remove warning callout
* remove abstract service
* truncate name in table
* remove extra comments
* use map instead of forEach
* refactor view factories
* update SA people copy
* map list responses
---------
Co-authored-by: William Martin <contact@willmartian.com>
* remove added template for ngIf and rename icon directive
* fix regression in product switcher
* fix text color of bulk delete in org vault
* use ng-container for *ngIf
* Move autofillConstants to autofill folder
* Remove autofillConstants from whitelist capital
* Add vault team as code owners for autofill folder
* Update codeowners for web
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
* SM-281: Initial commit with trash component setup
* SM-281: Customize secrets list component, add ability to hard delete secrets
* SM-281: Add support for restoring secrets in SM
* SM-281: restoreSecret emit values as an array
* SM-281: Fix bug caused by mistake when doing merge conflict resolution
* SM-281: Clean up TrashService and move more functionality to TrashApiService
* Cleanup responses
* Merge TrashService and SecretService
* Remove tw-text-sm from dialogs
* Split delete into two components
* Change secrets table to have a single boolean for trash
* SM-281: Rename component to secret-hard-delete
* Remove unused organizationId
* Remove duplicate buttons
---------
Co-authored-by: Hinton <hinton@users.noreply.github.com>
* This commit implements the following main changes:
- Query elements by using a TreeWalker instead of `document.querySelector[All]`. The reason for this is that `querySelector[All]` doesn't traverse into elements with ShadowRoot.
- Recursively traverse into elements with `openOrClosedShadowRoot` or `Element.shadowRoot` (depending on browser support) inside TreeWalker loop.
- Use new query logic everywhere inside `autofill.js`. This also means we need to use filter functions to find elements with specific nodeNames and/or attributes instead of CSS selector strings.
- Add two new `instanceof Element` checks to prevent `Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'." errors`.
This change is fully backward compatible. If `openOrClosedShadowRoot` is not available it will always return undefined and we will never traverse into ShadowRoots just as the behavior was before this change.
* refactor: outsource recursive logic to accumulatingQueryDocAll
We don't want the `els` argument on the `queryDocAll` function because it's never used from outside the function itself. Thus the recursive logic is moved to `accumulatingQueryDocAll`.
Now `queryDocAll` creates an empty array and passes it to `accumulatingQueryDocAll` which recursively walks the document and all ShadowRoots and pushes all found nodes directly to the referenced array.
The decision to use a directly mutated array instead of `Array.concat(els)` or `Array.push(...els)` is for performance reasons. Pushing to the referenced array was 74% faster than using `Array.push` with spread operator and even 90% faster than using `Array.concat`.
Co-authored-by: Chad Miller <64046472+chadm-sq@users.noreply.github.com>
* refactor: extract input field relevance check into own function
Addresses CodeScene analysis violation "Bumpy Road Ahead" where conditional logic is checked for a nesting of 2 or deeper.
* refactor: use proper element attribute handling
- use el.type attribute instead of el.attribute.type on input elements. This makes sure we also get 'text' when type attribute is not explicitly specified
- use el.htmlFor attribute instead of el.attribute.for on label elements
- use `hasAttribute` and `getAttribute` methods instead of `attributes[]` which is discouraged by https://quirksmode.org/dom/core/#attributes
- improve readability of `isRelevantInputField`
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Chad Miller <64046472+chadm-sq@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* SG-1083 - Refactor SSO form validation to work per EC requirements
* Move SSO component into its own folder for better folder management for future components in auth.
* Defect SG-1086 - Domain verification table: Change domain name from anchor tag to button + add title
* SG-1083 - Send null instead of empty string for sso identifier to avoid duplicate key in database issues.
* SG-1086 - Add button type to domain verification button to pass lint rules.
* Updated messages
* Implement method in platformUtils to get autofill command
* Updates to callout in current tab component
* Add autofill keyboard shortcut to autofill settings
* style updates
* Add routing animation for autofill settings
* Remove extra function
* Remove unnecessary safari logic
* Remove autofill settings transition added in another PR
* Fix callout still present after clicking 'Got it' (#4797)
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
* Port browser styles for generated password from browser to desktop
* Tweak styles
as the overall styles seem to diverge quite a bit from those of the browser extension, so things like the border color etc aren't as nicely defined, and there's already padding happening on the outer container, making the extra padding superfluous
* Wrap generator up as a `.box` / `.box-content` construct
adds the nice consistent box styles, same as the following blocks of content
* Wrap `.box` around both password AND username generated blocks
* Remove panel-like style, add browser extension border style