1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

87 Commits

Author SHA1 Message Date
Alex
f5f9d1881e [PM-27291] preserve critical app flags when generating new reports (#17008) 2025-10-24 12:20:40 -04:00
Leslie Tilton
03d636108d [PM-23680] Report Applications data (#16819)
* Move files to folders. Delete unused component. Move model to file

* Move risk insights services to folder structure capturing domains, api, and view organization. Move mock data

* Remove legacy risk insight report code

* Move api model to file

* Separate data service and orchestration of data to make the data service a facade

* Add orchestration updates for fetching applications as well as migrating data.

* Updated migration of critical applications and merged old saved data to new critical applications on report object

* Update test cases

* Fixed test case after merge. Cleaned up per comments on review

* Fixed decryption and encryption issue when not using existing content key

* Fix type errors

* Fix test update

* Fixe remove critical applications

* Fix report generating flag not being reset

* Removed extra logs
2025-10-22 10:36:51 -05:00
Vijay Oommen
cc954ed123 [PM-27204] New Feature Flag for datadog and crowdstrike (#16968) 2025-10-22 10:10:56 -05:00
Alex
a5dd42396c [PM-27024] password progress card at risk detection (#16955)
* [PM-27024] Fix password change progress card to track only critical apps and detect new at-risk passwords
- Filter at-risk password count to critical applications only
- Update state logic to transition back to assign tasks when new at-risk passwords detected
- Only create security tasks for critical applications with at-risk passwords
- Show 'X new passwords at-risk' message when tasks exist and new at-risk passwords appear

* spec
2025-10-21 08:02:44 -07:00
Vijay Oommen
ab995045fd PM-26508 when password change is requested, the all-activity table count will change (#16753) 2025-10-08 14:15:59 -05:00
Shane Melton
9f0a565241 [PM-25682] Migrate CipherView and subviews to be TS strict compliant (#16463)
* [PM-25682] Remove ts-strict-ignore from Vault view models and update types to be strict

* [PM-25682] Ignore ViewEncryptableKeys error for old decrypt methods

* [PM-25682] Add null/undefined as possible types for isNull* and other helpers that include null checks internally

* [PM-25682] Use patchValue instead of setValue which does not support undefined values

* [PM-25682] Add type assertions and other misc. null checks where necessary

* [PM-25682] Fix importers specs

* [PM-25682] Cleanup card view/details

* [PM-25682] Fix cipher view hasAttachment helper

* [PM-25682] Cleanup unecessary null assignments in notification.background.spec.ts

* [PM-25682] Ensure linkedId is undefined instead of null

* [PM-25682] Cleanup misc typing errors

* [PM-25682] Make the CipherId required

* [PM-25682] Undo CipherId assertions

* [PM-25682] Undo brand initial value change

* [PM-25682] Update SshKeyView

* [PM-25682] Add constructor to Fido2CredentialView

* [PM-25682] Prettier

* [PM-25682] Fix strict type warnings after merge with main

* [PM-25682] Cleanup cipher view spec

* [PM-25682] Cleanup new type warnings after merge

* [PM-25682] Undo removed eslint-disable-next-line comment

* [PM-25682] Fix flaky test

* [PM-25682] Use satisfies instead of as for Fido2CredentialAutofillView
2025-10-07 11:40:57 -04:00
Graham Walker
801700d441 PM-26015 Datadog integration card (#16559)
* PM-26015 adding Datadog integration card

* PM-26015 removing 2 changes

* PM-26015 Removing 1 change

* PM-26015 adding datadog integration card

* PM-26015 fixing code to accept new toast owner changes

* PM-26015 fixing linting error

* PM-26015 fixing pr comment
2025-10-07 09:37:59 -05:00
Alex
f29e5e223d [PM-26185] new app metric card (#16658)
* new messages.json keys

* button changes for dirt activity card

* dummy data

* newApplicationsCount and temp toast

* Added third dirt-activity-card component after the existing two cards

* added newApplications to setAllAppsReportSummary

* make button smaller

* cleanup/nice-to-haves

* remove comment

* simplify activity card icon logic to use nullable iconClass

* use buttonText presence to determine button display in activity card

* apps needing review card
- I think accidentally deleted when resolving merge conflicts

* buttonClick.observed && buttonText
2025-10-06 12:29:59 -07:00
Leslie Tilton
8c81ccc1c5 [PM-25611][PM-25612] Update components to use persistance code (#16655)
* Add password trigger logic to report service. Also updated api to use classes that properly handle encstring with placeholders for upcoming usage

* Fix merged test case conflict

* Fix type errors and test cases. Make create data functions for report and summary

* Update Risk Insights Report Data Type

* Update encryption usage and test cases. Moved mock data

* Remove unused variable

* Move all-application constructor

* Update all applications and risk insights to look at fetched logic

* Fix name of variable. Fetch last report run

* Cleanup all and critical application tabs drawer dependencies

* Rename components from tool to dirt. Hook up all applications to use reportResult summary

* Critical application cleanup. Trigger refetch of report for enriching when critical applications change

* Fix type errors

* Rename loader from tools to dirt. Cleanup

* Add activity tab updates using data service

* Use safeProviders in access intelligence

* Fix refresh button not appearing. Change "refresh" to "run report"

* Remove multiple async calls for isRunningReport

* Fix report button not showing

* Add no report ran message

* Fix password change on critical applications
2025-10-06 12:01:06 -05:00
Vijay Oommen
0443c87867 [PM-26018] All Activity tab - Password change metric (#16644) 2025-10-03 08:58:07 -05:00
Vijay Oommen
0bfc5daa7c [PM-26074] All Activities tab - Updated UI (#16587)
* PM-26074 simplified and update the all-activities tab

* PM-26074 removed learn more

* PM-26074 fixing missing line
2025-09-29 20:19:14 +00:00
Leslie Tilton
e784622f67 [PM-25613] Add report trigger logic (#16615)
* Add password trigger logic to report service. Also updated api to use classes that properly handle encstring with placeholders for upcoming usage

* Fix merged test case conflict

* Fix type errors and test cases. Make create data functions for report and summary
2025-09-29 14:37:23 -05:00
Vijay Oommen
90fb57817a [PM-25931] Integrations - can save only if owner (#16570) 2025-09-29 08:27:21 -05:00
Alex
979e370235 [PM-26031] Drawer Service State Refactoring (#16580)
* refactor(risk-insights-data.service): unify drawer state management with BehaviorSubject

- Replace individual drawer properties with unified drawerDetailsSubject
- Add reactive Observable getters for drawer state checking
- Update all drawer methods to use centralized state management

* risk-insights.component: add special case drawer state sync in component

- Add private _isDrawerOpen property for internal state tracking
- Subscribe to drawerDetails$ changes with takeUntilDestroyed cleanup
- Implement getter/setter for isDrawerOpen to sync component <-> service
- Enable two-way binding while maintaining reactive patterns

* risk-insights.component.html: replace drawer template with unified observable patterns

- Replace dataService.openDrawer with isDrawerOpen special case getter
- Wrap drawer in @if block with drawerDetails$ | async for single subscription
- Update isActiveDrawerType() calls to reactive isActiveDrawerType$() | async
- Replace direct property access with unified drawerDetails object
- Use modern @if control flow syntax for better performance

* all-applications.component.html: replace drawer state with reactive observable patterns

- Replace dataService.drawerInvokerId with drawerDetails$ | async in card highlighting
- Update app-table-row-scrollable input from isDrawerIsOpenForThisRecord function to openApplication string

* critical-applications.component.html: replace drawer state with reactive observable patterns

- Replace dataService.drawerInvokerId with drawerDetails$ | async in card highlighting
- Update table component binding from isDrawerIsOpenForThisRecord to openApplication
- Use reactive drawer state checking for consistent behavior with all-applications

* all-applications.component.ts: remove deprecated drawer state functions

- Remove unused trackByFunction that's no longer needed in template
- Remove getSelectedUrls function that's not used anywhere
- Remove isDrawerOpenForTableRow replaced by reactive openApplication binding
- Clean up unused ApplicationHealthReportDetail import
- Simplifies component interface following reactive pattern migration

* critical-applications.component.ts: remove deprecated drawer state functions

- Remove unused trackByFunction that's no longer needed in template
- Remove isDrawerOpenForTableRow replaced by reactive openApplication binding

* app-table-row-scrollable.component.html: replace drawer function calls with string comparison

- Replace isDrawerIsOpenForThisRecord(row.applicationName) with row.applicationName === openApplication
- Use direct string comparison instead of function calls for better performance
- Matches updated component input from function to string property
- Simplifies template logic following reactive pattern migration

* fix(risk-insights-data.service.ts): restore drawer toggle behavior in setter methods

- Add toggle logic to check if same drawer type and invoker are already open
- Close drawer when clicking same button twice (preserves original UX)
- Switch drawer content when clicking different button
- Maintains reactive patterns while restoring expected behavior

* revert to drawer state functions to maintain scope of task
- the logic replacing these functions will be in pr16523

* fix(risk-insights-data.service.ts): restore boolean isActiveDrawerType function per review feedback

- Keep original isActiveDrawerType() as boolean function using drawerDetailsSubject.value
- Maintain isActiveDrawerType$() as Observable version for reactive templates
- Apply same pattern to isDrawerOpenForInvoker() for consistency
- Addresses review feedback to preserve existing function signatures

* refactor(risk-insights-data.service.ts): use destructuring in drawer setter methods per review feedback

* refactor(all-applications.component.html): optimize single subscription for drawer state per review feedback

* refactor(critical-applications.component.html): optimize single subscription for drawer state per review feedback

* refactor(risk-insights.component.html): use boolean drawer type functions per review feedback

* fix(browser-system-notification.service.ts): restore eslint disable comment removed by prettier

---------

Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com>
2025-09-26 15:25:16 -05:00
Alex
8ba22f3080 [PM-25609] use password health service (#16482)
* isValidCipher and findWeakPasswordDetails

* auditPasswordLeaks$

* missing deps fix

* refactor: remove unused dependencies from RiskInsightsReportService

- Remove PasswordStrengthServiceAbstraction and AuditService from constructor
- Update module dependency injection to only provide these services to PasswordHealthService
- Remove unused imports and mock services from test file
- Ensure proper separation of concerns where password health logic is centralized in PasswordHealthService
2025-09-26 14:59:38 -04:00
Leslie Tilton
466bf18d51 [PM-25614] Add Encrichment Logic for Risk Insights Data Service (#16577)
* Add encryption logic. Minor updates to critical apps service

* Fix possibly null type
2025-09-26 09:53:08 -05:00
Tom
5c1a1ce6df Just adding the report application type (#16492) 2025-09-23 10:30:04 -04:00
Leslie Tilton
fb7b29d6b3 [PM-25610] Add Refactored Report Aggregation Logic (#16476)
* Add new aggregation logic and update legacy function names

* Update test cases

* Fix test types
2025-09-19 14:40:32 -04:00
Tom
d4cf7217e3 [PM-25838] Adding new properties to the summary and renaming the type (#16477)
* Adding new properties to the summary and renaming the type

* properties were missing from not saving

* fixing type issues and missed renaming
2025-09-18 15:18:41 -05:00
Leslie Tilton
20c8a1ff25 [PM-25608] PasswordHealthService cleanup (#16471)
* Update password health service and test cases

* Fix linting errors
2025-09-18 14:42:10 -04:00
Alex
d6cd30cf54 [PM-25607] Separate Models and account for legacy (#16448)
* organize password-health.ts contents into new model files

* revert naming

* revert to state of use save service pr draft

* LEGACY_MemberDetailsFlat

* legacy updates to password health file

* update imports

* fix import errors

* - revert unnecessary encrypteddatamodel changes
-add it back to password-health.ts
- revert the type changes of variables in EncryptedDataWithKey

* quick fix
2025-09-18 13:08:07 -05:00
Vijay Oommen
57705791db PM-25931 fixing bugs found by QA (#16472) 2025-09-18 11:03:00 -05:00
Vijay Oommen
59396f0262 [PM-24655] Delete an existing Integration (#16382) 2025-09-16 09:30:11 -05:00
Alex
0998508738 [PM-25606] move data mapping methods to helper file (#16400)
* move data mapping methods to helper file

* revert to original naming
2025-09-15 07:24:38 -07:00
Tom
f20ed9f0e9 [PM- 25678] Applications api endpoints (#16387)
* Adding the applications api endpoints and test cases

* Changing observable names
2025-09-12 10:09:12 -04:00
Leslie Tilton
31d5b639e9 [PM-20578] [PM-20579] Merge existing feature branch into main (#16364)
* PM-20578 Added api to fetch and save data (#15334)

* [PM-20579] Update risk-insights report service to use api service with encryption (#15357)

* Fix type error

* Fix paths for changed key generation service

* Finalize the api services

* Fixing test case for summary date range

* Fixing report service tests. Encryption will be modified in the future

* Fixing encryption service tests

* fixing linting issues

---------

Co-authored-by: Vijay Oommen <voommen@livefront.com>
Co-authored-by: Tom <ttalty@bitwarden.com>
2025-09-11 14:17:13 -04:00
Vijay Oommen
4857855c11 [PM-23824] Implement HEC integration (#16274) 2025-09-11 08:10:42 -05:00
Tom
4027b78e20 [PM-24101] Switching to use the orgKeys$ from the key service instead of getOrgKey (#15781)
* Switching to use the orgKeys$ from the key service instead of getOrgKey

* Using account service instead of state provider

* First try for fixing test cases

* fixing test cases

* PM-24101 fix identified by failing test

* Error checking on the orgId

* Private method did not need error check

* Setting OrganizationId type

* Fixing test cases for setting org id

* Moving the get of critical apps to the init

* The critical apps component was being set again

---------

Co-authored-by: voommen-livefront <voommen@livefront.com>
2025-09-03 14:18:50 -04:00
Brandon Treston
d4952d211e [PM-24096] replace getOrgKey with orgKey$, refactor collectionAdminService (#15928)
* replace getOrgKey with orgKey$, refactor collectionAdminService

* clean up

* uncomment accidental commet

* remove cache
2025-08-12 12:06:55 -04:00
Vijay Oommen
13a8b46d30 [PM-23826] Crowdstrike integration dialog (#15757) 2025-07-31 11:45:35 -05:00
Bernd Schoolmann
5dae5267d9 [PM-22623] Remove most TS encryption code, remove service workers (#15153)
* Add new encrypt service functions

* Undo changes

* Cleanup

* Fix build

* Fix comments

* Switch encrypt service to use SDK functions

* Move remaining functions to PureCrypto

* Tests

* Increase test coverage

* Enforce sdk.ready and drop unused codepaths

* Delete unused code

* Delete unused code

* Delete more code

* Add forgotten sdk init logic

* Fix build

* Fix cli

* Fix tests

* Fix build

* Fix browser build

* Remove compare and add more comments / warnings

* Run prettier

* Remove unused feature flags

* Add hazmat warning to aesDecrypt

* Fix build

* Fix comment

* Fix test
2025-07-30 15:50:00 +02:00
Tom
b358d5663d [PM-23822] [PM-23823] Organization integration and configuration api services (#15763)
* Adding the organization integration api service and test cases

* Adding configuration api files and test cases. Fixing the id guids and integration type and event type nullable

* Adding get endpoint methods to the integration and config service and test cases

* fixing type check issues

* lowercase directory name
2025-07-25 09:43:41 -04:00
Vijay Oommen
b33bdd60ae [PM-23758] Api method to save and retrieve report summary (#15705) 2025-07-21 13:45:48 -05:00
Bernd Schoolmann
60855c734f [PM-17666] Move Encstring to KM ownership (#15457)
* Move Encstring to KM ownership

* Fix wrong import

* Fix build

* Fix remaining imports

* Fix tests
2025-07-16 11:15:24 -04:00
Vijay Oommen
0032d1457f [PM-21713] Include CipherId and find Ciphers in Risk Insights report (#14823) 2025-06-04 14:33:46 -05:00
Addison Beck
26caeb3083 Implement and extend tsconfig.base across projects (#14554)
* Implement and extend tsconfig.base across projects

* fixup! Merge remote-tracking branch 'origin/main' into rename-tsconfig

* fix: import tsconfig.base from components

* fix: skip typechecking node modules

* fixing tests

* fix the tests for real

* undo accidentally change
2025-06-02 20:38:17 +00:00
Tom
874fe0fd1e Adding userGuid to the member details object (#14899) 2025-05-30 12:55:14 -04:00
Daniel James Smith
0f6d4a92d7 Migrate libs/tools/card to be owned by DIRT (#14987)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-05-30 07:37:08 +00:00
Leslie Tilton
b48356228c Update risk insights report to default an invalid uri to the original uri (#14800) 2025-05-29 08:45:40 -05:00
Tom
623deea4fc Adding at risk cipher ids for accurate notifications (#14784) 2025-05-15 09:36:57 -05:00
Vijay Oommen
896c9bd583 [PM-20997] Part 1 of PM-20117 - Styling Changes (#14527) 2025-05-13 13:59:03 -05:00
Patrick-Pimentel-Bitwarden
0b0397c3f0 fix(enums-eslint): Enum Rule for ESLint (#14650)
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.

* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.

* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.

* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
2025-05-13 10:07:38 -04:00
Tom
9f3310ed7e Redoing the PR for get by domain due to file move (#14746) 2025-05-13 08:44:54 -05:00
Jared McCannon
5176345584 [PM-19532] - Add Fingerprint phrase to cli auth request (#14556)
* first pass at adding fingerprint phrase to auth requests

* Moved call to getFingerprint into the service layer. Added a new method for getting auth requests. Updated tests.

* Fixing the import

* Renaming to WithFingerprint
2025-05-06 10:50:48 -05:00
Leslie Tilton
5166a9c730 [PM-19716][PM-19714] Move files to Data Insights & Reporting team (DIRT) ownership (#14571)
* Move access-intelligence and reports files from tools to dirt folder for new ownership. Update imports for these files

* Move bit-common/src/reports/risk-insights > dirt

* Update codeowners file for dirt team ownership

* Addressed linting issues by executing `npm run prettier`

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-05-06 10:32:48 +02:00
Bernd Schoolmann
67b0a19319 [PM-21001] Move tools usage of encrypt service (#14540)
* Add new encrypt service functions

* Undo changes

* Cleanup

* Fix build

* Fix comments

* Move tools usage of encrypt service
2025-04-30 15:36:48 +02:00
Bernd Schoolmann
b09305577f [PM-19603] Change asymmetric interface to only allow key encapsulation (#14046)
* Change asymmetric interface to only allow key encapsulation

* Fix naming

* Clean up naming

* Update libs/common/src/key-management/crypto/abstractions/encrypt.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/services/encrypt.service.implementation.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/crypto/abstractions/encrypt.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Fix test

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-04-15 16:39:02 +02:00
Ike
c739a884b4 [PM-15015] Adding Request Country Name to auth requests approval dialog (#13718)
* feat(pm-15015) : 
  - Adding `requestCountryName` to auth requests dialogs, and response models. 
  - Updated i18n messages.json in Web, Browser, and Desktop to include "Location" translation.
2025-03-07 18:03:13 -05:00
Oscar Hinton
cec117459b [PM-18599] Forbid unknown property and element in tests (#13556)
Fail tests when relying on unknownProperties or unknownElements. Existing instances are whitelist and have tickets created and assigned to the relevant teams.
2025-02-25 14:02:19 -08:00
Maciej Zieniuk
3924bc9c84 [PM-14445] TS strict for Key Management, Keys and Lock component (#13121)
* PM-14445: TS strict for Key Management Biometrics

* formatting

* callbacks not null expectations

* state nullability expectations updates

* unit tests fix

* secure channel naming, explicit null check on messageId

* KM-14445: TS strict for Key Management, Keys and Lock component

* conflicts resolution, new strict check failures

* null simplifications

* migrate legacy encryption when no active user throw error instead of hiding it

* throw instead of return
2025-02-20 18:45:37 +01:00