Commit Graph

2394 Commits

Author SHA1 Message Date
Jared Snider d088ec68bc
Merge branch 'auth/pm-7392/token-service-add-secure-storage-fallback' of https://github.com/bitwarden/clients into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-09 13:31:48 -04:00
Jared Snider 1e6f187960
PM-7392 - Previously, if a security stamp was invalid, the session was marked as expired. Restore that functionality. 2024-05-09 13:31:29 -04:00
Todd Martin a89e148804
[PM-7029] Remove key-rotation-feature-flag (#8816)
* Removed key rotation feature flag.

* Fixed tests

* Removed unused dependency.

* Remove KeyRotationImprovements from default const
2024-05-09 13:24:11 -04:00
Jared Snider 5791be9143
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-09 13:11:00 -04:00
Jared Snider c700e05fd5
PM-7392 - Remove logout reason from CLI as each logout call handles messaging on its own. 2024-05-09 12:07:05 -04:00
KiruthigaManivannan ff3b6f52ee
PM-5017 Migrate Organization Plans component (#8448)
* PM-5017 Migrated Organization plans component

* PM-5017 Addressed all the review comments

* PM-5017 Missed a minor change

---------

Co-authored-by: vinith-kovan <156108204+vinith-kovan@users.noreply.github.com>
2024-05-09 21:11:17 +05:30
vinith-kovan 0c2e8c15dc
[PM 5012] migrate adjust subscription component (#8239)
* adjust subscription component migration

* adjust subscription component migration

* adjust subscription component migration
2024-05-09 21:01:00 +05:30
vinith-kovan 30ef66139e
[PM 5007] migrate premium component (#8387)
* premium component migration

* premium component migration

* premium component migration

* premium component migration
2024-05-09 20:46:43 +05:30
KiruthigaManivannan 1180c60e91
Pm 7843 two factor verification is empty on organization duo 2 fa (#9086)
* PM-7843 Two Factor Verification is Empty on Organization duo 2fa

* PM-7843 Addressed review comments

* PM-7843 Bug fixed
2024-05-09 11:12:45 -04:00
Jake Fink c69cc37716
[PM-7747] add timeout to safari sendMessageWithResponse (#9082)
* add timeout to safari sendMessageWithResponse

* change to query views instead of sending message
2024-05-09 10:54:05 -04:00
Daniel James Smith da144410e8
Remove settings from options.component which had been moved to notifications.component (#9093)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-09 06:30:43 -04:00
Daniel James Smith 2227fd1190
Rename about.component to about-dialog.component (#9094)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-09 06:29:51 -04:00
Jared Snider 0788c354fb
PM-7392 - Fix browser build 2024-05-08 20:25:26 -04:00
Jared Snider 628190bde0
PM-7392 - Desktop App comp - Don't open n simple dialogs. 2024-05-08 20:12:22 -04:00
Jared Snider e75d6022e3
PM-7392 - Desktop App comp - don't show cancel btn on simple dialogs. 2024-05-08 19:54:11 -04:00
Jared Snider 24e31feed5
PM-7392 - Web app comp - fix issue 2024-05-08 19:48:17 -04:00
Jared Snider f731e9ba95
PM-7392 - Desktop App comp - replace toast usage with simple dialog to guarantee users will see the reason for them being logged out. 2024-05-08 19:42:09 -04:00
Jared Snider bcf9099229
PM-7392 - TokenSvc - Replace messageSender with logout callback per PR feedback. 2024-05-08 19:40:38 -04:00
Jared Snider 5d85de822b
PM-7392 - Build new handlers for displaying the logout reason for desktop & web. 2024-05-08 17:30:33 -04:00
Jared Snider 6f5439b959
PM-7392 - More expired to logoutReason replacements 2024-05-08 17:29:50 -04:00
Jared Snider 7aae92e78e
PM-7392 - More replacements of expired with logoutReason 2024-05-08 17:25:57 -04:00
Alex Morask 59c9606df3
Prevent calls to Billing Status endpoint when FF is off (#9032) 2024-05-08 15:38:56 -04:00
Daniel James Smith 37d409578a
[PM-7740] Create notifications settings component (navigational changes) (#8919)
* Move about.component into tools ownership

* Split out account security settings

Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json

* Move vault-timeout-input.component to auth

* Move await-desktop-dialog.component to auth

* Add transition for account-security

* Create notifications settings component

* Move excluded-domains component over to be owned by team-autofill

* Add notifications entry to settings screen

* Move excluded domains from settings to notifications settings screen

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-08 15:04:41 -04:00
Jake Fink b4257e1c1c
set user key once we detect session key (#9084) 2024-05-08 14:48:49 -04:00
rr-bw a42de41587
[PM-5363] PinService State Providers (#8244)
* move pinKeyEncryptedUserKey

* move pinKeyEncryptedUserKeyEphemeral

* remove comments, move docs

* cleanup

* use UserKeyDefinition

* refactor methods

* add migration

* fix browser dependency

* add tests for migration

* rename to pinService

* move state to PinService

* add PinService dep to CryptoService

* move protectedPin to state provider

* update service deps

* renaming

* move decryptUserKeyWithPin to pinService

* update service injection

* move more methods our of crypto service

* remove CryptoService dep from PinService and update service injection

* remove cryptoService reference

* add method to FakeMasterPasswordService

* fix circular dependency

* fix desktop service injection

* update browser dependencies

* add protectedPin to migrations

* move storePinKey to pinService

* update and clarify documentation

* more jsdoc updates

* update import paths

* refactor isPinLockSet method

* update state definitions

* initialize service before injecting into other services

* initialize service before injecting into other services (bw.ts)

* update clearOn and do additional cleanup

* clarify docs and naming

* assign abstract & private methods, add clarity to decryptAndMigrateOldPinKeyEncryptedMasterKey() method

* derived state (attempt)

* fix typos

* use accountService to get active user email

* use constant userId

* add derived state

* add get and clear for oldPinKeyEncryptedMasterKey

* require userId

* move pinProtected

* add clear methods

* remove pinProtected from account.ts and replace methods

* add methods to create and store pinKeyEncryptedUserKey

* add pinProtected/oldPinKeyEncrypterMasterKey to migration

* update migration tests

* update migration rollback tests

* update to systemService and decryptAndMigrate... method

* remove old test

* increase length of state definition name to meet test requirements

* rename 'TRANSIENT' to 'EPHEMERAL' for consistency

* fix tests for login strategies, vault-export, and fake MP service

* more updates to login-strategy tests

* write new tests for core pinKeyEncrypterUserKey methods and isPinSet

* write new tests for pinProtected and oldPinKeyEncryptedMasterKey methods

* minor test reformatting

* update test for decryptUserKeyWithPin()

* fix bug with oldPinKeyEncryptedMasterKey

* fix tests for vault-timeout-settings.service

* fix bitwarden-password-protected-importer test

* fix login strategy tests and auth-request.service test

* update pinService tests

* fix crypto service tests

* add jsdoc

* fix test file import

* update jsdocs for decryptAndMigrateOldPinKeyEncryptedMasterKey()

* update error messages and jsdocs

* add null checks, move userId retrievals

* update migration tests

* update stateService calls to require userId

* update test for decryptUserKeyWithPin()

* update oldPinKeyEncryptedMasterKey migration tests

* more test updates

* fix factory import

* update tests for isPinSet() and createProtectedPin()

* add test for makePinKey()

* add test for createPinKeyEncryptedUserKey()

* add tests for getPinLockType()

* consolidate userId verification tests

* add tests for storePinKeyEncryptedUserKey()

* fix service dep

* get email based on userId

* use MasterPasswordService instead of internal

* rename protectedPin to userKeyEncryptedPin

* rename to pinKeyEncryptedUserKeyPersistent

* update method params

* fix CryptoService tests

* jsdoc update

* use EncString for userKeyEncryptedPin

* remove comment

* use cryptoFunctionService.compareFast()

* update tests

* cleanup, remove comments

* resolve merge conflict

* fix DI of MasterPasswordService

* more DI fixes
2024-05-08 11:34:47 -07:00
Daniel James Smith c2812fc21d
[PM-7176] Create appearance settings component (navigational changes) (#8911)
* Move about.component into tools ownership

* Split out account security settings

Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json

* Move vault-timeout-input.component to auth

* Move await-desktop-dialog.component to auth

* Add transition for account-security

* Create appearance settings component

* Add entry in settings to navigate to the appearance settings page

* Add transition animation for settings to appearance and back

* Remove settings from options that are now under appearance

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-08 19:25:24 +02:00
Timshel 350ad890de
Check MasterPassword in web app during change (#8293) 2024-05-08 09:24:18 -07:00
Matt Gibson 7d5575882e
Allow selecting of version numbers for copy-pasting in issues (#9078)
* Allow selecting of version numbers for copy-pasting in issues

* Simplify user-select override

Expands selectable area to labels of versions
2024-05-08 11:34:07 -04:00
Jason Ng 6c05aacbba
[PM-6822] Create new Vault V2 component for extension refresh (#9065)
* created v2 component. added it to app routing
2024-05-08 10:18:19 -04:00
Jared Snider 706935098b
PM-7392 - WIP - Enhancing logout callback to consider the logout reason + move show toast logic into logout callback 2024-05-07 20:37:39 -04:00
Jared Snider d0782554f2
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-07 19:44:16 -04:00
Jared Snider 00cac8eb38
PM-7392 - Desktop AppComp - cleanup messaging 2024-05-07 18:25:39 -04:00
Daniel James Smith 5682e38384
[PM-7175] Create vault settings component (navigational changes) (#8840)
* Move about.component into tools ownership

* Split out account security settings

Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json

* Move vault-timeout-input.component to auth

* Move await-desktop-dialog.component to auth

* Move folder.component to vault/popup/settings

* Move sync.component to vault/popup/settings

* Create vault settings component

Move controls from settings.component.html to vault-settings.component.html
Register VaultSettingsComponent within app.module
Register route for VaultSettingsComponent
Add new string in en/messages.json

* Fix routing for back navigation on child pages of vault settings

* Add transitions to vault-settings sub-pages

* Add transition for account-security

* Add an await to popping out the extension

* Use "Vault" instead of "Vault settings" as title

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-07 17:58:31 -04:00
Matt Gibson ea7d1ff6ed
Handle error object for biometric lock (#9070) 2024-05-07 14:43:42 -07:00
Daniel James Smith 7bb37877ee
Fix test after session-removal with https://github.com/bitwarden/clients/pull/9024 (#9076)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-07 17:04:17 -04:00
Daniel James Smith 29bd03e64e
[PM-7172] Create account security settings component (navigational changes) (#8817)
* Move about.component into tools ownership

* Split out account security settings

Move settings.component.ts to auth/popup/settings and rename to account-security.component.ts
Move controls from settings.component.html and create account-security.component.html
Move settings.component.html to tools/popup/settings.component.html
Create settings.component.ts under tools/popup/settings
Fixup module imports and routing
Add new strings to en/message.json

* Move vault-timeout-input.component to auth

* Move await-desktop-dialog.component to auth

* Add transition for account-security

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-07 16:23:03 -04:00
Jared Snider ed6f2e45d3
PM-7392 - ApiService - Stop using messaging to trigger toast to let user know about refresh access token errors; replace with client specific callback logic.
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-05-07 15:59:04 -04:00
Shane Melton 3a71322510
[AC-1707] Restrict provider access to items (#8265)
* [AC-1707] Add feature flag

* [AC-1707] Prevent loading ciphers for provider users in the org vault when the feature flag is enabled

* [AC-1707] Ensure new canEditAllCiphers logic only applies to organizations that have FC enabled

* [AC-1707] Update editAllCiphers helper to check for restrictProviderAccess feature flag

* [AC-1707] Remove un-used vaultFilterComponent reference

* [AC-1707] Hide vault filter for providers

* [AC-1707] Add search to vault header for provider users

* [AC-1707] Hide New Item button for Providers when restrict provider access feature flag is enabled

* [AC-1707] Remove leftover debug statement

* [AC-1707] Update canEditAllCiphers references to consider the restrictProviderAccessFlag

* [AC-1707] Fix collections component changes from main

* [AC-1707] Fix some feature flag issues from merge with main

* [AC-1707] Avoid 'readonly' collection dialog for providers

* [AC-1707] Fix broken Browser component

* [AC-1707] Fix broken Desktop component

* [AC-1707] Add restrict provider flag to add access badge logic
2024-05-07 12:35:28 -07:00
Will Martin 27d4178287
[PS] fix broken local Storybook (#9075)
* add disableRoutesGraph to compdocArgs

* fix popup-layout story routes
2024-05-07 14:48:23 -04:00
Jared Snider 26eb13280f
PM-7392 - Swap logout reason from enum to type. 2024-05-07 14:35:52 -04:00
Jared Snider 28d2a8797c
PM-7392 - Per PR feedback, move error handling toast responsibility to client specific app component logic reached via messaging. 2024-05-07 13:57:51 -04:00
Jared Snider c5b807114f
PM-7392 - Fix copy for errorRefreshingAccessToken 2024-05-07 13:53:53 -04:00
Matt Gibson de0852431a
[PM-7917] Remove session sync (#9024)
* Remove session sync and MemoryStorageService

* Fix merge
2024-05-07 13:25:49 -04:00
Shane Melton c241aba025
[AC-2555] Cipher collections dialog merge fixes (#9036)
* [AC-2555] Fix missing feature flags in CollectionsComponent

* [AC-2555] Do not filter collections when opening the cipher collections dialog in the org vault
2024-05-07 10:00:47 -07:00
Jason Ng be51f1934a
[AC-1121] Collections Add Access filter and badge (#8404)
* added bit toggle group for add access filter to AC collections
2024-05-07 11:02:50 -04:00
Anas c051412d41
fix(8702): refreshing organization report page does not display the refreshed page (#8713) 2024-05-07 13:21:19 +10:00
Jared Snider c2bea80193
PM-7392 - Fix CLI build errors 2024-05-06 21:42:02 -04:00
rr-bw 0fb352d8ed
[PM-7343] AnonLayoutComponent Implementation Groundwork (#8585)
* test implementation

* move files

* adjust import and sample router comments

* add storybook docs to anon-layout

* rename to AnonLayoutWrapperComponent

* update storybook docs

* remove references to CL and replace with 'Auth-owned'

* move AnonLayoutWrapperComponent to libs

* add pageTitle input

* add subTitle input

* translate page title/subtitle, and refactor how icon is added

* update tailwind.config and component styles

* adjust spacing between primary and secondary content

* move switch statement to wrapper

* move icon to router file

* update storybook documentation

* fix storybook text color in normal code blocks

* remove sample route

* move wrapper component back to web

* remove sample route

* update storybook docs
2024-05-06 18:34:40 -07:00
Jared Snider 1acb5d0aa5
PM-7392 - If the access token cannot be refreshed due to a missing refresh token or API keys, then surface an error to the user and log it so it isn't a silent failure + we get a log. 2024-05-06 21:06:01 -04:00
Bitwarden DevOps af6a63c10b
Bumped browser,cli,desktop,web version to (#9064) 2024-05-06 22:37:46 +00:00
cyprain-okeke 2b9c4c6e34
Rename the isProviderManaged variable (#9061) 2024-05-06 21:38:53 +01:00
Jonathan Prusik 6c21223466
[PM-7662] Suppress welcome window on install when extension is in dev mode (#8864)
* suppress welcome window on install when extension is in dev mode

* use platformUtilsService.isDev instead of process.env.ENV

* use devFlags.skipWelcomeOnInstall instead of platformUtilsService.isDev

* update old dev_flags casing in base configs
2024-05-06 15:25:41 -04:00
cyprain-okeke 425c7914b0
[AC-2558] Provider Admin still sees manage billing options - not the provided image (#9048)
* Fix the issue of provider admin not seeing the image

* Resolve the  case and ternary operator comment
2024-05-06 20:21:11 +01:00
Shane Melton ff3021129e
[PM-6827] Browser Extension Refresh - Tabs Routing (#9004)
* [PM-6827] Add componentRouteSwap util function

* [PM-6827] Add extension-refresh feature flag

* [PM-6827] Add extension-refresh route swap utils

* [PM-6827] Add the TabsV2 component

* [PM-6827] Add the TabsV2 to routing module

* [PM-6827] Fix route prefixes in popup-tab-navigation component
2024-05-06 09:14:47 -07:00
Jared Snider ec01624f81
Merge remote-tracking branch 'origin/main' into auth/pm-7392/token-service-add-secure-storage-fallback + app.component merge conflict resolution 2024-05-06 11:19:11 -04:00
Jake Fink 09ff12fc02
[PM-7919] Add more tde logging (#9035)
* adds additional logging to TDE service

* remove base catch swallowing errors

* add dependency to cli

* fix comment
2024-05-06 11:15:33 -04:00
github-actions[bot] b223e62c06
Autosync the updated translations (#9051)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-06 14:54:09 +00:00
github-actions[bot] adcb583fb0
Autosync the updated translations (#9052)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-06 14:52:02 +00:00
github-actions[bot] bca8e0d030
Autosync the updated translations (#9053)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-06 14:51:25 +00:00
cyprain-okeke 4877f08ef7
Change cancel button to close and add period to end (#9047) 2024-05-06 00:41:15 +01:00
KiruthigaManivannan 77d854b5c1
PM-7843 Two Factor Verification is Empty on Organization duo 2fa (#9008)
* PM-7843 Two Factor Verification is Empty on Organization duo 2fa

* PM-7843 Addressed review comments
2024-05-05 14:54:22 -04:00
Justin Baur e4ef7d362e
[PM-7838] [PM-7864] Ensure AuthStatus Changes Before Exiting (#9018)
* Ensure AuthStatus Changes Before Exiting

* Do Not Display Account Without Name Or Email

* Fix Environment Selectors

* Add AccountService.clean to Web
2024-05-03 16:43:42 -04:00
Jared Snider 457e7a4819
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-03 14:56:26 -04:00
Justin Baur b46766affd
[PM-7907] No more optional `privateKey` (#9029)
* Update Emergency Access To Get Their Own Key

* Migrate Organization Keys To Get Their Own Key

* Remove Optional Parameters

* Update Abstraction Parameter Name to Match Implementation

* Add @throws Doc
2024-05-03 14:30:45 -04:00
Matt Gibson a4d5717283
Use account service for account enumeration. (#9023) 2024-05-03 14:24:30 -04:00
Jared Snider 38856083ac
PM-7392 - Actually fix circ dep issues with Justin. Ty!
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-05-03 14:14:04 -04:00
Jared Snider 6456670c2f
PM-7392 - Main.ts - remove comment. 2024-05-03 11:25:10 -04:00
Jared Snider 7416fec332
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-03 11:19:49 -04:00
Jared Snider dbbf100187
PM-7392 - Main.ts - fix circ dep issue. 2024-05-03 11:17:35 -04:00
Anas ed236df24b
fix(8560): refreshing reports pages displays empty pages (#8700) 2024-05-03 14:44:57 +01:00
github-actions[bot] 1f6eec4dd5
Autosync the updated translations (#9028)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-03 07:22:44 +00:00
github-actions[bot] f5012e39ef
Autosync the updated translations (#9026)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-03 07:14:45 +00:00
github-actions[bot] 7b96979c00
Autosync the updated translations (#9027)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-05-03 06:51:44 +00:00
Jared Snider 180e658ea3
PM-7392 - TokenSvc - refresh token disk storage fallback 2024-05-02 17:41:16 -04:00
Jared Snider 0188a51bf9
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-02 17:22:09 -04:00
Thomas Rittson 6db90dc141
Use refCount: true for shareReplay (#9005) 2024-05-02 14:48:57 -05:00
Daniel James Smith e774089d0e
Make premium.component to be owned by team-billing-dev (#8935)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-02 15:04:38 -04:00
Cesar Gonzalez 6b286e9d9e
[PM-7874] Fix lost state when adding a vault item on the current tab view (#9020) 2024-05-02 11:39:48 -05:00
Cesar Gonzalez f51042f813
[PM-7810] Handle Multithread Decryption Through Offscreen API (#8978)
* [PM-7810] Handle Multithread Decryption through Offscreen API

* [PM-7810] Handle Multithread Decryption through Offscreen API

* Use a service to track when to open and close offscreen document

There some strangeness around maintaining the offscreen document for more callbacks, that need not have the same reasons and justifications as the original.

We'd need to test, but perhaps the intent is something closer to maintaining a work queue ourselves and creating the offscreen page for only a single reason as it comes in, then waiting for that page to close before opening another.

* [PM-7810] Handle Multithread Decryption through Offscreen API

* [PM-7810] Handle Multithread Decryption through Offscreen API

* [PM-7810] Handle Multithread Decryption through Offscreen API

* [PM-7810] Handle Multithread Decryption through Offscreen API

* [PM-7810] Implementing jest tests for OffscreenDocument and BrowserMultithreadEncryptServiceImplementation

* [PM-7810] Separating out the process by which we get decrypted items from the web worker to ensure we do not do duplicate effort

* [PM-7810] Separating out the process by which we get decrypted items from the web worker to ensure we do not do duplicate effort

* Prefer builtin promise flattening

* [PM-7810] Introducing a fallback to the MultithreadEncryptServiceImplementation to ensure we can fallback to single thread decryption if necessary

* [PM-7810] Updating documentation

* [PM-7810] Fixing implementation to leverage the new OffscreenDocumentService

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-05-02 16:12:41 +00:00
Jonathan Prusik 26988730b1
[PM-7627] [MV3] Do not run fido2 content scripts on browser settings or extension pages (#8863)
* do no run fido2 content scripts on browser settings or extension background pages

* remove unneeded overlay visibility setting state guard

* only filter content script and page script and update test

* handle content script host permission errors

* add activeTab to mv3 permissions

* allow other browser inject errors to throw
2024-05-02 11:19:00 -04:00
Daniel James Smith 8b28eee3a7
[PM-7701] Clean up services module (#8907)
* Remove usage of getBgService for CipherService

With CipherService using StateProviders: https://github.com/bitwarden/clients/pull/8314 - we should no longer need CipherService

* Remove usage of getBgService for CollectionService

With CollectionService using StateProviders: https://github.com/bitwarden/clients/pull/7732 - we should no longer need CollectionService

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-02 15:46:32 +02:00
Nick Krantz d8bdad9f22
[AC-2140] Swap Admin Console icon (#8973)
* swap admin console icon to `bwi-user-monitor`

* use max-width to force wrapping of product switcher text

* remove duplicate style
2024-05-02 08:45:55 -05:00
Matt Gibson ee2f96d3c4
Use a service to track when to open and close offscreen document (#8977)
* Use a service to track when to open and close offscreen document

There some strangeness around maintaining the offscreen document for more callbacks, that need not have the same reasons and justifications as the original.

We'd need to test, but perhaps the intent is something closer to maintaining a work queue ourselves and creating the offscreen page for only a single reason as it comes in, then waiting for that page to close before opening another.

* Prefer builtin promise flattening

* Await anything and everything

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2024-05-02 09:10:06 +02:00
Thomas Rittson 9dda5e8ee1
[AC-2170] Group modal - limit admin access - collections tab (#8758)
* Update Group modal -> Collections tab to respect collection management settings,
  e.g. only allow admins to assign access to collections they can manage
* Update collectionAdminView getters for custom permissions
2024-05-02 09:54:18 +10:00
Jared Snider 911613ad61
PM-7392 - Access token secure storage to disk fallback WIP but mostly functional besides weird logout behavior. 2024-05-01 19:12:39 -04:00
Justin Baur 4b42ff7171
[PM-3483] Remove `migrateKeyForNeverLockIfNeeded` Logic (#8953)
* Remove `migrateKeyForNeverLockIfNeeded` Logic

* Fix Test

* Remove `migrateAutoKeyIfNeeded`
2024-05-01 15:50:40 -04:00
Matt Gibson b45c309f83
Add beta extension to allowed native messaging hosts (#8996) 2024-05-01 13:43:15 -04:00
Nick Krantz a4b3b83c46
sort organizations by name within product switcher (#8980) 2024-05-01 11:31:03 -05:00
Shane Melton 89df0e4fad
[AC-1623] Introduce Clone option to individual vault for organization items (#8608)
* [AC-1623] Remove cloneableOrganizationCiphers property
and update canClone to reflect new clone permission logic

* [AC-1623] Remove allowOwnershipAssignment override in orgVault as the same restrictions apply to both vaults

* [AC-1623] Ensure ownershipOptions are restricted for non-admins when cloning an org cipher item
2024-05-01 08:40:12 -07:00
Jared Snider 51f38d01e4
Merge branch 'main' into auth/pm-7392/token-service-add-secure-storage-fallback 2024-05-01 11:07:42 -04:00
Jason Ng 8ae71fabaf
[AC-1586] individual reports filter (#8598)
* add filtering to individual reports
2024-05-01 10:39:22 -04:00
Matt Gibson 7e9ab6a15b
[PM-7807][PM-7617] [PM-6185] Firefox private mode out of experimentation (#8921)
* Remove getbgService for crypto service

* Remove special authentication for state service

* Use synced memory storage

popup contexts use foreground, background contexts use background. Simple

* Remove private mode warnings
2024-05-01 07:59:30 -04:00
Matt Gibson b4631b0dd1
Ps/improve-log-service (#8989)
* Match console method signatures in logService abstraction

* Add a few usages of improved signature

* Remove reality check test

* Improve electron logging
2024-04-30 12:58:16 -04:00
Justin Baur 3acbffa072
[PM-6144] Basic auth autofill in Manifest v3 (#8975)
* Add Support for autofilling Basic Auth to MV3

* Remove `any`
2024-04-30 12:35:36 -04:00
cyprain-okeke 04decd1c09
[AC-2265] As a Provider Admin, I shouldn't be able to use my client organizations' billing pages (#8981)
* initial commit

* add the feature flag

* Resolve pr comments
2024-04-30 16:35:39 +01:00
Alex Morask 418d4642da
Hide grace period note when in self-serve trial (#8768) 2024-04-30 10:55:00 -04:00
Will Martin e7416384dc
[CL-220] item components (#8870) 2024-04-30 10:27:47 -04:00
Matt Gibson c70a5aa024
[PM-6688] Use AccountService as account source (#8893)
* Use account service to track accounts and active account

* Remove state service active account Observables.

* Add email verified to account service

* Do not store account info on logged out accounts

* Add account activity tracking to account service

* Use last account activity from account service

* migrate or replicate account service data

* Add `AccountActivityService` that handles storing account last active data

* Move active and next active user to account service

* Remove authenticated accounts from state object

* Fold account activity into account service

* Fix builds

* Fix desktop app switch

* Fix logging out non active user

* Expand helper to handle new authenticated accounts location

* Prefer view observable to tons of async pipes

* Fix `npm run test:types`

* Correct user activity sorting test

* Be more precise about log out messaging

* Fix dev compare errors

All stored values are serializable, the next step wasn't necessary and was erroring on some types that lack `toString`.

* If the account in unlocked on load of lock component, navigate away from lock screen

* Handle no users case for auth service statuses

* Specify account to switch to

* Filter active account out of inactive accounts

* Prefer constructor init

* Improve comparator

* Use helper methods internally

* Fixup component tests

* Clarify name

* Ensure accounts object has only valid userIds

* Capitalize const values

* Prefer descriptive, single-responsibility guards

* Update libs/common/src/state-migrations/migrate.ts

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Fix merge

* Add user Id validation

activity for undefined was being set, which was resulting in requests for the auth status of `"undefined"` (string) userId, due to key enumeration. These changes stop that at both locations, as well as account add for good measure.

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-04-30 09:13:02 -04:00
Jared Snider 20de053770
Auth/PM-7811 - Refactor User Auto Unlock Key Hydration Process To Remove Race Conditions (#8979)
* PM-7811 - Refactor UserKeyInitService to UserAutoUnlockKeyService - remove active account listening logic as it introduced race conditions with user key memory retrieval happening before the user auto unlock key was set into memory.

* PM-7811 - CLI - (1) Fix deps (2) On CLI init (pre command execution), if there is an active account, then set the user key in memory from the user auto unlock key.

* PM-7811 - Browser Extension / desktop - (1) Update deps (2) Sets user key in memory if the auto unlock key is set on account switch and background init (must act on all accounts so that account switcher displays unlock status properly).

* PM-7811 - Web - (1) Update deps (2) Sets user key in memory if the auto unlock key is set on init

* PM-7811 - Fix account switcher service changes not being necessary.
2024-04-29 17:43:14 -04:00
Justin Baur 443da7f62d
Fix Beta Version (#8944)
* Fix Beta Version

* Add Comments

* Fix Function Reference
2024-04-29 13:40:44 -04:00