1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-05 12:04:54 +02:00
Commit Graph

14073 Commits

Author SHA1 Message Date
Addison Beck
b3135403e8
Wire up key definitions for OrganizationService (#7781)
* Wire up key definitions for OrganizationService

[`AC-2009`: Transition OrganizationService to use StateProvider](
https://bitwarden.atlassian.net/browse/AC-2009)

In order to support the new `StateProvider` APIs for managing
application state this commit modifies `OrganizationService` in the following
ways:

1. Adding a `KeyDefinition` object to `OrganizationService` to store the
   `organization` record in `StateProvider`.
1. Injecting `StateProvider` and wiring up `OrganizationService` to read
   from the `organizations` key definition for the active user account.
1. Expanding the capabilities of `OrganizationData` to be able to read
   itself from a JSON string. Previously this was handled directly by
   `StateService`.
1. Updating tests to include requirements for testing against
   `StateProvider`.
1. Marking the existing `StateService`-backed `organizations`
   `Observable` and `BehaviorSubject` as deprecated.

This is largely unimplemented code with no intended visible effects to
the system. Implementing getting & updating the `organizations` value
from `StateProvider` will the next step in this work.

* Rework null check on OrganizationData

* Remove deprecation signals for the time being

* Move key definition inline with its service

* Create date objects when deserialzing json from state
2024-02-06 18:48:34 -06:00
Cesar Gonzalez
fb17cb7b99
[PM-5739] Remove Usage of Angular within Background Script (#7659) 2024-02-06 22:24:14 +00:00
Vincent Salucci
c285a07e16
fix: show grant collection access helper text, refs AC-2147 (#7830) 2024-02-06 15:40:37 -06:00
SmithThe4th
e9865c1cec
[PM-5275] Migrate state in Fido2ClientService to State Providers (#7745)
* added state definition and key definition

* created vault settings service

* created enable passkeys migrations

* created enable passkeys migrations

* renamed the state definition

* created vault settings service

* updated enable passkey key definition

* updated references with vault settings service

* renamed files to avoid conflict

* removed set and get enable passkeys from state service

* removed comment

* fixed comments

* added readonly keyword

* removed service registartion from service module

* removed readonly keyword from abstract class

* swicted to used optional chaining

* renamed files

* added disk-local argument for web
2024-02-06 15:15:22 -05:00
Shane Melton
78008a9e1e
[PM-5277] Migrate Sync Service to State Provider (#7680)
* [PM-5277] Introduce lastSync state via State Providers

* [PM-5277] Add migrator and tests

* [PM-5277] Use memory for web storage location

* [PM-5277] Remove lastSync methods from state service

* [PM-5277] Remove lastSync from AccountProfile

* [PM-5277] Use string instead of Date to fix serialization for chrome.storage API in Browser

* [PM-5277] Only set account if lastSync was deleted during migration

* [PM-5277] Fix spec file
2024-02-06 12:00:41 -08:00
SmithThe4th
7e00ece092
[PM-5276] Migrate FolderService to state providers (#7682)
* added state definitionand key definition for folder service

* added data migrations

* created folder to house key definitions

* deleted browser-folder-service and added state provider to the browser

* exposed decrypt function so it can be used by the key definition, updated folder service to use state provider

* removed memory since derived state is now used

* updated test cases

* updated test cases

* updated migrations after merge conflict fix

* added state provider to the folder service constructor

* renamed migration file

* updated comments

* updated comments

* removed service registartion from browser service module and removed unused set and get encrypted folders from state service

* renamed files

* added storage location overides and removed extra methods
2024-02-06 14:51:02 -05:00
Justin Baur
f64092cc90
[PM-6032] Run migrations in main process (#7795)
* Run Migrations in Desktop Main Process

* Add `waitForMigrations` method

* Add `InitOptions`

* Fix Destructuring
2024-02-06 12:01:12 -05:00
Matt Gibson
166269520c
Allow common get and set operations from state providers (#7824)
* Allow common get and set operations from state providers

* Use finnish endings for observables
2024-02-06 11:35:22 -05:00
Oscar Hinton
cc88826be4
Update renovate config (#7811) 2024-02-06 10:35:20 +01:00
Daniel James Smith
c97e5b3d1f
Assign team-component-library instead team-platform-dev (#7819)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-02-05 16:41:19 -05:00
Todd Martin
78bd44b276
Modified to use the correct header. (#7817) 2024-02-05 15:03:03 -05:00
renovate[bot]
3887aa7dbd
[deps] Platform: Update @types/node to v18.19.14 (#7818)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 20:58:07 +01:00
renovate[bot]
0b5cdace72
[deps] SM: Update @types/jest to v29.5.12 (#7810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 13:54:35 -06:00
Jake Fink
816bcf4f39
[PM-5255] Create login strategy service (#7750)
* refactor login strategies into own service

* create login service factory

* replaces instances of authService with loginStrategyService

* replace more instances of authService

* move logout back to auth service

* add browser dependencies

* fix desktop dependencies

* fix cli dependencies

* fix lint and test files

* fix anonymous hub deps

* fix webauthn-login service deps

* add loginstrategyservice to bg

* move login strategy service and models to auth folder

* revert changes to tsconfig

* use alias for imports

* fix path

---------

Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
2024-02-05 14:26:41 -05:00
renovate[bot]
568f3ecb2a
[deps] Platform: Update @types/node-forge to v1.3.11 (#7813)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 20:03:49 +01:00
renovate[bot]
e580862685
[deps] Tools: Update dotnet monorepo to v8 (#7812)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 19:43:11 +01:00
Jared Snider
c91ceb2014
Auth/PM-5368 & PM-4613 - Web & Browser - Add support for new 2FA Duo Frameless Redirect flow (#7670)
* [PM-5368] Open Duo auth url. Add BroadcastChannel listener for duo result.

* [PM-5368] Remove debug line. Use PlatformUtilService to launch Uri.

* PM-5368 - Some progress on getting new frameless duo implementation in place

* PM-5368 - Base2FAComp - Save off duoFramelessUrl for use later on as user must be given the option to remember the device before launching the duo frameless flow in the new tab.

* PM-5368 - Web - 2FA Comp - (1) Only show larger width when showing backwards compatible duo (2) Stack buttons per new design (3) selectedProviderType === providerType.OrganizationDuo is correct check for when org requires DUO

* PM-5368 - Web - 2FA Comp - translate duo stuff

* PM-4613 - Browser 2FA - Get most of DUO frameless in place. WIP. Must figure out how to transfer state from popup to popout + add popout logic to auth-popout-windows.ts. Converted existing useAnotherTwoStepMethod button to use new comp lib bitButton per design.

* PM-4613 - Browser 2FA Comp - (1) HTML - add margin around duo frameless text to match figma (2) Get popout extension logic working properly - now closes existing popup

* PM-4613 - TODO figure out communication between web and browser as broadcast channel will not work.

* PM-5368 - Base comp + web changes - (1)  Base component now has a setupDuoResultListener method for child classes to override (2) Web overrides setupDuoResultListener and cleans up broadcast channel once a duo result comes through.

* PM-4613 - Browser - (1) Add window message handling to content-message-handler content script to pass along the duo result message to the browser extension (2) 2FA comp - override setupDuoResultListener and use browserMessagingApi to listen to duoResult and submit when it comes through.

* PM-5368 - Web - 2FA comp - only clean up duo result channel on ngDestroy so that user can re-submit if an error occurs.

* PM-5368 and PM-4613 - (1) Update base 2FA comp to only initialize duo result listener once as init is called any time the user changes 2FA option if multiple are present (duo org and duo personal) (2) Each client now will only create a listener once even if it is called more than once (3) On web, only try to clean up the duoResultChannel if it was created to avoid erroring on other 2FA methods.

* PM-5368 - Base 2FA comp - add TODO to remove duo SDK handling once we remove the duo-redirect flag

* PM-5368 - Per PR feedback, avoid repetition of duo provider check by using a new public property for isDuoProvider

* PM-4613 -  Per PR feedback: (1) Deconstruct code out of data (2) Add test for duoResult.

---------

Co-authored-by: André Bispo <abispo@bitwarden.com>
2024-02-05 13:23:50 -05:00
Matt Gibson
414ee2563f
[PM-5537] Biometric State Service (#7761)
* Create state for biometric client key halves

* Move enc string util to central utils

* Provide biometric state through service

* Use biometric state to track client key half

* Create migration for client key half

* Ensure client key half is removed on logout

* Remove account data for client key half

* Remove unnecessary key definition likes

* Remove moved state from account

* Fix null-conditional operator failure

* Simplify migration

* Remove lame test

* Fix test type

* Add migrator

* Prefer userKey when legacy not needed

* Fix tests
2024-02-05 13:02:28 -05:00
renovate[bot]
99f18c9666
[deps] SM: Update husky to v9.0.10 (#7687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 11:11:31 -06:00
Todd Martin
250e7c87e8
[PM-6012] Added device identifier header when updating trust on key rotation (#7807) 2024-02-05 11:35:33 -05:00
Cesar Gonzalez
25711afaf6
[PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3 (#7800)
* [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3

* [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3

* [PM-5976] Removing usage of pinging system and keeping reworked top-level registration of window message listener events

* [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts

* [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts

* [PM-5976] Removing the useCapture value within the window message event listener
2024-02-05 15:23:17 +00:00
MtnBurrit0
e847244817
[DEVOPS-1719] Update Desktop certificates and provisioning profiles (#7777)
* Update provision SHA1

* Update certificates and profiles

* fix linting

* testing upload to test flight

* Add missing key

* Revert "testing upload to test flight"

This reverts commit aa461fa481.
2024-02-05 08:22:07 -07:00
renovate[bot]
a1805ae0eb
[deps] Autofill: Update tldts to v6.1.8 (#7806)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 10:08:24 -05:00
Vince Grassia
219ef8d524
DEVOPS-1696 - Fix Version Bump workflow (#7774) 2024-02-05 08:49:36 -05:00
renovate[bot]
a7ef07a9ec
[PM-6070] [deps] Tools: Update electron to v28.2.1 (#7803)
* [deps] Tools: Update electron to v28.2.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-02-05 13:22:18 +01:00
Mark Youssef
1d49e970ba
Update year in CNET review to 2024 (#7775) 2024-02-03 23:17:41 +00:00
Todd Martin
aa67190f3c
[PM-5991] Updated ordering on account switch to route before clearing state (#7797) 2024-02-02 20:43:47 -05:00
Jared Snider
d047723f04
Auth & Autofill / PM-5976 - Safari Browser SSO Initialization Race Condition Attempted Fix 2 (#7794)
* Implementing pinging system for SSO to address issue on Safari with race condition

* Implementing pinging system for SSO to address issue on Safari with race condition

* [PM-5976] Updating references within sso.ts

---------

Co-authored-by: Cesar Gonzalez <cgonzalez@bitwarden.com>
2024-02-02 21:23:15 +00:00
Will Martin
cb8849c355
Add eslint rule no-floating-promises (#7789)
* add eslint rule no-floating-promises

* add eslint-disable comment to offending lines
2024-02-02 15:13:37 -05:00
Jared Snider
6e96964c1a
Auth/PM-5976 - Safari Browser SSO Initialization Race Condition Attempted Fix (#7793)
* PM-5976 - Only try to initiate browser SSO when document is ready to avoid race condition between browser content script message listener being registered and the browser sso initiating message being sent.

* PM-5976 - adjust initiateBrowserSsoIfDocumentReady per PR feedback
2024-02-02 18:53:11 +00:00
github-actions[bot]
f3beb71d6d
Autosync the updated translations (#7779)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-02 16:11:46 +00:00
github-actions[bot]
def88ec076
Autosync the updated translations (#7778)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-02 16:11:32 +00:00
github-actions[bot]
3a993a68aa
Autosync the updated translations (#7780)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-02-02 16:11:13 +00:00
Oscar Hinton
3857dd69c4
Fix authService.logOut not being called (#7790) 2024-02-02 10:53:31 -05:00
✨ Audrey ✨
e8d0d56c5f
[PM-5608] introduce passphrase generator strategy (#7690) 2024-02-02 10:49:38 -05:00
Will Martin
4e4e39e9f7
[CL-178] contain overflow in bit-layout main content (#7783) 2024-02-02 10:36:12 -05:00
Justin Baur
5e710b45b0
Add Missing await (#7788) 2024-02-02 09:06:03 -05:00
Shane Melton
38d1b26784
Include DEV_FLAGS in Web webpack environment plugin (#7772) 2024-02-02 08:56:09 -05:00
Addison Beck
d39fa8ee86
Add state definitions for Admin Console services (#7776) 2024-02-01 16:06:25 -06:00
Will Martin
d0212bd1b0
[CL-173] hide nav-group active styles when expanded (#7695)
* hide nav-group active styles when open

* update org-switcher to show child nav-item active styles
2024-02-01 16:23:05 -05:00
Will Martin
b054211fe6
[CL-175] remove position fixed from sidebar (#7760)
Removes fixed position from `bit-layout`'s sidebar. This prevents the sidebar from taking up too much space on smaller viewports.
2024-02-01 15:36:58 -05:00
Shane Melton
5182918faa
[AC-2115] Hide delete collection button in collection dialog (#7757)
* [AC-2115] Hide delete collection button based on collection management setting

* [AC-2115] Copy manage flag from sync'd collection
2024-02-01 09:07:14 -08:00
Cesar Gonzalez
6924d031ee
[PM-5877] Update the extension's webpack compilation process to include browserify-path in manifest v3 (#7751) 2024-02-01 14:51:14 +00:00
Jake Fink
7d3c6dbed7
[PM-5995] Clear everhaduserkey on logout (#7759)
* clear everhaduserkey on logout

* change to null
2024-02-01 09:36:29 -05:00
renovate[bot]
83812d471c
[deps] Vault: Update commander to v11 (#7329)
* [deps] Vault: Update commander to v11

* [deps] Vault: Update commander to v11

* [deps] Vault: Update commander to v11

* [deps] Vault: Update commander to v11

* removed unused interfaces

* fix shell completions (#7756)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
Co-authored-by: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2024-01-31 17:17:04 -05:00
Colton Hurst
01781848f3
SM-904: Remove SecretsManagerBeta (Phase 2) (#6891)
* SM-904: Remove SecretsManagerBeta

* SM-904: Remove additional places sm beta is used

* SM-904: Remove unused SM Beta messages
2024-01-31 17:09:35 -05:00
Shane Melton
3cf17d1073
[PM-5936] Add additional null organization checks (#7707) 2024-01-31 11:27:50 -08:00
rr-bw
2511ae959a
[PM-5384] Add Countdown Timer to Duo Redirect (#7694)
* add countdown timer if a number is provided in duoHandOffMessage

* add documentation

* refactor to use object for handOffMessage
2024-01-30 12:37:02 -08:00
Dave Nicolson
b5f6508c0e
Fix badge links (#7713) 2024-01-30 20:24:07 +00:00
renovate[bot]
74da8251db
[deps] Tools: Update @electron/notarize to v2.2.1 (#7698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-30 21:13:40 +01:00