Commit Graph

550 Commits

Author SHA1 Message Date
Oscar Hinton f7b372a0b0
[PM-2276] Upgrade Storybook to v7 (#5258) 2023-05-26 15:58:06 +02:00
github-actions[bot] 0d96997af8
Autosync the updated translations (#5517)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-26 10:38:57 +02:00
Jared Snider 0fcfe883b5
Feature/[PM-1378] - Trusted Device Encryption - Establish trust logic for all clients (#5339)
* PM1378 - (1) Create state service methods for securely storing a device symmetric key while following existing pattern of DuckDuckGoKey generation (2) Create makeDeviceKey method on crypto service which leverages the new state service methods for storing the device key.

* PM-1378 - Document CSPRNG types w/ comments explaining what they are and when they should be used.

* PM-1378 - TODO to add tests for makeDeviceKey method

* PM-1378 - Create Devices API service for creating and updating device encrypted master keys + move models according to latest code standards ( I think)

* PM-1378 - TODO clean up - DeviceResponse properly moved next to device api service abstraction per ADR 0013

* PM-1378 - CryptoService makeDeviceKey test written

* PM-1378 - Tweak crypto service makeDeviceKey test to leverage a describe for the function to better group related code.

* PM-1378 - Move known devices call out of API service and into new devices-api.service and update all references. All clients building.

* PM-1378 - Comment clean up

* PM-1378 - Refactor out master key naming as that is a reserved specific key generated from the MP key derivation process + use same property on request object as back end.

* PM-1378 - Missed a use of master key

* PM-1378 - More abstraction updates to remove master key.

* PM-1378 - Convert crypto service makeDeviceKey into getDeviceKey method to consolidate service logic based on PR feedback

* PM-1378- Updating makeDeviceKey --> getDeviceKey tests to match updated code

* PM-1378 - Current work on updating establish trusted device logic in light of new encryption mechanisms (introduction of a device asymmetric key pair in order to allow for key rotation while maintaining trusted devices)

* PM-1378 - (1) CryptoService.TrustDevice() naming refactors (2) Lots of test additions and tweaks for trustDevice()

* PM-1378 - Updated TrustedDeviceKeysRequest names to be consistent across the client side board.

* PM-1378 - Move trusted device crypto service methods out of crypto service into new DeviceCryptoService for better single responsibility design

* PM-1378 - (1) Add getDeviceByIdentifier endpoint to devices api as will need it later (2) Update TrustedDeviceKeysRequest and DeviceResponse models to match latest server side generic encrypted key names

* PM-1378 - PR feedback fix - use JSDOC comments and move from abstraction to implementation

* PM-1378 - Per PR feedback, makeDeviceKey should be private - updated tests with workaround.

* PM-1378- Per PR feedback, refactored deviceKey to use partialKey dict so we can associate userId with specific device keys.

* PM-1378 - Replace deviceId with deviceIdentifier per PR feedback

* PM-1378 - Remove unnecessary createTrustedDeviceKey methods

* PM-1378 - Update device crypto service to leverage updateTrustedDeviceKeys + update tests

* PM-1378 - Update trustDevice logic - (1) Use getEncKey to get user symmetric key as it's the correct method and (2) Attempt to retrieve the userSymKey earlier on and short circuit if it is not found.

* PM-1378 - Replace deviceId with deviceIdentifier because they are not the same thing

* PM-1378 - Per PR feedback, (1) on web/browser extension, store device key in local storage under account.keys existing structure (2) on desktop, store deviceKey in secure storage. (3) Exempt account.keys.deviceKey from being cleared on account reset

* PM-1378 - Desktop testing revealed that I forgot to add userId existence and options reconciliation checks back

* PM-1378 - Per discussion with Jake, create DeviceKey custom type which is really just an opaque<SymmetricCryptoKey> so we can more easily differentiate between key types.

* PM-1378 - Update symmetric-crypto-key.ts opaque DeviceKey to properly setup Opaque type.

* PM-1378 - Fix wrong return type for getDeviceKey on DeviceCryptoServiceAbstraction per PR feedback
2023-05-25 14:17:19 -04:00
Shane Melton 86471790ca
[AC-561] Refactor delete organization component (#5007)
* [AC-561] Rename DeleteOrganizationComponent to DeleteOrganizationDialogComponent

* [AC-561] Refactor delete organization dialog to use dialog service

- Use new bit-dialog
- Use reactive form and bitSubmit directives
- Add injected dialog params
- Switch to observable pattern
- Use dialog result instead of success event emitter
- Add helper method to open dialog using dialog service
- Update usage in families-for-enterprise-setup.component.ts and account.component.ts

* [AC-561] Create a UserVerification module

Move the user verification components into their own module that can be imported in multiple modules without conflict and allow tree shaking.

* [AC-561] Move delete-organization-dialog into its own folder

* [AC-561] Create delete organization dialog module

* [AC-561] Cleanup delete org dialog import statements

* [AC-561] Remove unused property

* [AC-561] Use organization observable from organizationService

* [AC-561] Use organization object instead of pull out storing the name individually

* [AC-561] Make the delete organization dialog a standalone component

- Remove the delete organization dialog module
- Move the dialog component up a directory
- Remove references to the deleted module

* [AC-561] Fix DialogServiceAbstraction references after merge

* [AC-561] Cleanup dialog loading spinner and cancel button

* [AC-561] Fix broken barrel file after merge
2023-05-25 07:49:30 -07:00
Oscar Hinton 62591a8bc8
[PM-2328] Fix jest deprecations (#5483) 2023-05-22 20:19:16 +02:00
André Bispo b9fe78796a
[PM-1019] Environment selection clients (#5480)
* [PM-169][PM-142][PM-191] Add Environments to Web and Desktop (#5294)

* [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-169] Web: add drop down to select environment

* [PM-169] Fix pop up menu margins. Add DisplayEuEnvironmentFlag.

* [PM-169] Change menu name.

* [PM-169] Add environment selector ts and html. Add declaration and import on login.module

* [PM-169] Add environment selector to desktop.

* [PM-169] Ignore lint error.

* [PM-169] add takeUntil to subscribes

* [PM-191] PR Fixes, code format

* [PM-168] Add Environments to extension login/registration (#5434)
2023-05-19 17:35:42 +01:00
Shane Melton 3f7a63b2c6
[PM-2102] Implement logic to keep row control enable/disable status in sync with the access item properties whenever the parent control is enabled/disabled (#5433)
Angular 15 introduced a breaking change that calls setDisabledState() whenever a CVA is added. This was re-enabling all the internal form group rows (even those that should have remained disabled).
2023-05-18 10:32:18 -07:00
Oscar Hinton 3da7fc7cb3
Deprecated broadcaster (#5461) 2023-05-17 12:27:27 +02:00
Shane Melton 909d54e326
[AC-358] Update help doc link (#5455) 2023-05-15 12:18:06 -07:00
Shane Melton bcda04ee86
[AC-358] SelfHosted update subscription page (#5101)
* [AC-358] Add selfHostSubscriptionExpiration property to organization-subscription.response.ts

* [AC-358] Update selfHost org subscription template

- Replace "Subscription" with "SubscriptionExpiration"
- Add question mark help link
- Add helper text for grace period
- Add support for graceful fallback in case of missing grace period in subscription response

* Update libs/common/src/billing/models/response/organization-subscription.response.ts

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-358] Remove unnecessary hypen

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-358] Introduce SelfHostedOrganizationSubscription view
- Encapsulate expiration/grace period logic in the new view object.
- Remove API response getters from the angular component
- Replace the API response object with the new view

* [AC-358] Clarify name for new expiration without grace period field

* [AC-358] Update constructor parameter name

* [AC-358] Simplify new selfhost subscription view

- Make expiration date properties public
- Remove obsolete expiration date getters
- Update the component to use new properties
- Add helper to component for determining if the subscription should be rendered as expired (red text)

* [AC-358] Rename isExpired to isExpiredAndOutsideGracePeriod to be more explicit

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-05-15 07:38:53 -07:00
aj-rosado 44fd063dc1
[PM-2054] Updated Password Generator History to use Component Library on Web (#5414)
* [PM-2054] Updated Password Generator History to use Component Library

* [PM-2054] Corrected paddings

* [PM-2054] Added missing type to buttons

* [PM-2054] Removed unused imports and run prettier

* [PM-2054] Swap list by bit-table
2023-05-15 12:01:28 +01:00
github-actions[bot] cec48eb3d3
Autosync the updated translations (#5435)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-12 10:59:33 +02:00
github-actions[bot] 14717742b1
Autosync the updated translations (#5432)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-11 19:56:23 +02:00
Shane Melton ab4d8df2ae
[AC-1145] Add trusted devices option to encryption settings on sso config (#5383)
* [AC-1145] Add TDE feature flag

* [AC-1145] Update sso-config to use new member decryption type and remove keyConnectorEnabled

* [AC-1145] Add new TDE option to SSO config form and update to CL radio buttons

* [AC-1145] Update checkboxes to CL checkboxes

* [AC-1145] Fix messages.json warning

* [AC-1145] Update to new form async actions

* [AC-1145] Modify key connector option display logic to check for TDE feature flag

* [AC-1145] Remove obsolete app-checkbox component

* [AC-1145] Update TDE option description to refer to master password reset policy
2023-05-10 12:51:56 -07:00
github-actions[bot] 6f34fcb86e
Bumped web version to 2023.4.2 (#5420)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-10 10:59:54 -04:00
Oscar Hinton f196928c20
[PM-2186] Change collection and group dialogs to large (#5403) 2023-05-10 13:35:09 +02:00
Jonathan Prusik 6eb032b697
[PM-1884] Address vault ui long name overflow and vertical letter cutoff (#5345)
* address vault ui long name overflow and vertical letter cutoff

* address vertical icon placement in item row
2023-05-09 19:45:35 -04:00
Robyn MacCallum 8dc7ead853
Add more descriptive titles for web vault rows (#5404)
* Add more descriptive titles for web vault rows

* Swap example strings
2023-05-09 14:03:31 -04:00
cd-bitwarden e97390ba3f
[SM-664] Checking if the user has selected access tokens to revoke, if not err… (#5299)
* Checking if the user has selected access tokens to revoke, if not error message

* change messaging

* SM-664: Refactor revoke function and make the bwi-minus-circle red

---------

Co-authored-by: Colton Hurst <colton@coltonhurst.com>
2023-05-09 09:56:17 -04:00
github-actions[bot] c5674080ef
Bumped web version to 2023.4.1 (#5412)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-09 09:54:19 -04:00
Robyn MacCallum 9bbaae6ef2
[PM-2089] Fix Collections not nesting properly in the Org Vault (#5369) 2023-05-08 13:22:06 -04:00
Robyn MacCallum 0b9ed77b8e
[PM-2088] Remove extra click handling from Collection row (#5353) 2023-05-08 13:21:45 -04:00
github-actions[bot] 2ae93f1fd1
Autosync the updated translations (#5375)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-05 10:14:36 +02:00
Oscar Hinton 20d40a0388
[PM-2087] Bump tailwind and prettier-plugin-tailwindcss (#5320) 2023-05-04 17:02:45 +02:00
SmithThe4th 50eea96ec5
[PM-1699] Updated low kdf iterations warning (#5170)
* updated low ksf iterations warning

* Removed test implementation

* Removed unused translation and updated key

* Enabled low kdf on this branch for testing

* Removed duplicate showKdf initialiazation

* [PM-1700] Put KDF warning behind a LaunchDarkly Feature Flag (#5308)

* Added feature flag for low kdf iteration

* Added feature flag implementation to component

* Renamed feature flag to align with what is setup on LaunchDarkly
2023-05-04 09:46:12 -04:00
Oscar Hinton c2278c082c
[PM-2104] Resolve dialog defects (#5357) 2023-05-04 13:52:08 +02:00
github-actions[bot] 1dbfb9df49
Autosync the updated translations (#5352)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-05-03 20:55:52 +02:00
Jonathan Prusik d3efcd9279
add aria-label to account button (#5338) 2023-05-03 11:39:39 -04:00
SmithThe4th f655460fa7
[PM-1399] Resolve eslint errors for button type - vault (#5274)
* 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)
2023-05-03 10:55:22 -04:00
Jake Fink 2c51af192c
Move auth to app folder (#5336)
* move auth folder into app folder

* fix auth folder imports

* reorder imports in login component
2023-05-02 16:08:52 -04:00
Oscar Hinton 4e1867682f
[PM-1504] Migrate Dialogs to DialogService (#5013)
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
2023-05-02 18:46:03 +02:00
Oscar Hinton f37ff09e10
[PM-1915] Remove selector for all dialogs (#5257) 2023-05-01 17:59:47 +02:00
Oscar Hinton 7ed0a4bbf2
[PM-1914] Migrate all dialogs to use the new bitDialogFooter default styling (#5256) 2023-05-01 17:59:29 +02:00
Cesar Gonzalez de078c4bcd
[PM-1433] Creating Item Doesn't Auto-Select Current Organization/Collection in Individual Web Vault (#5302) 2023-05-01 10:07:57 -05:00
Robyn MacCallum 671a9115bb
[PM-1400] Update IconComponent to use OnPush ChangeDetection (#5181)
* 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>
2023-04-28 15:07:26 -04:00
github-actions[bot] 62234934fc
Autosync the updated translations (#5306)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-04-28 08:01:28 +02:00
aj-rosado 525de3bfd2
[PM-730] Corrected EventType when copying password (#5229)
* [PM-730] Corrected EventType when copying password

* [PM-730] Corrected copy password and totp events
2023-04-27 16:46:48 +01:00
Thomas Avery 208e3f30b4
[SM-670] Restrict UI actions based on user permission (#5090)
* Restrict UI actions based on user permission

* Swap to hiding bulk option without permission

* Fix read/write assignment in project service

* Filter projects based on permission in dialog

* Fix encryption error for updating secret result

* Fix spinner (#5182)

* Swap to bit-no-items

* [SM-699] Projects bulk delete - add bulk confirmation dialog (#5200)

* Add bulk confirmation dialog

* Code review updates

* Code review - load projects

* code review - swap to observable

* Code review - remove oninit
2023-04-26 13:09:30 -05:00
Will Martin 95b1ea318c
[SM-688] use dynamic-avatar in SM (#5203)
* make dynamic-avatar standalone; use in SM

* fix broken story
2023-04-26 12:25:09 -04:00
André Bispo cfc380c697
[PM-1349] Update client service to retrieve feature flags from API (#5064)
* [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
2023-04-26 15:30:39 +01:00
Jake Fink dfe69f77f5
[PM-687] emergency access invite lost during sso (#5199)
* [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
2023-04-26 08:47:35 -04:00
Jim Hays 9f7bf1132b
[PM-1877] Spellcheck (#5237)
* Bug fix: "vaule" -> "value"

* Bug fix: "aria-descibedby" -> "aria-describedby"

* Bug fix: "chararacter" -> "character"

* Fix typos in comments

* Fix typos in documentation

* Fix typo in test description

* Fix typos in sample data: "childen" -> "children"

* Fix typos in sample data: "pargraphs" -> "paragraphs"

* Fixes to test data: "Additinoal", "Informaion" -> "Additional", "Information"

* Fix typo in test data: "dolhpin" -> "dolphin"

* Fix typo in local variable: "attachement" -> "attachment"

* Fix typo in method name: "detachOrganizastion" -> "detachOrganization"

* Fix typo in method name: "getNewlyAddedDomians" -> "getNewlyAddedDomains"

* Fix typo: "EncyptedMessageResponse" -> "EncryptedMessageResponse"

* Fix typo: "miliseconds" -> "milliseconds"

* Fix typo: "authResponsePushNotifiction" -> "authResponsePushNotification"

* Fix typo: "getPushNotifcationObs" -> "getPushNotificationObs"

* Fix typo: "ExpriationDate" -> "ExpirationDate"

* Fix typo: "OrganizationUserResetPasswordDetailsReponse" -> "OrganizationUserResetPasswordDetailsResponse"

* Fix typo: "DISPLAY_TITLE_ATTRIBUE" -> "DISPLAY_TITLE_ATTRIBUTE"

* Fix typo: "credentialretreivalCommandHandler" -> "credentialRetrievalCommandHandler"

* Fix typo: "buildLoginCredntials" -> "buildLoginCredentials"

* Fix typo: "_mappedCredentialsColums" -> "_mappedCredentialsColumns"

* Fix typo: "_mappedPersonalInfoAsIdentiyColumns" -> "_mappedPersonalInfoAsIdentityColumns"

* Fix typo in input name: "StroageGbAdjustment" -> "StorageGbAdjustment"

* Fix typo in const: "encryptionAlogrithm" -> "encryptionAlgorithm"

---------

Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-04-26 12:16:07 +02:00
github-actions[bot] 395d3c7034
Bump Web version to 2023.4.0 (#5281)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-04-25 10:50:54 -06:00
Oscar Hinton 76673ebe8b
[PM-1541] Adjust the dialogs max-width (#5036) 2023-04-25 16:45:35 +02:00
github-actions[bot] c763415edf
Autosync the updated translations (#5250)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-04-24 18:21:26 +02:00
Rui Tomé 89c8c48cd4
[AC-1340] Fixed cipher restore for provider users by using the restore-admin endpoints (#5255) 2023-04-21 12:22:34 +01:00
Andreas Coroiu 315c4ffc76
[AC-1338] fix: filter out unassigned from cipher create/edit/clone (#5238) 2023-04-21 10:30:30 +02:00
Rui Tomé aacabf5bdf
[AC-1340] [Defect] Provider users unable to delete vault items for client organizations (#5242)
* [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
2023-04-20 16:33:29 +01:00
Jared Snider aa26bc5e17
Defect/[PM-1887] - Fix Account Creation Terms of Service Checkbox not clickable in Safari (#5240)
* 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.
2023-04-19 17:19:55 -04:00
Oscar Hinton 68b62e73f1
[SM-645] Use search component in secrets manager (#4991)
* Move search component into the component library

* Migrate search fields

* Reshuffle imports slightly

* Remove export input module

---------

Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
2023-04-19 16:21:57 -04:00