1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-25 10:25:36 +02:00
Commit Graph

1035 Commits

Author SHA1 Message Date
Thomas Rittson
e448168002
[AC-2444] Add deep links to unassigned items banner (#8720)
* Add link to Admin Console
* update date on self-hosted banner
2024-04-17 13:00:00 -04:00
Carlos Gonçalves
c045558312
PM-7533 Add missing value assignment (#8780) 2024-04-17 17:09:44 +01:00
Matt Gibson
f15bffb040
Handle null values coming from state (#8784) 2024-04-17 12:02:21 -04:00
aj-rosado
28a89ddb86
[PM-7304] Add missing i18n keys for import errors (#8743)
* Add static error message when import fails

* Adding missing string on CLI for unassigned items

* Added missing string on setImportTarget

* fixed tests
2024-04-17 16:19:06 +01:00
cyprain-okeke
a72b7f3d21
[AC-1218] Add ability to delete Provider Portals (#8685)
* initial commit

* add changes from running prettier

* resolve the linx issue

* resolve the lint issue

* resolving lint error

* correct the redirect issue

* resolve pr commit

* Add a feature flag

* move the new component to adminconsole

* resolve some pr comments

* move the endpoint from ApiService to providerApiService

* move provider endpoints to the provider-api class

* change the header

* resolve some pr comments
2024-04-17 14:07:26 +01:00
Thomas Rittson
4db383850f
[AC-2172] Member modal - limit admin access (#8343)
* limit admin permissions to assign members to collections that the admin
doesn't have can manage permissions for
2024-04-17 11:03:48 +10:00
Thomas Rittson
f45eec1a4f
[AC-2169] Group modal - limit admin access - members tab (#8650)
* Restrict user from adding themselves to existing group
2024-04-17 09:31:48 +10:00
Jared Snider
51a6b34cc2
Auth/PM-7467- Fix Refresh token issues (#8757)
* PM-7467 - Login Strategy bug - VaultTimeoutSettings will be undefined before the account is activated unless you pass in user ids to retrieve the data. This resulted in refresh tokens always being set into secure storage regardless of a user's vault timeout settings (logout should translate to memory)

* PM-7467 - TokenSvc - Fix bug in getRefreshToken which would retrieve the user's refresh token from secure storage even if the user had changed their vault timeout setting to log out which moved the refresh token into memory. Includes a migration to remove the no longer required REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE state provider flag.

* PM-7467 - Per PR feedback, use IRREVERSIBLE for rollback.

Co-authored-by: Jake Fink <jfink@bitwarden.com>

* PM-7467 - fix tests

* PM-7467 - Fix migrator based on PR feedback.

* PM-7467 - Bump migration version

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2024-04-16 14:05:47 -04:00
Carlos Gonçalves
06acdefa91
[PM-5273] Migrate state in CipherService (#8314)
* PM-5273 Initial migration work for localData

* PM-5273 Encrypted and Decrypted ciphers migration to state provider

* pm-5273 Update references

* pm5273 Ensure prototype on cipher

* PM-5273 Add CipherId

* PM-5273 Remove migrated methods and updated references

* pm-5273 Fix versions

* PM-5273 Added missing options

* Conflict resolution

* Revert "Conflict resolution"

This reverts commit 0c0c2039ed.

* PM-5273 Fix PR comments

* Pm-5273 Fix comments

* PM-5273 Changed decryptedCiphers to use ActiveUserState

* PM-5273 Fix tests

* PM-5273 Fix pr comments
2024-04-16 17:37:03 +01:00
Carlos Gonçalves
62ed7e5abc
[PM-2170] Update collections component (#6794)
* PM-2170 Updated Collections to use Component Library

* PM-2170 Removed some extra space

* PM-2170 Fix typo

* PM-2170 Refresh vault when saving

* PM-2170 Fix PR comments

* PM-2170 Refactor to use CollectionsDialogResult to fix lint error

* PM-2170 Refactor subtitle

* PM-4788 Fix dismiss of modal

* PM-2170 Fix PR comments
2024-04-16 15:47:12 +01:00
Jake Fink
576431d29e
[PM-5499] auth request service migrations (#8597)
* move auth request storage to service

* create migrations for auth requests

* fix tests

* fix browser

* fix login strategy

* update migration

* use correct test descriptions in migration
2024-04-15 12:34:30 -04:00
Jason Ng
c701ad9cf2
[AC-2330] Updated Cipher Collections Now Sets Readonly Properly (#8549)
Update putCipherCollection call to get new cipher with updated edit value
2024-04-12 14:41:05 -05:00
✨ Audrey ✨
44d59f0d8c
[PM-7419] add buffered state (#8706)
Introduces a state manager that buffers data until an observed dependency signals it should 
overwrite another state manager with the buffered data. It can be used to implement 
migrations of encrypted data, edit-apply loops (such as used for save operations), and to 
map between encryption keys/formats.
2024-04-12 13:31:58 -04:00
Jared Snider
5f97f4c4a8
Update Organization and Policy Services to allow the passing of a user id and to prevent hangs waiting on an active user (#8712)
* OrgSvc - add new observable returning getAll$ method which accepts a required user id

* OrgSvc - make user id optional

* PolicySvc - getAll$ should use the new OrgSvc.getAll$ method so that it doesn't hang if there isn't an active user yet but a user id was passed in.

* Fix policy service tests
2024-04-12 10:21:19 -04:00
SmithThe4th
a12c7242d6
load collections after ngOninit has run (#8691) 2024-04-12 14:53:26 +01:00
Thomas Rittson
d026087bfd
[AC-2443] Update unassigned items banner text for self-hosted (#8719)
* Update banner text for self-hosted environments

* Fix tests

* Fix web vault wording

* Actually fix web vault wording
2024-04-12 06:57:17 -05:00
Matt Gibson
8d698d9d84
[PM-7169][PM-5267] Remove auth status from account info (#8539)
* remove active account unlocked from state service

* Remove status from account service `AccountInfo`

* Fixup lingering usages of status

Fixup missed factories

* Fixup account info usage

* fixup CLI build

* Fixup current account type

* Add helper for all auth statuses to auth service

* Fix tests

* Uncomment mistakenly commented code

* Rework logged out account exclusion tests

* Correct test description

* Avoid getters returning observables

* fixup type
2024-04-12 09:25:45 +02:00
SmithThe4th
c7ea35280d
Fix for not implemented ngOnDestroy method in vault items component (#8708) 2024-04-11 19:42:42 +01:00
✨ Audrey ✨
787ad64b73
apply password generator policy to all users (#8641) 2024-04-11 13:32:50 -04:00
SmithThe4th
c2b91d2d46
[PM-4700] Fixed issue with clearing search index state (#8686)
* fixed issue with clearing search index state

* Decrease snap description character length to reach 128 limit (#8687)

* clear user index before account is totally cleaned up

* [AC-2436] Fix flashing unassigned items banner (#8689)

* Fix flashing banner for users who shouldn't see it

* Emit the right value the first time

* simplify further

* restore comment

* added logout clear on option

* removed redundant clear index from logout

---------

Co-authored-by: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-11 17:53:16 +01:00
Thomas Rittson
b843aa6bd1
[AC-2436] Fix flashing unassigned items banner (#8689)
* Fix flashing banner for users who shouldn't see it

* Emit the right value the first time

* simplify further

* restore comment
2024-04-11 06:32:44 -05:00
Addison Beck
ab83a367dd
Address review feedback on UnassignedBannerService (#8680)
* Introduce `UnassignedItemsBannerApiService`

* Delete `WebUnassignedItemsBannerService`
2024-04-10 16:13:41 -05:00
Thomas Rittson
98ed744ae8
[AC-2436] Show unassigned items banner in browser (#8656)
* Boostrap basic banner, show for all admins

* Remove UI banner, fix method calls

* Invert showBanner -> hideBanner

* Add api call

* Minor tweaks and wording

* Change to active user state

* Add tests

* Fix mixed up names

* Simplify logic

* Add feature flag

* Do not clear on logout

* Show banner in browser as well

* Update apps/browser/src/_locales/en/messages.json

* Update copy

---------

Co-authored-by: Addison Beck <github@addisonbeck.com>
Co-authored-by: Addison Beck <hello@addisonbeck.com>
2024-04-10 12:13:37 -07:00
Alex Morask
4c2afb4121
Add tax information to provider setup component when FF is on. (#8616) 2024-04-10 14:10:47 -04:00
Thomas Rittson
be362988b0
[AC-2436] Show unassigned items banner in web (#8655)
* Boostrap basic banner, show for all admins

* Remove UI banner, fix method calls

* Invert showBanner -> hideBanner

* Add api call

* Minor tweaks and wording

* Change to active user state

* Add tests

* Fix mixed up names

* Simplify logic

* Add feature flag

* Do not clear on logout

* Update apps/web/src/locales/en/messages.json

---------

Co-authored-by: Addison Beck <github@addisonbeck.com>
2024-04-10 11:52:13 -05:00
Matt Gibson
744f3a4d1c
Use UserKeyDefinition for user-scoped data (#8667) 2024-04-10 11:35:44 -04:00
Justin Baur
84cd01165c
Auth UserKeyDefinition Migration (#8587)
* Migrate DeviceTrustCryptoService

* Migrate SsoLoginService

* Migrate TokenService

* Update libs/common/src/auth/services/token.state.ts

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>

* Fix Test

* Actually Fix Tests

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2024-04-10 09:59:20 -04:00
SmithThe4th
2bce6c538c
[PM-6194] Refactor injection of services in browser services module (#8380)
* refactored injector of services on the browser service module

* refactored the search and popup serach service to use state provider

* renamed back to default

* removed token service that was readded during merge conflict

* Updated search service construction on the cli

* updated to use user key definition

* Reafctored all components that refernce issearchable

* removed commented variable

* added uncommited code to remove dependencies not needed anymore

* added uncommited code to remove dependencies not needed anymore
2024-04-10 14:02:46 +01:00
Jake Fink
9d10825dbd
[PM-5362] Add MP Service (attempt #2) (#8619)
* create mp and kdf service

* update mp service interface to not rely on active user

* rename observable methods

* update crypto service with new MP service

* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests

* update auth service and finish strategies

* auth request refactors

* more service refactors and constructor updates

* setMasterKey refactors

* remove master key methods from crypto service

* remove master key and hash from state service

* missed fixes

* create migrations and fix references

* fix master key imports

* default force set password reason to none

* add password reset reason observable factory to service

* remove kdf changes and migrate only disk data

* update migration number

* fix sync service deps

* use disk for force set password state

* fix desktop migration

* fix sso test

* fix tests

* fix more tests

* fix even more tests

* fix even more tests

* fix cli

* remove kdf service abstraction

* add missing deps for browser

* fix merge conflicts

* clear reset password reason on lock or logout

* fix tests

* fix other tests

* add jsdocs to abstraction

* use state provider in crypto service

* inverse master password service factory

* add clearOn to master password service

* add parameter validation to master password service

* add component level userId

* add missed userId

* migrate key hash

* fix login strategy service

* delete crypto master key from account

* migrate master key encrypted user key

* rename key hash to master key hash

* use mp service for getMasterKeyEncryptedUserKey

* fix tests

* fix user key decryption logic

* add clear methods to mp service

* fix circular dep and encryption issue

* fix test

* remove extra account service call

* use EncString in state provider

* fix tests

* return to using encrypted string for serialization
2024-04-09 20:50:20 -04:00
Matt Gibson
c02723d6a6
Specify clearOn options for platform services (#8584)
* Use UserKeys in biometric state

* Remove global clear todo. Answer is never

* User UserKeys in crypto state

* Clear userkey on both lock and logout via User Key Definitions

* Use UserKeyDefinitions in environment service

* Rely on userKeyDefinition to clear org keys

* Rely on userKeyDefinition to clear provider keys

* Rely on userKeyDefinition to clear user keys

* Rely on userKeyDefinitions to clear user asym key pair
2024-04-09 11:17:00 -04:00
Vincent Salucci
c73372310b
fix: remove TXT generation, separate save/verify steps, refs AC-2350 (#8540) 2024-04-08 14:32:14 -05:00
Conner Turnbull
18ae698f8d
SM changes (#8531) 2024-04-08 14:42:49 -04:00
Oscar Hinton
7064b595da
[SM-1031] Remove SecretsManager & showDDG compile flags (#8610)
Remove old compile flags which should no longer be required, and may even cause issues. secretsManager: false hides the app switcher which is now used for more than just secrets manager.
2024-04-08 17:46:24 +02:00
Tom
3d052242df
[PM-5578] [PM-5579] [PM-5580] [PM-5581] Send Browser State Provider (#8232)
* Replacing state service with state provider

* Documentation indicating the differences between the 2 states used.

* Creating key definition, updating comments, and modifying test cases

* Adding the key definitions tests

* Documenting the observables

* Fixing the test issue with the awaitAsync import

* Removing browser state service stuff for merge fix

* no need to redefine interface members

* Renaming to DefaultBrowserStateService
2024-04-08 10:30:39 -04:00
Matt Gibson
1308b326fd
Tools/specify-clearon-conditions (#8596)
* Specify user clear events for event upload

* Specify generator clear events

* Specify clear events for user send data

* Specify generic clear on logout for encrypted secret state

* Allow `clearOn`event to be passed into secret state

* Match current data persistence rules

* Clear ui memory on lock + logout
2024-04-08 12:26:22 +00:00
Thomas Rittson
26226c4090
[AC-2356] Use safeProvider in web core services module (#8521)
* Also add tests
* Exclude type (compile-time) tests from jest config
2024-04-08 07:59:12 +10:00
Cesar Gonzalez
8ae44b13ed
[CL-255] Opening a menu by mouse click shows an outline on the first submenu item (#8629) 2024-04-05 21:33:03 +00:00
Addison Beck
6df52262a9
Clear provider state on logout (#8563) 2024-04-05 13:10:55 -05:00
Addison Beck
2ff990edd2
Update policy service to clear its own state (#8564) 2024-04-05 13:10:24 -05:00
✨ Audrey ✨
edf35a9ad1
fix fencepost errors in padded data packer (#8631)
Unit tests trim vertical pipes when appear in the data packer's JSON data, but electron is not as forgiving. It throws errors in this situation. This fixes the error by trimming the pipes before b64 decoding the result.
2024-04-05 13:03:04 -04:00
Shane Melton
cbf48decec
[PM-7292] Fix viewing/editing unassigned ciphers for admins (#8627)
* [PM-7292] Introduce canEditUnassignedCiphers helper

* [PM-7292] Use new canEditUnassignedCiphers helper

* [PM-7292] Remove duplicate canUseAdminCollections helper
2024-04-05 08:23:50 -07:00
Victoria League
09169cac71
[CL-254] Rename 500 colors to 600 to prep for UI redesign (#8623)
* [CL-254] Rename 500 colors to 600 to prep for UI redesign

---------

Co-authored-by: Will Martin <contact@willmartian.com>
2024-04-05 10:58:32 -04:00
Jake Fink
775c8a1bbe
Revert "[PM-5362]Create MP Service for state provider migration (#7623)" (#8617)
This reverts commit b1abfb0a5c.
2024-04-04 16:17:09 +00:00
Cesar Gonzalez
e2e593c0fe
[PM-7278] Fix undefined reference to keyManager within menu-trigger-for directive (#8614) 2024-04-04 09:57:10 -05:00
Jake Fink
b1abfb0a5c
[PM-5362]Create MP Service for state provider migration (#7623)
* create mp and kdf service

* update mp service interface to not rely on active user

* rename observable methods

* update crypto service with new MP service

* add master password service to login strategies
- make fake service for easier testing
- fix crypto service tests

* update auth service and finish strategies

* auth request refactors

* more service refactors and constructor updates

* setMasterKey refactors

* remove master key methods from crypto service

* remove master key and hash from state service

* missed fixes

* create migrations and fix references

* fix master key imports

* default force set password reason to none

* add password reset reason observable factory to service

* remove kdf changes and migrate only disk data

* update migration number

* fix sync service deps

* use disk for force set password state

* fix desktop migration

* fix sso test

* fix tests

* fix more tests

* fix even more tests

* fix even more tests

* fix cli

* remove kdf service abstraction

* add missing deps for browser

* fix merge conflicts

* clear reset password reason on lock or logout

* fix tests

* fix other tests

* add jsdocs to abstraction

* use state provider in crypto service

* inverse master password service factory

* add clearOn to master password service

* add parameter validation to master password service

* add component level userId

* add missed userId

* migrate key hash

* fix login strategy service

* delete crypto master key from account

* migrate master key encrypted user key

* rename key hash to master key hash

* use mp service for getMasterKeyEncryptedUserKey

* fix tests
2024-04-04 14:22:41 +00:00
Thomas Rittson
32981ce30d
[AC-2320] Update canEditAnyCollection logic for Flexible Collections v1 (#8394)
* also update calling locations to use canEditAllCiphers where applicable
2024-04-04 13:48:41 +10:00
Oscar Hinton
23c89bda74
[PM-6975] Replace purchasedPremium broadcast message with observables (#8421)
In https://github.com/bitwarden/clients/pull/8133 the premium state changed to
be derived from observables, which means we can get rid of the `purchasePremium`
messages that are sent and instead rely directly on the observable to distribute
the state.
2024-04-03 15:51:55 -05:00
✨ Audrey ✨
b579bc8f96
[PM-6818] legacy generator service adapter (#8582)
* introduce legacy generators
* introduce generator navigation service
* Introduce default options. These accept a userId so that they can be policy-defined
* replace `GeneratorOptions` with backwards compatible `GeneratorNavigation`
2024-04-03 13:48:33 -04:00
Matt Gibson
2977616be4
Use user definition clearon events for billing (#8589) 2024-04-03 10:28:36 -04:00
renovate[bot]
b53b211bd4
[deps]: Lock file maintenance (#7700)
* [deps]: Lock file maintenance

* Fix jest breaking changes

---------

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-04-03 15:48:04 +02:00