1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-15 10:35:20 +01:00
Commit Graph

139 Commits

Author SHA1 Message Date
Bernd Schoolmann
081fe83d83
PM-10393 SSH keys (#10825)
* [PM-10395] Add new item type ssh key (#10360)

* Implement ssh-key cipher type

* Fix linting

* Fix edit and view components for ssh-keys on desktop

* Fix tests

* Remove ssh key type references

* Remove add ssh key option

* Fix typo

* Add tests

* [PM-10399] Add ssh key import export for bitwarden json (#10529)

* Add ssh key import export for bitwarden json

* Remove key type from ssh key export

* [PM-10406] Add privatekey publickey and fingerprint to both add-edit and view co… (#11046)

* Add privatekey publickey and fingerprint to both add-edit and view components

* Remove wrong a11y title

* Fix testid

* [PM-10098] SSH Agent & SSH Key creation for Bitwarden Desktop (#10293)

* Add ssh agent, generator & import

* Move ssh agent code to bitwarden-russh crate

* Remove generator component

* Cleanup

* Cleanup

* Remove left over sshGenerator reference

* Cleanup

* Add documentation to sshkeyimportstatus

* Fix outdated variable name

* Update apps/desktop/src/platform/preload.ts

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Rename renderersshagent

* Rename MainSshAgentService

* Improve clarity of 'id' variables being used

* Improve clarity of 'id' variables being used

* Update apps/desktop/src/vault/app/vault/add-edit.component.html

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Fix outdated cipher/messageid names

* Rename SSH to Ssh

* Make agent syncing more reactive

* Move constants to top of class

* Make sshkey cipher filtering clearer

* Add stricter equality check on ssh key unlock

* Fix build and messages

* Fix incorrect featureflag name

* Replace anonymous async function with switchmap pipe

* Fix build

* Update apps/desktop/desktop_native/napi/src/lib.rs

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Revert incorrectly renamed 'Ssh' usages to SSH

* Run cargo fmt

* Clean up ssh agent sock path logic

* Cleanup and split to platform specific files

* Small cleanup

* Pull out generator and importer into core

* Rename renderersshagentservice to sshagentservice

* Rename cipheruuid to cipher_id

* Drop ssh dependencies from napi crate

* Clean up windows build

* Small cleanup

* Small cleanup

* Cleanup

* Add rxjs pipeline for agent services

* [PM-12555] Pkcs8 sshkey import & general ssh key import tests (#11048)

* Add pkcs8 import and tests

* Add key type unsupported error

* Remove unsupported formats

* Remove code for unsupported formats

* Fix encrypted pkcs8 import

* Add ed25519 pkcs8 unencrypted test file

* SSH agent rxjs tweaks (#11148)

* feat: rewrite sshagent.signrequest as purely observable

* feat: fail the request when unlock times out

* chore: clean up, add some clarifying comments

* chore: remove unused dependency

* fix: result `undefined` crashing in NAPI -> Rust

* Allow concurrent SSH requests in rust

* Remove unwraps

* Cleanup and add init service init call

* Fix windows

* Fix timeout behavior on locked vault

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Fix libc dependency being duplicated

* fix SSH casing (#11840)

* Move ssh agent behind feature flag (#11841)

* Move ssh agent behind feature flag

* Add separate flag for ssh agent

* [PM-14215] fix unsupported key type error message (#11788)

* Fix error message for import of unsupported ssh keys

* Use triple equals in add-edit component for ssh keys

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
Co-authored-by: aj-bw <81774843+aj-bw@users.noreply.github.com>
2024-11-08 11:01:31 +01:00
Daniel James Smith
b23d62a280
[PM-14183] Show success toast on copy history value (#11911)
* Remove unnecessary copy icon

* Fix styling of copy success toast
- Use CopyClick directive instead of manually copying and showing the toast
- Adjust tests

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-11-07 15:28:32 -08:00
Nick Krantz
b42741f313
[PM-13839][PM-13840] Admin Console Collections (#11649)
* allow admin console to see all collections when viewing a cipher

- When "manage all" option is selected all collections should be editable

* update cipher form service to use admin endpoints

* when saving a cipher, choose to move to collections first before saving any other edits

- This handles the case where a cipher is moving from unassigned to assigned and needs to have a collection to save any other edits

* set admin flag when the original cipher has zero collections

- handling the case where the user  un-assigns themselves from a cipher

* add check for the users ability to edit items within the collection

* save cipher edit first to handle when the user unassigns themselves from the cipher

* update filter order of collections

* use cipher returned from the collections endpoint rather than re-fetching it

* fix unit tests by adding canEditItems

* re-enable collection control when orgId is present

* fetch the updated cipher from the respective service for editing a cipher
2024-11-07 10:22:35 -06:00
Nick Krantz
d5139e0511
change totp code to monospace font (#11844) 2024-11-06 09:42:53 -06:00
Nick Krantz
adcd5bd307
hide ownership view when viewing a cipher in the admin console (#11852) 2024-11-05 10:09:16 -06:00
Justin Baur
f41365ce48
[PM-13673] Require UserId In CompareHash Method (#11568)
* Require UserId In CompareHash Method

* Throw on null-ish 'masterKey'

* Update Test
2024-11-04 15:11:59 -05:00
Nick Krantz
f416c3ed49
[PM-13449] Owner assignment/visibility in AC (#11588)
* Revert "remove logic for personal ownership, not needed in AC"

This reverts commit f04fef59f4.

* allow for ownership to be controlled from the admin console when cloning a cipher
2024-11-01 14:15:36 -05:00
Nick Krantz
00e1c936fb
[PM-13928]use the user's email address in owner dropdown rather than "You" (#11798)
* use the user's email address in owner dropdown rather than "You"

* show ownership value in individual vault when disabled

* import account service in storybook
2024-11-01 11:05:02 -05:00
Nick Krantz
bb296c7f8d
[PM-13145] Hidden fields font (#11764)
* display card number and security code with mono font

* display hidden custom fields with mono font

* display passwords with mono font
2024-10-31 08:06:32 -05:00
Bernd Schoolmann
b486fcc689
[Pm-13097] Rename cryptoservice to keyservice and move it to km ownership (#11358)
* Rename cryptoservice to keyservice

* Rename cryptoservice to keyservice

* Move key service to key management ownership

* Remove accidentally added file

* Fix cli build

* Fix browser build

* Run prettier

* Fix builds

* Fix cli build

* Fix tests

* Fix incorrect renames

* Rename webauthn-login-crypto-service

* Fix build errors due to merge conflicts

* Fix linting
2024-10-24 19:41:30 +02:00
Cesar Gonzalez
9b471e6633
[PM-13715] Launching a website from the extension does not trigger an update to reference the correct autofill value (#11587)
* [PM-13715] Launching page from cipher does not set correct autofill action

* [PM-13715] Fix autofill not triggering for correct cipher after page has been launched from browser extension
2024-10-24 08:22:43 -05:00
Nick Krantz
80a4fba787
Allow for the web generation dialog to disable the margin of the tools generation components (#11565) 2024-10-18 15:57:34 -05:00
Nick Krantz
97bf459424
[PM-13251] Password History (#11618)
* add password history view component in vault lib

* integrate PasswordHistoryView into individual vault

* add password history v2 to browser extension

* update color of password history link

* add check for `cipherId` before rendering password history
2024-10-18 14:57:08 -05:00
Nick Krantz
d8f1527db0
[PM-13016] Browser default match detection (#11569)
* update conditional to only exit early if value is null

- The UriMatchStrategy for Domain was 0 and hitting the conditional

* add baseDomain test
2024-10-16 08:11:41 -05:00
✨ Audrey ✨
dc1f014ad8
[PM-8282] credential generator (#11398)
* credential generator browser ui
* switch browser generate screen to extension refresh flag
* consolidate generator components into module
* add `@bitwarden/generator-components` readme
* normalize generator component rx subscriptions
2024-10-08 14:08:34 -04:00
Nick Krantz
dee7d94b1d
add platform service to cipher form story (#11458) 2024-10-08 11:45:45 -05:00
Nick Krantz
22b16b20a7
remove user match strategy on the web (#11385) 2024-10-08 10:53:20 -05:00
Nick Krantz
2c8f09d547
move password count button to display before password toggle (#11450) 2024-10-08 10:50:44 -05:00
Thomas Rittson
7c72795d1c
[PM-12747] Move CollectionService and models to AC Team (#11278) 2024-10-08 10:14:39 -04:00
Nick Krantz
a6db7e3086
[PM-10426] Admin Console - Edit Modal (#11249)
* add `hideFolderSelection` for admin console ciphers

* hide folder form field when configuration has `hideFolderSelection` set to true

* add `addCipherV2` method in the admin console vault

* add browser refresh logic for add/edit form

* add admin console implementation of `AdminConsoleCipherFormConfigService`

* only allow edit dialog in admin console

* remove duplicate check

* refactor comments

* initial integration of combined dialog

* integrate add cipher with admin console vault

* account for special admin console collection permissions

* add `edit` variable to AC ciphers when the user has permissions

* Move comment to JSDoc

* pass full cipher to view component

* validate edit access when opening view form

* partial-edit not applicable for admin console

* refactor hideIndividualFields to be more generic and hide favorite button

* pass entire cipher into edit logic to match view logic

* add null check for cipher when attempting to view

* remove logic for personal ownership, not needed in AC
2024-10-07 10:59:23 -05:00
Shane Melton
68f4c2e879
[PM-12389] Vault Item Dialog Fixes (#11374)
* [PM-12389] Hide delete button when there is no cipher to delete

* [PM-12389] Ensure decrypted collections and folders are available before building cipher form config

* [PM-12389] Hide the delete button when cloning ciphers
2024-10-07 07:23:00 -07:00
Shane Melton
bdf91e24c6
[PM-13177] Fix Unassigned cipher collection assignment in AC (#11419)
* [PM-13177] Add saveCollectionsWithServerAdmin to CipherService

* [PM-13177] Introduce isSingleCipherAdmin flag to AssignCollections component
2024-10-04 12:11:03 -07:00
Nick Krantz
e6ff647343
fix value update for match detections (#11417) 2024-10-04 13:16:21 -05:00
Nick Krantz
02993f7018
[PM-10439] Vault generator components (#11350)
* add password/username generator strings to web app

* remove JSLibServicesModule from generator dependencies

* integrate username and password generators into browser extension

* integrate username and password generators into web app

* move Jslib order back

* remove margin from within the generator components

* add alternative background to web generator dialog

* remove unneeded margin from username generator

* remove disable margin from div

* Revert "remove unneeded margin from username generator"

This reverts commit ae3067e3f2.

* remove CSS to alter internal margins of the generator components
2024-10-04 08:39:29 -05:00
Shane Melton
0d877c4e77
[PM-12389] Combined web vault item dialog (#11345)
* [PM-12389] Cleanup attachment dialog UI bugs

* [PM-12389] Add formReady event to CipherForm

* [PM-12389] Use ngOnChanges for CipherView component initialization

* [PM-12389] Cleanup web specific services and components

* [PM-12389] Introduce combined Vault Item Dialog component

* [PM-12389] Use the new VaultItemDialog in the Individual Vault

* [PM-12389] Deprecate the AddEditV2 and View dialogs in Web

* [PM-12389] Fix failing test

* [PM-12389] Fix broken imports after move

* [PM-12389] Remove messages.json addition that is taken care of in another PR
2024-10-02 14:34:46 -07:00
Alec Rippberger
f8ccf0cfb8
[PM-12553][Defect] Delete Attachment button needs hover state. (#11339)
* Remove tw-border-none class from delete button.

* Add transparent border
2024-10-01 11:48:59 -05:00
Alec Rippberger
b54ec7a204
Remove left padding from attachments list. (#11275) 2024-09-30 13:00:46 -05:00
Alec Rippberger
742900a663
PM-11390: [Defect] View Login - Clicking Password History opens Edit Item window behind View Login window (#11119)
* Add password dialog component.

* Properly direct to browser password history screen.

* Add padding to history items.

* Update test to correct password history route.

* Remove unneeded provider.

* Use relative path for SharedModule.
2024-09-25 10:45:13 -04:00
Jonathan Prusik
e88e231d48
[PM-11588] Bugfix - parse user input value for combined expiry date when creating/adding a card cipher (#11103)
* simplify logic and fix some pattern-matching bugs

* add first pass at parsing combined expiry year and month from user input

* clean up code

* fix broken three-digit parsing case

* fix case where splitCombinedDateValues returns empty strings when the input is only a delimiter

* fix incorrect expectation of falsy negative integers

* clean up code

* split out logic from parseYearMonthExpiry

* move utils from vault to autofill
2024-09-24 10:36:44 -04:00
SmithThe4th
0db179e974
[PM-739] Using a space at the beginning of otpauth:// generate a wrong OTP (#11204)
* Trimmed tariling whitespace from totp field

* Trimmed tariling whitespace from totp field

* Fix failing test
2024-09-23 16:45:53 -04:00
Shane Melton
36a9228523
[PM-11391] Replace button tag with div for TOTP timer (#11116) 2024-09-20 06:56:21 -07:00
Nick Krantz
c13131acd1
remove border styles, allow for component library to style the icon button (#11154) 2024-09-20 08:45:44 -05:00
Shane Melton
4327fa21f6
[PM-11343] Browser Refresh - View dialog permissions in AC (#11092)
* [PM-11343] Add param to conditionally disable the edit button

* [PM-11343] Cleanup router navigation and move query param handling to callers of the View dialog

* [PM-11343] Fix failing test

* [PM-11343] Fix missing router after merge

* [PM-11343] Add null checks in case the dialog result is undefined (due to closing via the ESC key)

* [PM-11343] Add support to provide a list of collections to the cipher view component

* [PM-11343] Add collections as an optional view cipher dialog parameter

* [PM-11343] Update the org vault to provide collections when opening the View cipher dialog

* [PM-11343] Fix import

* [PM-11343] Use [replaceUrl] for cipher items to avoid needing double back button
2024-09-19 10:43:28 -07:00
Alec Rippberger
6c1d74a4ce
[PM-11395] [Defect] View Login - TOTP premium badge does nothing when clicked (#10857)
* Add MessagingService to LoginCredentialView component.

* Add comments.

* Add WIP PremiumUpgradeService

* Simplify web PremiumUpgradeServices into one service.

* Relocate service files.

* Add browser version of PremiumUpgradePromptService.

* Cleanup debug comments.

* Run prettier.

* rework promptForPremium to take organization id and add test.

* Add test for browser

* Rework imports to fix linter errors.

* Add Shane's reworked WebVaultPremiumUpgradePromptService.
2024-09-18 16:00:54 -05:00
Alec Rippberger
931f86c948
[PM- 9666] Implement edit item view individual vault (#10553)
* Add initial vault cipher form for cipher edit.

* Add ability to add new cipher by type

* Add ability to save and clone cipher,

* Update canEditAllCiphers to take 1 argument.

* Add attachments button to add/edit dialog.

* Add semi-working attachment dialog.

* Add working attachment functionality.

* Remove debugging code.

* Add tests for new attachments dialog component.

* Add AddEditComponentV2 tests.

* Remove AddEditComponentV2 delete functionality.

* Remove unnecessary else statement.

* Launch password generation in new dialog when extension refresh enabled.

* Add tests for PasswordGeneratorComponent.

* Adjust password and attachments dialog sizes.

* run lint:fix

* Remove unnecessary form from button.

* Add missing provider in test.

* Remove password generation events.

* Add WebVaultGeneratorDialogComponent and WebCipherFormGenerationService

* Move and rename CipherFormQueryParams

* Use WebCipherFormGenerationService to launch password / user generation modals.

* Add WebVaultGeneratorDialogComponent tests.

* Remove unnecessary functionality and corresponding tests.

* Fix failing tests.

* Remove unused properties from AddEditComponentV2

* Pass CipherFormConfig to dialog.

* Clean up unused attachment dialog functionality.

* Update AddEdit cancel functionality to prevent navigating user.

* Make attachment dialog open a static method.

* Add addCipherV2 method and clean up tests.

* Remove changes to QueryParams.

* Add tests for WebCipherFormGenerationService

* Remove unused onCipherSaved method.

* Remove cipherSaved event.

* Remove unused password generator component

* Refactor to simplify editCipherId for extensionRefresh flag.

* Add additional comments to AddEditComponentV2.

* Simplify open vault generator dialog comment.

* Remove unused organizationService

* Remove unnecessary typecasting.

* Remove extensionRefreshEnabled and related.

* Remove slideIn animation

* Remove unused AddEditComponentV2 properties.

* Add back generic typing.

* Condesnse properties into single form config.

* Remove onDestroy and related code.

* Run prettier

* fix injection warning

* Handle cipher save.

* Redirect to vault on delete and make actions consistent.

* Update comment.
2024-09-18 12:48:47 -05:00
Shane Melton
99ba56785d
[PM-11393] Remove the need for TotpCaptureService in Autofill Options View component (#11093) 2024-09-17 13:15:11 -07:00
Nick Krantz
d68853a4a2
[PM-11131] Screen Reader Announcements for Copy (#11091)
* add copy specific aria-labels for login ciphers

* add copy specific aria-labels for card ciphers

* add copy translations for identity to web translations
2024-09-17 13:23:15 -05:00
Alec Rippberger
651f1e586a
PM-11468: Add data-testids for View Item pages (#11043)
* Add data test IDs for identity information.

* Add data test IDs for custom fields.
2024-09-16 17:01:38 -05:00
Nick Krantz
26f3dcfc66
add back events for browser refresh extension (#11085)
- something went sideways in a merge
2024-09-16 14:02:20 -05:00
Nick Krantz
a31ecb18a1
[PM-11267] Extension Refresh Events (#10832)
* add `Cipher_ClientViewed` event to browser refresh components

* add `Cipher_ClientToggledPasswordVisible` event to browser refresh components

* add `Cipher_ClientToggledHiddenFieldVisible` event to browser refresh components

* add `Cipher_ClientToggledCardCodeVisible` event to browser refresh components

* add `Cipher_ClientToggledCardNumberVisible` event to browser refresh components

* add `Cipher_ClientToggledTOTPSeedVisible` event to browser refresh components

* add `Cipher_ClientCopiedPassword` event to browser refresh components

* add events for copying cipher fields from the vault menu

* add `Cipher_ClientCopiedHiddenField` event to browser refresh components

* add mock for tests

* add missing `Cipher_ClientCopiedCardCode` event

* remove the need for separate fields input

* add organization id to event collection so events are collected

* update test

* add event collection service to cipher form stories
2024-09-12 14:47:23 -05:00
Victoria League
a0a0a7ae13
[CL-395] Add and use art colors in svgs (#10990) 2024-09-11 14:54:07 -04:00
Shane Melton
8e4dab5eba
[PM-10996] Remove restrict-provider-access feature flag (#10977) 2024-09-11 10:45:23 -07:00
Alec Rippberger
ee738ac36a
Update "linked" to use "cfTypeLinked" message. (#10841)
Co-authored-by: Shane Melton <smelton@bitwarden.com>
2024-09-07 21:20:39 -05:00
Nick Krantz
fb1a294c97
update aria label of the character count toggle (#10915) 2024-09-06 08:49:46 -05:00
Nick Krantz
7dcfaf8271
add title for attachment name (#10908)
- adds the ability for a user to see the attachment name while hovering over it
2024-09-05 14:41:39 -05:00
Alec Rippberger
fdd2c774c6
[PM-11339] [Defect] Owner information in Item details section needs spacing and alignment (#10762)
* Add vault files to config.content array.

* Adjust unordered list spacing.
2024-09-04 15:45:23 -07:00
Jonathan Prusik
44f1fc156c
[PM-11458] Bugfix - If two digit year was entered for card, the expired card message shows if card is not expired (#10801)
* normalize card expiry year before determining if it is expired

* add tests
2024-09-04 13:39:48 -04:00
Nick Krantz
72dab94216
remove brand from logic that determines if the card section should show (#10871) 2024-09-04 11:44:52 -05:00
Nick Krantz
3e9fb2009e
[PM-10934] Remove last form-field bottom border (#10751)
* match API of new CL FormField component

* remove readonly border for additional options component

* remove readonly border for last autofill option

* remove readonly border for last custom-field form field

* remove readonly border for when collection,org or folder is available

* add `ReadOnlyCipherCardComponent` to handle readonly border

* remove readonly border for the last identity form field

* remove readonly border for the last card form field

* remove readonly border for the last login form field

* remove unneeded true value
2024-09-04 10:50:34 -05:00
Jonathan Prusik
5f2eecd7be
[PM-11350] Use shared expiration year normalization util function (#10735)
* use shared expiration year normalization util function

* use shared exp year normalization in web and desktop client

* handle cases where input has leading zeroes

* add utils tests

* handle cases where input is all zeroes
2024-09-03 15:12:36 -04:00