1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00
Commit Graph

557 Commits

Author SHA1 Message Date
Matt Gibson
160a636fa0
Move key types to central location (#7531) 2024-01-17 07:27:44 -05:00
Jared Snider
756c02cec2
Auth/PM-4596 - Extract PIN and Biometrics unlock method logic into re-useable services for user verification (#7107)
* PM-4596 - PinCryptoService first draft

* PM-4596 - PinCryptoService - Refactor pinKeyEncryptedKey retrievals out into own method getPinKeyEncryptedKeys

* PM-4596 - npm ci + npm run prettier to fix lint issues

* PM-4596 - PinCryptoService - Add kdf types

* PM-4596 - PinCryptoService - Refactor pin validation into own helper method.

* PM-4596 - Rename pin-crypto.service.ts to pin-crypto.service.implementation.ts

* PM-4596 - PinCryptoService - add additional logging for error states.

* PM-4596 - JslibServicesModule - register new PinCryptoService and PinCryptoServiceAbstraction

* PM-4596 - PinCryptoService - modify decryptUserKeyWithPin signature to not require email to match MP verification process in user verification service.

* PM-4596 - Lock components - use new PinCryptoService.decryptUserKeyWithPin(...) to get user key + refactor base comp unlock with pin method to improve

* PM-4596 - Lock component - if too many invalid attempts, added toast explaining that we were logging the user out due to excess PIN entry attempts

* PM-4596 - UserVerificationService - (1) Refactor verifyUser(...) to use switch + separate methods for a cleaner parent method + better extensibility for PIN & biometrics which are TBD (2) Add PIN support to validateInput(...)

* PM-4596 - UserVerificationService - add PIN and biometrics functions to verifyUser(...)

* PM-4596 - PinCryptoService Spec - start test file - instantiates properly

* PM-4596 - PinCryptoService tests - WIP

* PM-4596 - PinCryptoService tests - WIP - got success cases working

* PM-4596 - pin-crypto.service.implementation.spec.ts renamed to pin-crypto.service.spec.ts

* PM-4596 - PinCryptoService.getPinKeyEncryptedKeys(...) - add comment + var name change for clarity

* PM-4596 - PinCryptoService tests - test invalid, null return scenarios

* PM-4596 - CLI - bw.ts - update UserVerificationService instantiation to include new pinCryptoService

* PM-4596 - PinCryptoService - import VaultTimeoutSettingsServiceAbstraction instead of implementation for factory creation to get browser building

* PM-4596 - (1) Create pinCryptoServiceFactory for browser background (2) Add it to the existing userVerificationServiceFactory

* PM-4596 - Browser - Main.background.ts - Add pinCryptoService and add to userVerificationService dependencies

* PM-4596 - UserVerificationService - per PR feedback simplify returns of verifyUserByPIN(...) and verifyUserByBiometrics(...)

* PM-4596 - Messages.json on desktop & browser - per PR feedback, adjust tooManyInvalidPinEntryAttemptsLoggingOut translation text to remove "you"

* PM-4596 - VerificationType enum - fix line copy mistake and give BIOMETRICS own, unique value.

* PM-4596 - VerificationType - rename BIOMETRICS to Biometrics to match existing MasterPassword value case.

* PM-4596  - Update verification type to consider whether or not a secret exists as we have added a new verification which doesn't have a type. Add new server and client side verification types.  Update all relevant code to pass compilation checks.

* PM-4596 - More verification type tweaking

* PM-4596 - Verification - verificationHasSecret - tweak logic to be more dynamic and flexible for future verification types

* PM-4596 - UpdateTempPasswordComp - use new MasterPasswordVerification

* PM-4596 - Desktop - DeleteAcctComp - use VerificationWithSecret to solve compile error w/ accessing secret

* PM-4596 - Per discussions with Andreas & Will, move new Pin Crypto services into libs/auth + added @bitwarden/auth path to CLI tsconfig + added new, required index.ts files for exporting service abstractions & implementations

* PM-4596 - Fixed missed import fixes for lock components across clients for pin crypto service after moving into @bitwarden/auth

* PM-4596 - More PinCryptoService import fixes to get browser & desktop building

* PM-4596 - Update desktop lock comp tests to pass by providing new pin crypto service.

* PM-4596 - User verification service -update todo

* PM-4596 - PinCryptoService - per PR feedback, fix auto import wrong paths.

* PM-4596 - PinCryptoService tests - fix imports per PR feedback

* PM-4596 - UserVerificationSvc - rename method to validateSecretInput per PR feedback

* Fix imports

* PM-4596 - PinCryptoService - Refactor naming for clarity and move test cases into describes per PR feedback

* reorg libs/auth; expose only libs/auth/core to cli app

* PM-4596 - UserVerification - Resolve import issue with importing from libs/auth. Can't use @bitwarden/auth for whatever reason.

* PM-4596 - Fix desktop build by fixing import

* PM-4596 - Provide PinCryptoService to UserVerificationService

* PM-4596 - PinCryptoServiceFactory - you cannot import services from @bitwarden/auth in the background b/c it brings along the libs/auth/components and introduces angular into the background context which doesn't have access to angular which causes random test failures. So, we must separate out the core services just like the CLI to only bring along the angular agnostic services from core.

* PM-4596 - Refactor libs/auth to have angular / common + update all imports per discussion with Matt & Will. Introduced circular dep between PinCryptoService + VaultTimeoutSettingsService + UserVerificationService

* PM-4596 - VaultTimeoutSettingsService - Refactor UserVerificationService out of the service and update all service instantiations and tests. The use of the UserVerificationService.hasMasterPassword method no longer needs to be used for backwards compatibility. This resolves the circular dependency between the PinCryptoService, the UserVerificationService, and the VaultTimeoutSettingsService. We will likely refactor the hasMasterPassword method out of the UserVerificationService in the future.

* PM-4596 - Update CL tsconfig.libs.json to add new auth/common and auth/angular paths for jslib-services.module imports of pin crypto service to work and for test code coverage to run successfully.

* PM-4596 - Address PR feedback

* PM-4596 - Update root tsconfig (only used by storybook) to add new libs/auth paths to fix chromatic build pipeline.

* PM-4596 - Actually update tsconfig with proper routes to fix storybook

* PM-4596 - UserVerificationService - verifyUserByBiometrics - add error handling logic to convert failed or cancelled biometrics verification to a usable boolean

* PM-4596 - Add missing await

* PM-4596 - (1) Add log service and log to user verification service biometric flow to ensure errors are at least revealed to the console (2) Fix factory missing PinCryptoServiceInitOptions

* PM-4596 - Use the correct log service abstraction

* PM-4596 - Remove unused types per PR review

---------

Co-authored-by: William Martin <contact@willmartian.com>
2024-01-16 14:52:06 -05:00
github-actions[bot]
ef4e3b1fbf
Autosync the updated translations (#7533)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-12 06:45:39 +01:00
renovate[bot]
cdeaa0b56a
[deps] Tools: Update electron to v28.1.3 (#7524)
* [deps] Tools: Update electron to v28.1.3

* Bump electron version in electron-builder.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-01-11 19:30:09 +00:00
aj-rosado
99022e2baa
Added dashed line as separator and label for common formats on format selector for import (#7432) 2024-01-11 16:24:40 +00:00
Todd Martin
7bd8b00fbf
[PM-2260] Remove TDE feature flag and all conditional logic based on it (#7352) 2024-01-10 12:33:11 -05:00
Bitwarden DevOps
92d2cbad23
Bumped desktop version to 2024.1.1 (#7509) 2024-01-10 17:27:24 +00:00
Matt Gibson
46a3834f46
Add state for everHadUserKey (#7208)
* Migrate ever had user key

* Add DI for state providers

* Add state for everHadUserKey

* Use ever had user key migrator

Co-authored-by: SmithThe4th <gsmithwalter@gmail.com>
Co-authored-by: Carlos Gonçalves <LRNcardozoWDF@users.noreply.github.com>
Co-authored-by: Jason Ng <Jcory.ng@gmail.com>

* Fix test from merge

* Prefer stored observables to getters

getters create a new observable every time they're called, whereas one set in the constructor is created only once.

* Fix another merge issue

* Fix cli background build

---------

Co-authored-by: SmithThe4th <gsmithwalter@gmail.com>
Co-authored-by: Carlos Gonçalves <LRNcardozoWDF@users.noreply.github.com>
Co-authored-by: Jason Ng <Jcory.ng@gmail.com>
2024-01-10 11:51:45 -05:00
renovate[bot]
fc4120091a
[deps] Tools: Update electron to v28.1.2 (#7490)
* [deps] Tools: Update electron to v28.1.2

* Bump version in electron-builder.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-01-10 13:22:12 +00:00
Vladan Simić
cc9a347482
[PM-5632] Update Bitwarden extension review URLs (#7470)
* Update Bitwarden extension review URLs

* Update Chrome Web Store URL

* Update browser extension links
2024-01-08 21:08:18 +01:00
Todd Martin
d361f02703
Revert "Bumped desktop version to 2024.1.1 (#7476)" (#7477)
This reverts commit 624f3891fe.
2024-01-08 10:47:37 -05:00
Bitwarden DevOps
624f3891fe
Bumped desktop version to 2024.1.1 (#7476) 2024-01-08 15:28:10 +00:00
renovate[bot]
85febe22e0
[PM-5356][deps] Platform: Update Rust crate windows to v0.52.0 (#7287)
* [deps] Platform: Update Rust crate windows to v0.52.0

* Fix updated CRED_TYPE

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2024-01-08 14:37:32 +01:00
André Bispo
2a338319ea
[PM-2417] Update LoginApprovalComponent on Desktop (#6751)
* [PM-2417] convert modal to dialog service

* code format

* [PM-2417] Fix title

* [PM-2417] Remove unnecessary class

* Updated to use a local reference for the dialog.

* Changes to clarify the method naming

* More cleanup with Will.

* Removed unused style

---------

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2024-01-05 14:46:57 -05:00
renovate[bot]
e5b313d0c4
[PM-5394][deps] Tools: Update electron to v28.1.1 (#7457)
* [deps] Tools: Update electron to v28.1.1

* Bump version in electron-builder.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-01-05 14:08:02 +01:00
github-actions[bot]
6519701bda
Autosync the updated translations (#7454)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-05 11:38:50 +01:00
Jason Ng
312197b8c7
PM-5589 add-edit defect fix (#7450) 2024-01-04 15:34:37 -05:00
Bernd Schoolmann
1b4717a78f
[PM-3343] Capture TOTP QR codes from websites in the browser extension (#5985)
* Implement totp capture for browser extensions
2024-01-03 13:20:17 -05:00
renovate[bot]
3a909b2fa4
[deps] Tools: Update electron to v28 (#7132)
* [deps] Tools: Update electron to v28

* Update electron-builder 27.2.0 to 28.1.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-01-03 13:57:01 +01:00
Jared Snider
1fdc6629e3
Auth/PM-3859 - Desktop - Create lock mechanism to prevent app menu redraw on sync complete when user logging out (#6920)
* PM-3859 - Desktop App Comp - Build lock mechanism for update app menu which doesn't try to update the menu for users who are being logged out which was causing errors (primary scenario was triggered by logging in on desktop with a TDE user w/out a MP, triggering a sync, then hitting the command to lock the vault right after which would trigger a log out while the sync was still in process.  Then, while the log out was in process, the sync would try and trigger an update to the app menu but it would error as some of the user's state had already been cleaned up)

* PM-3859 - App comp - remove use of promise.all to prevent any race conditions from causing intermittent logout errors with state being cleared and then values trying to be set on the cleared state (I observed setMasterKey get called after state account.keys was cleared - received error when attempting to set value on undefined).

* PM-3859 - Desktop Vault Items Component - on log out, if you were on the vault screen, the loss of focus on the vault search text box would trigger a search 200 ms after log out had been triggered.  This would eventually attempt to set an undefined master key (VaultItemsComponent.doSearch() --> cipherService.getAllDecrypted() --> cryptoService.getUserKeyWithLegacySupport() --> cryptoService.getMasterKey() --> cryptoService.setMasterKey()).  However, at this point, the account had been cleared as part of the log out process and an error would be thrown in the state service for trying to set account.keys.masterKey to undefined when the account and account.keys were undefined. These changes prevent the search from firing until the value changes and also prevents setMasterKey from being called if it is undefined.
2024-01-02 22:22:17 +00:00
Bitwarden DevOps
4784ab12e5
Bumped browser,cli,desktop,web version to 2024.1.0 (#7428) 2024-01-02 22:07:38 +00:00
github-actions[bot]
d3807b09d3
Autosync the updated translations (#7413)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-02 11:07:45 +00:00
github-actions[bot]
a08f4d8125
Autosync the updated translations (#7411)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-01-02 10:50:21 +00:00
Daniel James Smith
4f310b6b69
Update all instances of copyright with 2023 to 2024 (#7396)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-29 15:28:14 +00:00
github-actions[bot]
35ae3bbb07
Autosync the updated translations (#7377)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-28 13:08:10 +00:00
rr-bw
00bb814fbe
[PM-2414] Angular 16 Upgrade - SetPinComponent (#7214)
* migrate to DialogService

* use static method

* add reactive form dependencies

* begin migrating to reactive forms

* migrate template inputs to use CL

* update set-pin.component.ts file to work with reactive forms

* migrate desktop template and class file to Dialog and ReactiveForms

* update settings page

* remove old properties

* update settings form upon dialog close

* refactor ngOnInit()

* remove duplicate validator (already have a validator in class file)
2023-12-27 10:48:06 -08:00
renovate[bot]
deba1a9d18
[deps] Tools: Update electron to v27.2.0 (#7339)
* [deps] Tools: Update electron to v27.2.0

* Bump electronVersion to 27.2.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-12-22 22:30:25 +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
Bitwarden DevOps
062a3ce2d2
Bumped desktop version to 2023.12.2 (#7314) 2023-12-21 16:14:59 +00: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
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
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
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
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
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
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
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
✨ 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
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
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
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]
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
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