Commit Graph

1668 Commits

Author SHA1 Message Date
Cesar Gonzalez a1e649e809
[PM-5303] Fix issues found with SSO login (#7346)
* [PM-5303] Cannot login with SSO

* [PM-5303] Adding documentation to newly created ContentMessageHandler class

* [PM-5303] Updating manifest v3 implementation to use the newly scoped name

* [PM-5303] Adding jest tests to implementation
2023-12-22 20:00:52 +00:00
Jake Fink a62f8cd652
[PM-3797] Client changes to use new key rotation process (#6881)
## Type of change

<!-- (mark with an `X`) -->

```
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
```

## Objective

<!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding-->
Final Client changes for Key Rotation Improvements. 

- Introduces a new `KeyRotationService` that is responsible for owning rotation process.
- Moves `Send` re-encryption to the `SendService` (`KeyRotationService` shouldn't have knowledge about how domains are encrypted).
- Moves `EmergencyAccess` re-encryption to the `EmergencyAccessService`.
- Renames `AccountRecoveryService` to `OrganizationUserResetPasswordService` after feedback from Admin Console


## Code changes

<!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes-->
<!--Also refer to any related changes or PRs in other repositories-->

Auth
- **emergency-access-update.request.ts:** New request model for domain updates that includes Id
- **emergency-access.service.ts:** Moved `EmergencyAccess` re-encryption to the `EmergencyAccessService`. Add deprecated method for legacy key rotations if feature flag is off
- **key-rotation.service/api/spec/module:** New key rotation service for owning the rotation process. Added api service, module, and spec file.
- **update-key.request.ts:** Moved to Auth ownership. Also added new properties for including other domains.
- **migrate-legacy-encryption.component.ts:** Use new key rotation service instead of old component specific service. Delete old service.
- **change-password.component.ts:** Use new key rotation service.
- **settings.module.ts:** Import key rotation module.

Admin Console
- **organization-user-reset-password.service.ts/spec:** Responsible for re-encryption of reset password keys during key rotation. Added tests.
- **organization-user-reset-password-enrollment.request.ts:** New request model for key rotations
- **reset-password.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`
- **enroll-master-password-reset.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`

Tools
- **send.service/spec.ts:** Responsible only for re-encryption of sends during key rotation. Added tests.

Other
- **api.service.ts:** Move `postAccountKey` to `KeyRotationApiService`
- **feature-flag.enum.ts:** add new feature flag

## Screenshots

<!--Required for any UI changes. Delete if not applicable-->

## Before you submit

- Please add **unit tests** where it makes sense to do so (encouraged but not required)
- If this change requires a **documentation update** - notify the documentation team
- If this change has particular **deployment requirements** - notify the DevOps team
- Ensure that all UI additions follow [WCAG AA requirements](https://contributing.bitwarden.com/contributing/accessibility/)
2023-12-22 10:31:24 -05:00
github-actions[bot] e079fb4ab6
Autosync the updated translations (#7334)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-22 11:37:20 +01:00
github-actions[bot] d89d3f9196
Autosync the updated translations (#7335)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-22 11:28:01 +01:00
github-actions[bot] 6ed073bf80
Autosync the updated translations (#7333)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-22 11:26:18 +01:00
Shane Melton a19a4ffdf7
[AC-1879] Add null check for collection view helpers (#7073)
* [AC-1879] Add null check for collection view helpers

* [AC-1879] Add additional null check to organization-options.component.ts
2023-12-21 15:51:48 -08:00
Matt Gibson bbdf704763
Target messages to only the interested ports (#7301) 2023-12-21 14:01:48 -05:00
Bitwarden DevOps 062a3ce2d2
Bumped desktop version to 2023.12.2 (#7314) 2023-12-21 16:14:59 +00:00
Michał Chęciński 53e4127ab8
[DEVOPS-1501] Build and Deploy Web Vault for USDEV (DevTest) (#7309)
* Add usdev config

* add command to build usdev to package

* Add usdev to build

* Add usdev to web deploy workflow

* Fix

* Fix

* Fix
2023-12-21 17:10:31 +01:00
SmithThe4th 07d224d6bc
[PM-4239] When viewing an item with a passkey, passkey is not announced by screenreader (#7154)
* Made passkey field focusable

* Made passkey field focusableand accessibilty possible for screenreaders in announcing the field
2023-12-21 10:54:54 -05:00
renovate[bot] c3dbb72bf2
[deps] Autofill: Update tldts to v6.1.1 (#7249)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-21 09:11:56 -06:00
Thomas Rittson 061b15ba6d
Clone manage property when cloning collection (#7300) 2023-12-21 13:44:12 +10:00
cyprain-okeke de04bc4410
[AC-1753] Automatically assign provider's pricing to new organizations (#7228)
* changes for the msp task

* fix an issues

* resolve pr comment
2023-12-20 22:55:30 +01:00
SmithThe4th c1d856430a
[PM-4650] Provide user interaction for adding domain to excluded domains for passkeys (#7041)
* Added new locales text

* expose the sender url to be used in the use browser link component

* Modified use browser link to have a dropdown of two options, just once or always for this site

* modified component to use the use browser link component

* refactored method

* Made style changes and also updated the windows popout height

* ran prettier

* corrected google domain

* [PM-5281] [PM-5282] Disable User Interaction Post 'Always for this Site' Selection and Preserve Prior Exclusions (#7237)

* Added new domain alongside existing domains when saving to state

* Added an overlay whne user clicks always for this site to prevent further interaction on the page

* changed opacity

* moved overlay to fido2-use-browser-link

* removed private method and renamed variable
2023-12-20 10:38:35 -05:00
Bitwarden DevOps 8036113e46
Bumped cli version to 2023.12.1 (#7292) 2023-12-20 00:38:42 +00:00
Justin Baur c16d0b29fa
Register `StateProvider` in non DI clients (#7280)
* Add StateProvider and All to Browser Background

* Add State Provider and All to CLI

* Move EncryptService above its first usage
2023-12-19 20:07:16 +00:00
André Bispo a59eb8dec7
[PM-4048] Update DeleteAccountComponent on Desktop (#6846)
* [PM-4048] Use dialog service instead of modal service. Change UI file to use bit-Dialog. Remove from app module into standalone.

* [PM-4048] Update app.module imports

* [PM-4048] Fix form.

* PM-4048 - Delete Account tweak - remove unncessary delete header per discussion with product

* PM-4048 - Per CL migration guide,

* PM-4048 - (1) Remove button module import from dialog module exports (2) Add CL imports to desktop app module for delete acct dialog comp (3) Update delete acct dialog comp to use bitSubmit

* PM-4048 - Remove deprecated data-dismiss as bitDialogClose replaced it in terms of functionality.

* PM-4048 - Desktop Delete Acct - update loading button logic to latest CL standards (thanks Will!)

* PM-4048 - Must manually show errors to get "User Verification failed" message when user inputs incorrect MP.

* PM-4048 - desktop - delete-account.component.html - per PR feedback, remove non-tailwind classes and address missing bitFormButton

* PM-4048 - DeleteAccountComponent - per PR feedback, import DialogService using proper import alias.

* PM-4048 - delete-account.component.html - per PR feedback, remove no longer needed #form

* PM-4048 - delete-account.component.html - remove missed non-tailwind class

* PM-4048 - DeleteAccountComponent - per PR feedback, remove try catch as it is unnecessary as the bitSubmit handles errors

* add bespoke border to fix color contrast issue

* convert delete-account.component and user-verification.component to standalone; revert app module CL imports

* run prettier

* run prettier again

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: William Martin <contact@willmartian.com>
2023-12-19 14:02:19 -05:00
aj-rosado 7dff870c93
looking to routeOrgId instead orgId to redirect the user (#7216) 2023-12-19 18:35:03 +00:00
Oscar Hinton 017da06f9a
[CL-160] Rename BadgeType to BadgeVariant (#7244)
We're establishing a common language for the Component Library. As part of this work we're renaming componentType to variant. Starting with badges.
2023-12-19 19:22:37 +01:00
renovate[bot] 6122dbf96f
[deps] Platform: Update Rust crate typenum to v1.17.0 (#7286)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 17:32:00 +01:00
Bitwarden DevOps d1ecf2e8ea
Bumped browser version to 2023.12.1 (#7285) 2023-12-19 16:24:42 +00:00
renovate[bot] 3c1a46de42
[deps] Platform: Update Rust crate arboard to v3.3.0 (#7284)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 17:07:52 +01:00
renovate[bot] 17c4417e20
[deps] Platform: Update Rust crate thiserror to v1.0.51 (#7283)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 16:34:22 +01:00
renovate[bot] 8cfd79d6ad
[deps] Platform: Update Rust crate sha2 to v0.10.8 (#7282)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 16:12:44 +01:00
renovate[bot] 7361c5ce11
[deps] Platform: Update Rust crate core-foundation to v0.9.4 (#7277)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 15:54:42 +01:00
renovate[bot] ece0074f29
[deps] Platform: Update Rust crate gio to v0.18.4 (#7278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 15:31:10 +01:00
renovate[bot] 09801b0fa6
[deps] Platform: Update Rust crate base64 to v0.21.5 (#7276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-19 15:27:04 +01:00
Justin Baur 07e2731a2e
Access Returned Object With Global Key (#7240) 2023-12-18 23:58:39 -05:00
Matt Gibson 87b6651f8e
[pm-5287] fix account switch logout routing (#7231)
* Navigate to home from account switcher

Also updates the main background handling of logout to either finish switch or logout, depending on which occurred

* Prefer observable guards

we were racing the account switch process on `accountService` and this async guard. It only depended on account status, which is available from `accountService`, so the correct move was to observe that status.

The unauthGuardFn allows for updating homepage depending on window state because popout windows have different nav to other locations.
2023-12-18 14:23:43 -05:00
Oscar Hinton 21539e6e95
[PM-5299] Extract a danger-zone component (#7220)
Extract a re-useable danger-zone component instead of needing to duplicate the code.
2023-12-18 18:34:44 +01:00
Jared Snider 7ffa983469
Auth/PM-1658 - Dynamic Org Invite Link to accelerate users through org invite accept process (#6702)
* PM-1658 - Update Accept Organization component to take new org invite qParams into acct for accelerating the user through the org invite accept process.

* PM-1658 - Update trial initiation and register form comps to respect fromOrgInvite when email is populated to make the populated email read only so users in the org invite process dont change it.

* PM-1658 - Per PR feedback, we could simplify the logic by only sending the org sso identifier if it was required to be used.

* PM-1658 - Accept Comp - should send existing user email as qParam to get it to autofill properly. Previous "autofill" was due to using remember email when creating an account before testing the existing user inv flow.
2023-12-18 11:28:15 -05:00
Matt Gibson bc1f93d098
Add missing state provider factories (#7262) 2023-12-18 12:39:05 +00:00
Lemon 6199e58532
fix: list items lock race (#7133)
Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com>
2023-12-15 13:13:29 -05:00
github-actions[bot] 74a70e420a
Autosync the updated translations (#7234)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-15 15:31:01 +01:00
github-actions[bot] ffd5c8f70d
Autosync the updated translations (#7235)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-15 15:28:29 +01:00
github-actions[bot] c4278e7dbb
Autosync the updated translations (#7236)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-15 15:26:50 +01:00
Will Martin e102919c2f
[CL-133] add skip links to bit-layout (#7213)
* Add light LinkType to link directive

* add skip link to bit-layout; update i18n for all apps

* install storybook interaction testing packages

* update storybook config

* add skiplink story to bit-layout

* update route and focus logic

* remove focus ring
2023-12-15 09:06:05 -05:00
Will Martin b73d73b508
create team owned libs for billing, admin-console, platform (#7233)
* add admin-console lib files

* add billing lib files

* add platform lib files

* update lib references in config files

* update package-lock
2023-12-15 09:02:21 -05:00
Matt Gibson 4644392d5c
Clear vault filter on account switch (#7227) 2023-12-15 12:55:11 +00:00
Matt Gibson 00fd45a678
Update overlay on account switch (#7217) 2023-12-14 10:08:01 -06:00
Daniel James Smith 60d9f3d150
[PM-1925][PM-2741][AC-1334] flexible collections export page (#5759)
* Use bitTypography for page title

* Replaced app-callout with bit-callout

* Replace button with bit-button

* Update radio buttons to use CL

* Use searchable select for fileFormat dropdown

* Remove unneeded divs (old styling)

* pm-1826 remove eslint-disable tailwindcss/no-custom-classname

* Removed for-attribute from bit-labels

* Removed bitInput from bit-selects

* Removed name-attribute from bit-selects

* Make format a required field

* Removed unused dependency on cryptoService

* Remove unused dependency on BroadcasterService

* Removed dependency on window

* Moved organizationId into BaseExportComponent

* Add vaultSelector

Add organizationService as new dependency
Retrieve organizations a user has access to
Add vaultSelector dropdown
Add `export from` label
Add exportFromHint

* Removed hint as discussed by product&design

* Add function to check for import/export permission

* Export callout should listen to changes

Even though the organizationId was changed, the Input did not trigger changing the scope

* Reading FlexibleCollections feature flag to show the vault-selector on export (#7196)

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com>
2023-12-14 13:55:54 +01:00
Cesar Gonzalez 12de4b1386
[PM-5245] Autofill not triggering for fields that are not visible on load (#7209) 2023-12-13 21:17:47 +00:00
Thomas Cauquil bc61212969
[PM-4090] Fix: Automatic biometric authentication no longer worked (Resolves: #6134) (#6400)
* chore: improve FR localization

* fix: Automatic biometric authentication no longer worked

* chore: add tests for the fixed file

* Revert "chore: improve FR localization"

This reverts commit 957cbee9b3.

* tests: fixes after resolved conflicts

* chore(review): delete fluffy-spoon from tests

* chore(review): resolve warnings from tests
2023-12-13 13:16:22 -05:00
Cesar Gonzalez bf60711efe
[PM-934] Autofill not working until page has been refreshed (#6826)
* [PM-934] Autofill not working until page has been refreshed

* [PM-934] Adjusting cleanup of the messages_handler script

* [PM-934] Fixing small issue found within collection of page details

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Addressing concenrs brought up during code review

* [PM-934] Applying re-set changes to the autofill overlay implementation on reset of the extension

* [PM-934] Applying jest tests to added logic within AutofillOverlayContent service

* [PM-934] Fixing typo present in tabs background listener

* [PM-934] Finishing up jest tests for updated implementation

* [PM-934] Incorporating methodology for ensuring the autofill overlay updates to reflect user settings within existing tabs

* [PM-934] Refining implementation to ensure we do not unnecessarily re-inject content scripts when the autofill overlay settings change

* [PM-934] Working through jest tests for added implementation details

* [PM-934] Working through jest tests for added implementation details

* [PM-934] Finalizing jest tests for implemented logic

* [PM-5035] Refactoring method structure
2023-12-13 16:25:16 +00:00
Ike 7051f255ed
[PM-4168] Enable encryption for registered passkeys (#7074)
* Added enable encryption

* various updates and tests added.

* fixing linter errors

* updated spec file
2023-12-13 07:02:35 -08:00
Justin Baur 180d3a99e3
Timeout Vault of Inactive Users on System Lock (#7194) 2023-12-13 09:11:42 -05:00
✨ Audrey ✨ df406a9862
[PM-252] fix inconsistent generator configuration behavior (#6755)
* decompose password generator policy enforcement
* integrate new logic with UI
* improve UX of minimum password length
* improve password generator policy options documentation
* initialize min length to default minimum length boundary
* reset form value on input to prevent UI desync from model

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-12-12 19:17:20 -05:00
Todd Martin bfa76885ac
[PM-4107] Only call config on successful sync (#7149) 2023-12-12 18:14:34 -05:00
rr-bw bb096724b2
update account switcher styling for all themes (#7182) 2023-12-12 10:59:03 -08:00
SmithThe4th f0cdcccf81
[PM-4012] Vault Timing out on Chrome and Edge breaks passkeys until page is reloaded (#6845)
* changed content script injection strategy

* added persistent connection and reinjection of the content script

* cleanup resources on disconnect

* cleanup resources on disconnect

* concluded messanger event listeners cleanup and added unit tests

* Switched to use browser api add listener instead of navtive apis

* renamed cleanup to destroy and added reconnect and disconnect command functions

* refactored to use foreach and check for only https urls

* refactored the content script to only load the page script if it currently doesn't extist of the page, and if it does sends a reconnect command to the page-script to replace the native webauthn methods

* updated unit test

* removed memoized logic

* moved the send disconect command to the messenger

* updated unit test

* test messenger handler

* [PM-4012] fix: add `senderId` to messenger

* destroy pending requets

* cleaned up page script and terminated pending request

* fixed cannot read properties of undefined

* rearranged functions, renamed misspelled words, and created test

* mocked EventTarget as there are issues on jest for listeners getting the events

* Return fall back error instead

* Update apps/browser/src/vault/fido2/content/content-script.ts

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

* Update apps/browser/src/vault/fido2/content/messaging/messenger.ts

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

* removed whitespace

---------

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2023-12-12 13:49:24 -05:00
Will Martin 02ba26e53c
[AC-1786] deprecate manager role (#6931)
* add deprecation message

* hide manager option

* deprecate manager enum
2023-12-12 09:43:47 -05:00
Will Martin 79dbe051c8
[AC-1747] deprecate access control indicator (#6796)
---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-12-11 22:40:11 -05:00
Cesar Gonzalez 4d05b008f0
[PM-5035] Fix autofill overlay clickjacking vulnerability that can be triggered by a malicious extension (#7001)
* [PM-5035] Fix autofill overlay clickjacking vulnerability that can be triggered by a malicious extension

* [PM-5035] Modifying method structure

* [PM-5035] Refactoring method structure

* [PM-5035] Refactoring method structure

* [PM-5035] Applying prettier to implementation
2023-12-11 15:44:15 -06:00
Matt Gibson 33fd7094ca
Do not early return from logout (#7147)
The subsequent path helps to trigger process reload when the active user
logs out and the new active is locked.
2023-12-11 15:19:56 -05:00
Matt Gibson b4dbace7a6
Do not drop optional parameters in overrides (#7176) 2023-12-11 13:44:23 -05:00
Oscar Hinton a40643d9d6
Move SM header into web (#6976) 2023-12-11 18:22:37 +01:00
Andreas Coroiu 29841605fb
[PM-4766] Disable fido2 integration on bw vault page (#6861)
* [PM-4766] feat: disable fido2 integration on bw vault page

* [PM-4766] fix: lint
2023-12-11 17:05:48 +01:00
Alex Morask 4f9120576d
[AC-1797] Prevent billing email/business name update for resellers (#7042)
* Prevent billing email/business name updates for reseller

* Enable business name based on CS feedback

* Fixed prettier issue
2023-12-11 10:26:43 -05:00
renovate[bot] ea9cc85f7f
Update cargo minor (#6121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
2023-12-11 15:23:48 +01:00
Oscar Hinton cf0c6e8896
[PM-4349] Migrate hasPremium and debounceNavigation to be functional (#6591)
Class based router guards are deprecated as of Angular 15.2, per angular.io/guide/deprecations#router-class-and-injection-token-guards. To simplify future angular upgrades we need to resolve these deprecations.

This PR migrates the HasPremium and DebounceNavigationService guards to use the new functional pattern.
2023-12-11 14:22:34 +00:00
Cesar Gonzalez 7db844baf2
[PM-5048] Query params are not persisting in extension popout window (#7019)
* [PM-5048] Query params are not persisting in extension popout window

* [PM-5048] Reverting how we identify whether the user is popping out the current tab;

* [PM-5048] Adding jest test to validate skipping parsing of the extension path

* [PM-5048] Adding jest test to validate skipping parsing of the extension path

* [PM-5048] Reworking implementation to ensure that popout window query params remain persistent

* [PM-5048] Reworking implementation to ensure that appended query params do not remain persistent, but popout window query params do remain persistent. Fixing issues within vault item popouts and adding jest tests to verify those fixes

* [PM-5048] Modifying how query params are set within vault popout windows

* [PM-5048] Running prettier
2023-12-08 22:26:29 +00:00
Rui Tomé 483a197e4d
[AC-1139] Flexible collections: deprecate Manage/Edit/Delete Assigned Collections custom permissions (#6906)
* [AC-1139] Add new layout for MemberDialogComponent when FC feature flag is enabled

* [AC-1139] Deprecated Organization canEditAssignedCollections, canDeleteAssignedCollections, canViewAssignedCollections

* [AC-1139] Checking if FC feature flag is enabled when using canDeleteAssignedCollections or canViewAssignedCollections

* [AC-1139] Added missing parameter to customRedirect

* [AC-1139] Fixed canEdit permission

* [AC-1139] Fixed CanDelete logic

* [AC-1139] Changed canAccessVaultTab function to receive configService

* Override deprecated values on sync

* [AC-1139] Reverted change that introduced ConfigService as a parameter to canAccessVaultTab

* [AC-1139] Fixed circular dependency

* [AC-1139] Moved overriding of deprecated values to syncService

* Revert "[AC-1139] Fixed circular dependency"

This reverts commit 6484420976.

* Revert "Override deprecated values on sync"

This reverts commit f0c25a6996.

* [AC-1139] Added back the deprecation of methods canEditAssignedCollections, canDeleteAssignedCollections, canViewAssignedCollections

* [AC-1139] Reverted change on syncService

* [AC-1139] Override deprecated values on sync

* [AC-1139] Fix canDelete logic in
collection-dialog.component.ts and
bulk-delete-dialog.component.ts

* [AC-1139] Moved override logic from syncService to organizationService

* [AC-1139] Add ability to have titlecase titles on nested-checkbox.component checkboxes; use on member-dialog.component

* Revert "[AC-1139] Add ability to have titlecase titles on nested-checkbox.component checkboxes; use on member-dialog.component"

This reverts commit 9ede0fc5ac.

* [AC-1139] Fix bulk delete functionality

* [AC-1139] Refactor canEdit and canDelete to use ternary operator

* [AC-1139] Fix canDelete condition in VaultComponent

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-12-08 18:07:52 +00:00
Daniel James Smith d76602343f
Bump electron to v27.1.3 (#7134)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-08 13:07:46 +01:00
github-actions[bot] 7289111399
Autosync the updated translations (#7139)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-08 11:33:21 +00:00
Daniel García db3bbc0aea
[PM-5144] Use sync fs in desktop i18n loading (#7114) 2023-12-08 12:15:46 +01:00
github-actions[bot] c8c52957a0
Autosync the updated translations (#7140)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-08 12:02:15 +01:00
github-actions[bot] e0229021b0
Autosync the updated translations (#7138)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-08 11:56:31 +01:00
Cesar Gonzalez dafb251cac
[PM-4923] Form elements that fade into view contain incorrectly cached page details (#6953)
* [PM-4923] Form Elements that Fade into View Contain Incorrectly Cached Page Details

* [PM-4923] Form Elements that Fade into View Contain Incorrectly Cached Page Details

* [PM-4923] Running prettier on implementation
2023-12-07 22:23:42 +00:00
Thomas Avery 51c5e053f7
[SM-909] Migrate service account people tab to new selector (#6534)
* migrate sa -> people tab to new selector

* remove unused code

* Add access token still available warning
2023-12-07 15:33:45 -06:00
Cesar Gonzalez e5b8fd4388
[PM-5148] Removing Browser Autofill Override Setting and Add Message (#7110)
* [PM-5148] Removing Browser Autofill Override Setting and Add Message

* [PM-5148] Removing translation keys

* [PM-5148] Removing translation keys

* [PM-5148] Modifying how we present the link to users to ensure translations can be more effective
2023-12-07 20:39:28 +00:00
Todd Martin 2b3faca86b
Move PasswordStrengthComponent to Tools (#7125)
* Moved password-strength component to Tools

* Move zxcvbn into Tools ownership

zxcvbn is the library currently used to calculate the password-strength

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-07 14:11:05 -05:00
renovate[bot] 2b9635cb9a
[deps] Tools: Update jsdom to v23 (#7130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 12:39:16 +01:00
github-actions[bot] 6ddf87bc72
Bumped desktop version to 2023.12.1 (#7123)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-06 13:35:32 -05:00
rr-bw ac899bebeb
[PM-194] Browser Account Switcher UI (#6772)
* Handle switch messaging

TODO: handle loading state for account switcher

* Async updates required for state

* Fallback to email for current account avatar

* Await un-awaited promises

* Remove unnecessary Prune

Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning

* Fix temp password in browser

* Use direct memory access until data is serializable

Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service

* Reload badge and context menu on switch

* Gracefully switch account as they log out.

* Maintain location on account switch

* Remove unused state definitions

* Prefer null for state

undefined can be misinterpreted to indicate a value has not been set.

* Hack: structured clone in memory storage

We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context

* Null check nullable values

active account can be null, so we should include null safety in the
equality

* Correct background->foreground switch command

* Already providing background memory storage

* Handle connection and clipboard on switch account

* Prefer strict equal

* Ensure structuredClone is available to jsdom

This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.

* Fixup types in faker class

* add avatar and simple navigation to header

* add options buttons

* add app-header to necessary pages

* add back button and adjust avatar sizes

* add helper text when account limit reached

* convert magic number to constant

* add clarifying comment

* adjust homepage header styles

* navigate to previousp page upon avatar click when already on '/account-switcher'

* move account UI to own component

* add i18n

* show correct auth status

* add aria-hidden to icons

* use listbox role

* add screen reader accessibility to account component

* more SR a11y updates to account component

* add hover and focus states to avatar

* refactor hover and focus states for avatar

* add screen reader text for avatar

* add slide-down animation on account switcher close

* remove comment

* setup account component story

* add all stories

* move navigation call to account component

* implement account lock

* add button hover effect

* implement account logout

* implement lockAll accounts functionality

* replace 'any' with custom type

* add account switcher button to /home login page

* use <main> tag (enables scrolling)

* change temp server filler name

* temporarily remove server arg from account story

* don't show avatar on /home if no accounts, and don't show 'lock'/'logout' buttons if no currentAccount

* add translation and a11y to /home avatar

* add correct server url to account component

* add 'server' to AccountOption type

* Enabled account switching client-side feature flag.

* add slide-in transition to /account-switcher page

* change capitalization to reflect figma design

* make screen reader read active account email, address more capitalization

* fix web avatar misalignment

* make avatar color based on user settings and in sync with other clients

* make property private

* change accountOptions to availableAccounts for clarity

* refactor to remove 'else' template ref

* remove empty scss rule

* use tailwind instead of scss

* rename isSelected to isActive

* add 'isButton' to /home page avatar

* move files to services folder

* update import

* Remove duplicate active account button

* Move no account button to current-account component

* Always complete logging out

Fixes PM-4866

* make screenreader read off email, not name

* refactor avatar for button case

* Do not next object updates

StateService's init was calling `updateState` at multiple layers,
once overall and then again for each account updated. Because
we were not maintaining a single state object through the
process, it was ending up in a consistent, but incomplete state.
Fixed by returning the updated state everywhere. This very well
may not be all the bugs associated with this

* Treat null switch account as no active user

* Listen for switchAccountFinish before routing (#6950)

* adjust avatar style when wrapped in a button

* show alt text for favicon setting

* move stories to browser

* Send Finish Message on null

* Dynamically set active user when locking all

This is required because some user lock states are not recoverable after
process reload (those with logout timeout). This waits until reload is
occurring, then sets the next user appropriately

* Move Finished Message to Finally Block

Fix tests

* Drop problematic key migration

Fixes PM-4933. This was an instance of foreground/background collision
when writing state. We have several other fallbacks of clearing
these deprecated keys.

* Prefer location to homebrew router service

* Initialize account disk cache from background

Uses the `isRecoveredSession` bool to re-initialize foreground caches
from a background message. This avoids a lengthy first-read for
foregrounds

* PM-4865 - Browser Acct Switcher - only show lock btn for lockable accounts (#6991)

* Lock of active account first, when locking multiple.

Fixes PM-4996

* Fix linter

* Hide lock now for locked users (#7020)

* Hide lock now for locked users

* Prefer disabling button to removing

* Add tooltip to TDE without unlock method

* Load all auth states on state init (#7027)

This is a temporary fix until the owning services can update state
themselves. It uses the presence of an auto key to surmise unlocked
state on init. This is safe since it's run only once on extension start.

* Ps/pm 5004/add load to account switcher (#7032)

* Add load spinner to account switcher

* Remove ul list icons

* Properly size account switcher in popout

* [PM-5005] Prevent Double Navigation (#7035)

* Delete Overriden Method

* Add Lock Transition

* truncate email and server name

* remove account.stories.ts (will add in separate PR)

* Do not switch user at reload if no user is active

* fix prettier issues

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2023-12-06 09:22:48 -08:00
github-actions[bot] 0aca876b75
Bumped browser,cli,desktop version to 2023.12.0 (#7116)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-06 10:42:04 -05:00
Oscar Hinton 7bbdee9daa
[PM-3565] Enforce higher minimum KDF (#6440)
Changes minimum iterations for PBKDF2 to 600 000. Also converts the constants into ranges to ensure there is only a single place for all checks.
2023-12-05 10:55:12 -05:00
github-actions[bot] 56860482b1
Bumped web version to 2023.12.0 (#7105)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-05 10:54:08 -05:00
renovate[bot] 67f25eec1f
[deps] Tools: Update tldts to v6.1.0 (#7104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 14:47:34 +01:00
renovate[bot] 2972c6fd96
[deps] Platform: Update @types/node to v18.19.2 (#6739)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 12:33:49 +01:00
Will Martin 4b7ab41132
[AC-1726] Create restricted access view for collections (#6949) 2023-12-04 16:12:55 -05:00
Jared L e961761ee9
fix(browser): prevent registration-induced crash (#6799)
Fixed a bug where `authenticatorSelection` may be undefined and cause
the extension to crash when attempting to register a new credential.

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2023-12-04 14:57:17 -05:00
Conner Turnbull c1963f1bc3
Cleaned up feature flag logic now that it's released (#7030) 2023-12-04 08:16:43 -05:00
Jake Fink 641ae844fb
[PM-3797 Part 2] Create Account Recovery Service (#6667)
* create account recovery service

* update legacy migration tests

* declare account recovery service in migrate component

* create account recovery module

* remove changes to core organization module

* use viewContainerRef to allow dependency injection on modal

* fix imports
2023-12-01 17:21:04 -05:00
Thomas Rittson 0d035c5a09
[AC-1873] Only assign user in the front-end if using Flexible Collections (#7051)
* Only assign user in the front-end if using Flexible Collections

* Fix prettier
2023-12-01 09:45:52 -06:00
github-actions[bot] 8a19328af2
Autosync the updated translations (#7054)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-01 12:18:23 +01:00
github-actions[bot] 67ffe67816
Autosync the updated translations (#7055)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-01 12:09:12 +01:00
Jake Fink 8a0fa574c7
move web settings to auth (#7022) 2023-11-30 17:15:06 -05:00
Cesar Gonzalez 0b9a2775f0
[PM-5043] Update ownership of code to autofill team (#7017)
* [PM-5043] Update owernship of code belonging to autofill team

* [PM-5043] Updating location of webRequest.background.ts file to belong to autofill team

* [PM-5043] Updating location of autofill component settings within the popup
2023-11-30 19:59:33 +00:00
Daniel James Smith 1c43f77d51
Make linter happy (#7043)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-11-30 16:20:23 +00:00
Daniel James Smith a79b4e182f
Fix hide text toggle on send access (#7028)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-11-30 16:07:25 +00:00
renovate[bot] 28de9439be
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2023-11-29 16:15:20 -05:00
Jonathan Prusik 4ff5f38e89
replace del with rimraf (#7024) 2023-11-29 13:53:48 -05:00
Jonathan Prusik c945f08a5d
update gulp-zip and gulp-filter to latest versions (#7026) 2023-11-29 13:44:22 -05:00
Matt Gibson 7a7fe08a32
Ps/pm 2910/handle switch messaging (#6823)
* Handle switch messaging

TODO: handle loading state for account switcher

* Async updates required for state

* Fallback to email for current account avatar

* Await un-awaited promises

* Remove unnecessary Prune

Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning

* Fix temp password in browser

* Use direct memory access until data is serializable

Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service

* Reload badge and context menu on switch

* Gracefully switch account as they log out.

* Maintain location on account switch

* Remove unused state definitions

* Prefer null for state

undefined can be misinterpreted to indicate a value has not been set.

* Hack: structured clone in memory storage

We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context

* Null check nullable values

active account can be null, so we should include null safety in the
equality

* Correct background->foreground switch command

* Already providing background memory storage

* Handle connection and clipboard on switch account

* Prefer strict equal

* Ensure structuredClone is available to jsdom

This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.

* Fixup types in faker class
2023-11-29 09:59:50 -05:00
ttalty ed865a6747
[PM-3560] Adding the password complexity component to the password protected va… (#6936)
* Adding the password complexity component to the password protected valut export

* Removing the zxcvbn import as the component handles the strength check
2023-11-28 14:44:06 -05:00
Shane Melton 9f81f66e2c
Move purge-vault.component.ts to Vault code ownership (#6992) 2023-11-28 12:03:45 -05:00
renovate[bot] 0489e1a4a1
[deps] Tools: Update tldts to v6.0.22 (#6990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 23:15:01 +01:00
Oscar Hinton a5e3432f85
Assign ownership to many libs files (#6928)
Assign ownership to many of the remaining libs/common files.

Criteria for ownership:
* Files used by a single team, is now owned by that team.
* Files related to a domain owned by a team is now owned by that team.
* Where ownership is unclear the "lowest level" service takes ownership.
2023-11-27 20:59:44 +00:00
Shane Melton f82f9ba0d0
[AC-1122] Add new admin access to all collections and items settings (#6703)
* [AC-1117] Add manage permission (#5910)

* Add 'manage' option to collection access permissions

* Add 'manage' to collection permissions

* remove service accidentally committed from another branch

* Update CLI commands

* update message casing to be consistent

* access selector model updates

* [AC-1374] Limit collection create/delete (#5963)

* feat: udate request/response/data/domain models for new column, refs AC-1374

* feat: create collection management ui, refs AC-1374

* fix: remove limitCollectionCdOwnerAdmin boolean from org update request, refs AC-1374

* fix: moved collection management UI, removed comments, refs AC-1374

* fix: observable chaining now properly calls API when local org updated, refs AC-1374

* fix: remove unused form template variables, refs AC-1374

* fix: clean up observable chain, refs AC-1374

* fix: remove parent.parent route, refs AC-1374

* fix: add cd explaination, refs AC-1374

* [AC-1649] Remove organizationId from collection-bulk-delete.request (#6343)

* refactor: remove organizationId from collection-bulk-delete-request, refs AC-1649

* refactor: remove request model from dialog component, refs AC-1649

* [AC-1174] Bulk collection management (#6133)

* [AC-1174] Add bulk edit collection access event type

* [AC-1174] Add bulk edit collection access menu option

* [AC-1174] Add initial bulk collections access dialog

* [AC-1174] Add logic to open bulk edit collections dialog

* [AC-1174] Move AccessItemView helper methods to access selector model to be shared

* [AC-1174] Add access selector to bulk collections dialog

* [AC-1174] Add bulk assign access method to collection-admin service

* [AC-1174] Introduce strongly typed BulkCollectionAccessRequest model

* [AC-1174] Update vault item event type name

* Update DialogService dependency

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>

* Rename LimitCollectionCdOwnerAdmin -> LimitCollectionCreationDeletion (#6409)

* Add manage property to synced Collection data

* Revert "Add manage property to synced Collection data"

Pushed to feature branch instead of a new one

This reverts commit 65cd39589c.

* Add manage property to synced Collection data

* Revert "Add manage property to synced Collection data"

This reverts commit f7fa30b79a.

* [AC-1680] Add manage property to collection view and response models (#6417)

* Add manage property to synced Collection data

* Update tests

* feat: add LimitCollectionCreationDeletion conditional to canCreateNewCollections logic, refs AC-1659 (#6429)

* [AC-1669] Enforce Can Manage permission on Collection dialog (#6493)

* [AC-1669] Cleanup unhandled promise warnings

* [AC-1669] Force change detection to ensure AccessSelector has the most recent items

* [AC-1669] Initially select acting member when creating a new collection

* [AC-1669] Add validator to ensure manage permission is selected

* [AC-1669] Update error toast logic to support access tab errors

* [AC-1669] Add error icon

* [AC-1713] [Flexible collections] Add feature flags to clients (#6486)

* Add FlexibleCollections and BulkCollectionAccess flags

* Flag Collection Management settings

* Flag bulk collection access dialog

* Flag collection access modal changes

* [AC-1662] Add LimitCollecitonCreationDeletion conditional to CanDelete logic (#6526)

* feat: implement limitCollectionCreationDeletion into canDelete logic, refs AC-1662

* feat: make canDelete functions backwards compatible with feature flag, refs AC-1662

* feat: update vault-items.component for async getter, refs AC-1662

* feat: update configService injection, refs AC-1662

* feat: add config service to canDelete reference, refs AC-1662

* fix: remove configservice dependency from views, refs AC-1757 (#6686)

* Add missing provider to vault-items.stories (#6690)

* [AC-1730] Add new AllowAdminAccessToAllCollectionItems setting to org response models

* [AC-1730] Add new AllowAdminAccessToAllCollectionItems setting to org request model

* [AC-1730] Add new collection setting to UI and include it when submitting

* [AC-1122] Add V1 feature flag

* [AC-1122] Hide new setting behind V1 feature flag

* [AC-1122] Add support for disabled form control

---------

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-11-27 11:44:15 -08:00
Vincent Salucci aac4177a6c
[AC-1179][AC-1738] Event log for collection management setting (#6699)
* [AC-1117] Add manage permission (#5910)

* Add 'manage' option to collection access permissions

* Add 'manage' to collection permissions

* remove service accidentally committed from another branch

* Update CLI commands

* update message casing to be consistent

* access selector model updates

* [AC-1374] Limit collection create/delete (#5963)

* feat: udate request/response/data/domain models for new column, refs AC-1374

* feat: create collection management ui, refs AC-1374

* fix: remove limitCollectionCdOwnerAdmin boolean from org update request, refs AC-1374

* fix: moved collection management UI, removed comments, refs AC-1374

* fix: observable chaining now properly calls API when local org updated, refs AC-1374

* fix: remove unused form template variables, refs AC-1374

* fix: clean up observable chain, refs AC-1374

* fix: remove parent.parent route, refs AC-1374

* fix: add cd explaination, refs AC-1374

* [AC-1649] Remove organizationId from collection-bulk-delete.request (#6343)

* refactor: remove organizationId from collection-bulk-delete-request, refs AC-1649

* refactor: remove request model from dialog component, refs AC-1649

* [AC-1174] Bulk collection management (#6133)

* [AC-1174] Add bulk edit collection access event type

* [AC-1174] Add bulk edit collection access menu option

* [AC-1174] Add initial bulk collections access dialog

* [AC-1174] Add logic to open bulk edit collections dialog

* [AC-1174] Move AccessItemView helper methods to access selector model to be shared

* [AC-1174] Add access selector to bulk collections dialog

* [AC-1174] Add bulk assign access method to collection-admin service

* [AC-1174] Introduce strongly typed BulkCollectionAccessRequest model

* [AC-1174] Update vault item event type name

* Update DialogService dependency

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>

* Rename LimitCollectionCdOwnerAdmin -> LimitCollectionCreationDeletion (#6409)

* Add manage property to synced Collection data

* Revert "Add manage property to synced Collection data"

Pushed to feature branch instead of a new one

This reverts commit 65cd39589c.

* Add manage property to synced Collection data

* Revert "Add manage property to synced Collection data"

This reverts commit f7fa30b79a.

* [AC-1680] Add manage property to collection view and response models (#6417)

* Add manage property to synced Collection data

* Update tests

* feat: add LimitCollectionCreationDeletion conditional to canCreateNewCollections logic, refs AC-1659 (#6429)

* [AC-1669] Enforce Can Manage permission on Collection dialog (#6493)

* [AC-1669] Cleanup unhandled promise warnings

* [AC-1669] Force change detection to ensure AccessSelector has the most recent items

* [AC-1669] Initially select acting member when creating a new collection

* [AC-1669] Add validator to ensure manage permission is selected

* [AC-1669] Update error toast logic to support access tab errors

* [AC-1669] Add error icon

* [AC-1713] [Flexible collections] Add feature flags to clients (#6486)

* Add FlexibleCollections and BulkCollectionAccess flags

* Flag Collection Management settings

* Flag bulk collection access dialog

* Flag collection access modal changes

* feat: update event type with new collection management event, refs AC-1179

* [AC-1662] Add LimitCollecitonCreationDeletion conditional to CanDelete logic (#6526)

* feat: implement limitCollectionCreationDeletion into canDelete logic, refs AC-1662

* feat: make canDelete functions backwards compatible with feature flag, refs AC-1662

* feat: update vault-items.component for async getter, refs AC-1662

* feat: update configService injection, refs AC-1662

* feat: add config service to canDelete reference, refs AC-1662

* fix: remove configservice dependency from views, refs AC-1757 (#6686)

* feat: add new event type and update event service, refs AC-1179

* Add missing provider to vault-items.stories (#6690)

* fix: enum typo and name scheme, refs AC-1179

* fix: update message example, refs AC-1179

* fix: modifiedCollectionManagement message example, refs AC-1179

---------

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Shane Melton <smelton@bitwarden.com>
2023-11-27 12:08:25 -06:00