1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-02 13:23:29 +01:00
Commit Graph

338 Commits

Author SHA1 Message Date
Jared Snider
fa11b60c5b
Feature/PM-1049 - TDEFflow 3 login decryption options - PR feedback changes (#5642)
* PM-1049 - PR Feedback change - Browser - replace incorrect use of routerlink with manual attribute styling to keep anchor styling + tab focus while not having a router action race condition for the log out action to complete.

* PM-1049 - PR Feedback - State Service changes - rename get/setAcctDecryptionOptions to  get/setAccountDecryptionOptions

* PM-1049 - PR Feedback changes - LoginDecryptionOptionsComp - Remove unncessary appA11yTitle directives as title / aria text would be identical to the displayed inner button text.

* DeviceType - Create sets of device types which other components can reference to avoid having to manually define groups of device types.

* PM-1049 - PR Feedback Changes - Update base-login-decryption-options component to leverage async piped observables per best practices. Updated all client templates to leverage new data streams.

* PM-1049 - BaseLoginDecryptionOptionsComp - Add validation service for generic error handling

* PM-1049 - DeviceResponse mistakenly had name as a number instead of a string

* PM-1049 - First draft of creating observable based data store service for Devices so that the base login comp can leverage it instead of calling the devices API service directly (as it will be moved into the SDK in the future).

* PM-1049 - Register new DevicesService on jslib-services module for use in components.

* PM-1049 - Add new hasDevicesOfTypes call to devices data store svc + devices API service.

* PM-1049 - BaseLoginDecryptionOptionsComp - wire up call to devicesService.hasDevicesOfTypes to replace getDevices() to avoid bringing down all trusted device information unnecessarily.

* PM-1049 - LoginDecryptionOptionsComp - Web HTML - clean up loading state so it displays spinner centered properly.

* PM-1049 - LoginDecryptionOptionsComp - Desktop HTML - Don't show login initiated title while page is loading to match other clients behavior.

* PM-1049 - Devices Services - Update naming of hasDevicesOfTypes to match new name on back end + route change to getDevicesExistenseByTypes

* PM-1049 - Device Response & View models - remove keys which are going to be deprecated on the base model

* PM-1049 - DevicesService - devicesBSubject --> devicesSubject rename per PR feedback

* PM-1049 - Devices Services - correct spelling of existence (*facepalm*)

* PM-1049 - Update comment for clarity per PR feedback

* PM-1049 - DevicesSvc - UserSymKey --> UserKey rename

* PM-1049 - BaseLoginDecryptionOptions - replace user email source - get from stateService vs tokenService.

* PM-1049 - BaseLoginDecryptionOptions - Remove uncessary check for userEmail as we will always have it here otherwise everything in the app is broken.

* PM-1049 - BaseLoginDecryptionOptions - Finish cleaning up removal of user email from showReqAdminApprovalBtn$ stream

* PM-1049 - LoginDecryptionOptionsComp - HTML revisions in web & browser to better space out buttons using tailwind or top margin to avoid need for multiple async pipes and shareReplay.

* PM-1049 - DevicesService - of course all observables should have $ suffix. Facepalm.

* PM-1049 - BaseLoginDecryptionOptionsComp - Update verbiage and style of destroy observable used for hooking into ngOnDestroy lifecycle to clean up all observables

* PM-1049 - BaseLoginDecryptionOptions - PR feedback changes - refactor user email to have an underlying bSubject stream to ensure subscription/promise execution separately from the template async pipe subscribing to the stream.

* PM-1049 - DevicesApiService - getDevicesExistenceByTypes - PR feedback - explicitly convert result to boolean instead of casting.

* PM-1049 - BaseLoginDecryptionOptionsComp - Add ShareReplay for getAccountDecryptionOptions + context per PR feedback

* PM-1049 - LoginDecryptionOptionsComp - Completely back away from template async pipe reactive approach as it caused massively increased complexity for little gain. Instead, just focus on reactively pulling asynchronously retrieved data and setting page loading state simply. This just works and is so much less overhead. + Add comments re flows of the component to be done later

* PM-1049- Revert DevicesService implementation from smart data store cache service giant mess into simple, clean data passthrough service to avoid complexity and keep moving forward. YAGNI

Co-authored-by: Andreas Coroiu <andreas@andreascoroiu.com>

* PM-1049 -  DeviceCryptoService - Add decryptUserKey method (WIP)

* PM-1049 - AccountDecryptionOptions - add get helpers for checking for trusted device / key connector decryption option existence.

* PM-1049 - SSO Login Strategy - added comments in setUserKey method for where we will probably be consuming device keys and determining if the device is trusted or not (i.e., if we can get a decrypted user sym key in memory)

* PM-1049 - DeviceCryptoSvc.decryptUserKey - Update method to properly use state service device key retrieval + add TODO to figure out what to do if user has previously had a device key and has cleared their local cache (which will result in the device being untrusted now)

* PM-1049 - SSO Login Strategy - add comment re future passkey login strategy support

* PM-2759 - SSO & 2FA components updated with v0 of navigation logic to send users to LoginDecryptionOptions

* PM-1049 - Account > AccountDecryptionOptions - can't create getter helper methods for determining if user has decryption options b/c of issues w/ account deserialization. Moving past b/c I can just easily check if the given options are not undefined.

* PM-2759 - Add TODOs for deprecation of id token response resetMasterPassword logic and replacement with use of accountDecryptionOptions

---------

Co-authored-by: Andreas Coroiu <andreas@andreascoroiu.com>
2023-06-27 19:58:59 -04:00
Jacob Fink
c942bc08ca
Merge branch 'tde-key-model-migration' into feature/PM-1049-TDE-flow-3-login-decryption-options 2023-06-23 13:54:15 -04:00
Jacob Fink
a4b329b413
Merge branch 'master' into tde-key-model-migration 2023-06-23 13:05:13 -04:00
André Bispo
c31504cab4
[PM-1593] send password as null if it is not in state (#5634) 2023-06-23 17:21:48 +01:00
Jacob Fink
6349410ec2
rename 'user symmetric key' with 'user key' 2023-06-23 10:59:54 -04:00
Jacob Fink
e4bfa62e70
add tests to crypto service 2023-06-23 09:55:19 -04:00
Jacob Fink
91f6943709
use user sym key for account changing unlock verification 2023-06-22 11:29:28 -04:00
Andreas Coroiu
44bfca0da1
Merge branch 'master' into feature/PM-1049-TDE-flow-3-login-decryption-options 2023-06-22 08:24:35 +02:00
Jacob Fink
a1e61feec3
Revert "share disk cache between contexts on browser"
This reverts commit 56a590c491.
2023-06-21 10:39:26 -04:00
Jacob Fink
56a590c491
share disk cache between contexts on browser 2023-06-21 09:31:04 -04:00
André Bispo
4124f7bdc8
[PM-2676] Fix web set environment urls after state init (#5632)
* [PM-2676] Fix web set env urls after state init.

* [PM-2676] Add note to remove workaround
2023-06-20 20:44:46 +01:00
Jared Snider
d7e29a0d22
Merge remote-tracking branch 'origin/master' into feature/PM-1049-TDE-flow-3-login-decryption-options 2023-06-20 15:25:44 -04:00
Jacob Fink
d16f76524c
fix cli crypto service calls 2023-06-20 11:49:54 -04:00
Jacob Fink
690e9ffc4a
cleanup old TODOs, add missing crypto service parameters 2023-06-20 11:22:32 -04:00
Jacob Fink
8f225bf541
use master key for device approvals still 2023-06-20 11:18:12 -04:00
Jacob Fink
a8f1e7858d
fix tests imports 2023-06-20 10:06:02 -04:00
Jacob Fink
ef8db575a9
remove cryptoMasterKeyB64 from account 2023-06-20 10:01:30 -04:00
Jacob Fink
87bf80a461
add new types to tests 2023-06-20 09:15:15 -04:00
Jacob Fink
a24c49adae
fix linter 2023-06-19 16:34:25 -04:00
Jacob Fink
abd2adb0b6
remove state no longer needed and add JSDOC 2023-06-19 14:36:25 -04:00
Jacob Fink
3e5e45f147
check for ephemeral pin before process reload 2023-06-19 09:49:26 -04:00
Jacob Fink
7f0749ca5c
share disk cache to fix syncing issues between contexts 2023-06-19 09:49:26 -04:00
Jacob Fink
b9de7535ca
improve error strings in crypto service 2023-06-19 09:49:25 -04:00
Jacob Fink
61ba9692bc
migrate native messaging for biometrics to use new key model
- support backwards compatibility
- update safari web extension to send user key
- add error handling
2023-06-19 09:49:24 -04:00
Jacob Fink
9c6739f40a
update account model with new keys serialization 2023-06-19 09:49:24 -04:00
Jacob Fink
7110e3cda6
fix EncString serialization issues & various fixes
Co-authored-by: Matt Gibson <MGibson1@users.noreply.github.com>
2023-06-19 09:49:24 -04:00
Jacob Fink
8353d67e1f
add org key type and new method to build a data enc key for orgs 2023-06-19 09:49:23 -04:00
Jacob Fink
2789fdc393
move crypto service jsdoc to abstraction 2023-06-19 09:49:22 -04:00
Jacob Fink
92d714ae29
remove clearEncKey from crypto service 2023-06-19 09:46:43 -04:00
Jacob Fink
42db4eb0ac
remove old EncKey methods from crypto service 2023-06-19 09:46:43 -04:00
Jacob Fink
d79f2e24be
update device-crypto service with new crypto service 2023-06-19 09:46:42 -04:00
Jacob Fink
3b7f57fd20
update change password components with new crypto service 2023-06-19 09:46:42 -04:00
Jacob Fink
2aa303d17e
fix crypto calls for key connector and vault timeout settings 2023-06-19 09:46:41 -04:00
Jacob Fink
9a12cb099a
migrate biometrics key
- migrate only on retrieval
2023-06-19 09:46:41 -04:00
Jacob Fink
56c750d375
finish migrate auto key if needed
- migrate whenever retrieved from storage
- add back the user symmetric key toggle
2023-06-19 09:46:41 -04:00
Jacob Fink
7963d3c996
clean up the old pin keys in more flows
- in the case that the app is updated while logged in and the user changes their pin, this will clear the old pin keys
2023-06-19 09:46:40 -04:00
Jacob Fink
62c43794e9
remove additional keys in state service clean 2023-06-19 09:46:40 -04:00
Jacob Fink
c2893bd0a8
migrate auto key
- add helper to internal crypto service method to migrate
2023-06-19 09:46:40 -04:00
Jacob Fink
9ce3b4976b
set user symmetric key on lock component
- add missed key suffix types to crypto service methods
2023-06-19 09:46:39 -04:00
Jacob Fink
6fc7c406a4
update pin key when the user symmetric key is set
- always set the protected pin so we can recreate pin key from user symmetric key
- stop using EncryptionPair in account
- use EncString for both pin key storage
- update migration from old strategy on lock component
2023-06-19 09:46:39 -04:00
Jacob Fink
7837202180
migrate pin to use user's symmetric key instead of master key
- set up new state
- migrate on lock component
- use new crypto service methods
2023-06-19 09:46:39 -04:00
Jacob Fink
91ac281da0
migrate login strategies to new key model
- decrypt and set user symmetric key if Master Key is available
- rename keys where applicable
- update unit tests
2023-06-19 09:46:06 -04:00
Jacob Fink
82bc7662a1
update collection service to use new crypto service 2023-06-19 09:42:54 -04:00
Jacob Fink
46abba2135
update vault timeout service with new crypto service 2023-06-19 09:42:54 -04:00
Jacob Fink
ffc23bfcdb
update password generation service to use new crypto service 2023-06-19 09:42:54 -04:00
Jacob Fink
7a037724d5
update cipher service to use new crypto service 2023-06-19 09:42:54 -04:00
Jacob Fink
7d8c4a430a
update folder service to use new crypto service methods 2023-06-19 09:42:53 -04:00
Jacob Fink
3452e39b9d
update send service to use new crypto service methods 2023-06-19 09:42:53 -04:00
Jacob Fink
076ab184fd
update sync service to use new crypto service methods 2023-06-19 09:42:53 -04:00
Jacob Fink
f466c91469
update auth service to use new crypto service 2023-06-19 09:42:52 -04:00