1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-17 07:15:13 +02:00
Commit Graph

195 Commits

Author SHA1 Message Date
Cesar Gonzalez
36c965c453
[PM-9876] Safari Passkeys Prompt is Not Triggered (#11471) 2024-10-09 08:45:28 -05:00
Thomas Rittson
7c72795d1c
[PM-12747] Move CollectionService and models to AC Team (#11278) 2024-10-08 10:14:39 -04:00
Oscar Hinton
7e4d735532
[PM-11290] Fix safari not starting with sdk (#11438)
We ran into some inconsistencies between how manifest v2 and v3 are handled in browsers. To resolve this we have a different flow for manifest v2 which dynamically imports, while v3 uses the sync importScripts.
2024-10-07 18:00:07 +02:00
Oscar Hinton
9ea9c3a932
[PM-11290] Enable SDK (#11378)
Follow up PR to #10974, flips the compile time flags to enabled and includes some debug logic to detect if users encounter issues with the WASM bundle in preparation for active consumption of the SDK.
2024-10-07 13:56:02 +02:00
Oscar Hinton
c88c5bf1ef
[PM-11766] Introduce SDK client (#10974)
Integrate the SDK into our other clients.
2024-10-07 13:20:50 +02:00
Jared Snider
87cb45c520
Auth/PM-13114 - WebEnvService Refactor + Unit Tests to support QA Env Selector (#11397)
* PM-13114 - WebEnvSvc - use hostname vs domain check for init and setEnv (tests TODO)

* PM-13114 - WebEnvSvc + URLs webpack config - use expected string variable on process.env.URLS to ensure tests can properly mock the WebEnvSvc

* PM-13114 - WebEnvSvc - setEnvironment - fix issue with returning currentRegion urls instead of currentEnv urls.

* PM-13114 - WebEnvSvc - setEnv - refactor names to improve clarity.

* PM-13114 - WebEnvSvc spec file - Test all prod scenarios

* PM-13144 - Work with Justin to move process.env.Urls access into injection token and remove webpack string type conversion.

* PM-13114 - WIP on getting additionalRegionConfigs injected via injection token to default env service.

* PM-13114 - Update all background inits to pass process.env.ADDITIONAL_REGIONS as unknown as RegionConfig[] to env service.

* PM-13114 - WebEnvSvc - adjust order of constructor deps

* PM-13114 - WebEnvSvc - add WebRegionConfig to extend RegionConfig type and be accurate for what the WebEnvSvc uses.

* PM-13114 - WebEnvSvc Tests - US QA tested

* PM-13114 - WebEnvSvc tests - refactor QA naming to make it more clear.

* PM-13114 - WebEnvSvc - test QA EU

* PM-13114 - WebEnvSvc - remove promise resolve per PR feedback.
2024-10-04 14:57:40 -04:00
Jordan Aasen
d4767bf172
revert change to removing send tab (#11394) 2024-10-04 09:35:07 -04:00
Jordan Aasen
21a4b48eca
fix logic for hiding sends tab (#11352) 2024-10-02 12:09:10 -04:00
Jordan Aasen
6e7c83305e
[PM-12990]- center align footer buttons (#11342)
* center align footer buttons

* fix popup-tab-navigation layout
2024-10-01 10:35:39 -04:00
Andreas Coroiu
0846c2c822
[PM-11780] Resolve TypeScript 5.3 compile error 2024-10-01 13:39:36 +02:00
Bernd Schoolmann
19f547e638
[PM-8836] Move ownership of biometrics to key-management (#10818)
* Move ownership of biometrics to key-management

* Move biometrics ipc ownership to km

* Move further files to km; split off preload / ipc to km

* Fix linting

* Fix linting

* Fix tests

* Fix tests

* Update .github/CODEOWNERS

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update .github/CODEOWNERS

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Change ownership of native messaging to key-management

* Move biometrics to libs/key-management

* Add README to capital whitelist

* Update package-lock.json

* Move km to key-management

* Move km to key-management

* Fix build for cli

* Import fixes

* Apply prettier fix

* Fix test

* Import fixes

* Import fixes

* Update libs/key-management/README.md

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update libs/key-management/package.json

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update lock file

* Change imports to top level km package

---------

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2024-09-30 18:14:32 +02:00
Jordan Aasen
d0b09202c6
[PM-12504] - hide create send button and send tab when sends are disabled (#11186)
* hide create send button and send tab when sends are disabled

* reverse logic

* tidy up filter.

* fix popup tab navigation filter

* fix popup tab nav state

* fix popup-layout stories
2024-09-25 10:40:23 -07:00
Justin Baur
073fd29206
Add Retries to get (#11176) 2024-09-23 16:39:57 -04:00
Justin Baur
972339be83
Remove Storage Reseed FF (#11156) 2024-09-20 11:46:00 -04:00
Nick Krantz
a42006763d
[PM-9455] FireFox back handling (#10867)
* Refactor `POPUP_VIEW_MEMORY` to use `disk` rather than memory for the browser extension.

- When FireFox opens the popup in an standalone window memory is lost, thus causing the `popup-route-history` to be lost and back navigation ceases to work

* spelling

* revert state definition change

* add `onUpdated` event for firefox

* rework observable handling

* remove unneeded `from`
2024-09-17 08:42:57 -05:00
Victoria League
112bad03b1
[PM-8582] Move Safari browser check to libs/platform (#11007) 2024-09-16 15:36:05 -04:00
Justin Baur
92e71d9252
[PM-11661]Add New Reseed - Fill Buffer Behind Feature Flag (#10905)
* Add New Reseed - Fill Buffer Behind Feature Flag

* Add Tests

* Lint
2024-09-06 09:48:27 -04:00
otbutz
d905dd1653
Add missing doctype (#10860) 2024-09-05 20:22:45 -04:00
Bernd Schoolmann
5f5e4498e8
[PM-11593] Fix backgroundbrowserbiometricservice initialization (#10861)
* Fix backgroundbrowserbiometricservice initialization

* Cleanup according to review
2024-09-03 16:56:55 +02:00
Justin Baur
37523ca66b
[PM-1900] Run Process Reload on Firefox (#10149)
* Remove Firefox Exemption

* Do Not Open Sidebar On Install

* Run `chrome.runtime.reload` on All Browsers

* Update Docs & Test Name

* Should Probably Call The Sut In Test

* Update Doc Comment

* Update apps/browser/src/platform/browser/browser-api.ts

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>

---------

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2024-08-28 15:00:47 -04:00
Bernd Schoolmann
3c9b3ea2cc
[PM-6296] Fix biometrics error prompt when biometrics are temporarily unavailable in browser extension (v2) (#10374)
* Create unavailable message for biometrics when in clamshell mode

* Move browser biometrics

* Inject nativemessagingbackground instead of using constructor

* Fix linting

* Fix build on browser
2024-08-27 06:25:20 +00:00
Will Martin
6918606677
[PM-3530] browser extension view cache (#10437)
Introduces a way to store temporary component state, for the purposes of persisting views between extension popup open and close.
2024-08-26 16:09:33 -04:00
Shane Melton
ade01c9d07
[PM-8380] Browser Refresh - Virtual scrolling (#10646)
* [PM-8380] Add option to disable content padding for popup page

* [PM-8380] Add cdkVirtualScroll to vault list items and fixed item heights

* [PM-8380] Move item height constants to item component
2024-08-22 07:40:32 -07:00
Will Martin
59aa7ebc57
[PM-10940] misc popout history cache bug fixes (#10619) 2024-08-20 09:41:55 -04:00
Cesar Gonzalez
8fbdd8d22e
[PM-10667] Implement manifest v3 POC for remaining browsers (#10419)
* [PM-10667] Implement manifest v3 on Firefox and Safari

* [PM-10667] Fixing issues with CORS present in sandboxed iframe on Firefox

* [PM-10667] Updating gulp build process to ensure dist files are created correctly

* [PM-10667] Adding build processes to the Github workflow

* [PM-10667] Removing faulty Safari mv3 build workflow

* [PM-10667] Fixing jest tests

* [PM-10667] Reworking logic within inline menu

* Update apps/browser/webpack.config.js

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2024-08-15 09:54:18 -05:00
Will Martin
295fb8f7a4
[PM-3530][PM-8588] persist extension route history (#9556)
Save the extension popup route history and restore it after closing and re-opening the popup.

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-08-12 17:26:47 -04:00
Justin Baur
a7adf952db
[PM-10754] Store DeviceKey In Backup Storage Location (#10469)
* Implement Backup Storage Location For Browser Disk

* Remove Testing Change

* Remove Comment

* Add Comment For `disk-backup-local-storage`

* Require Matching `valuesRequireDeserialization` values
2024-08-12 13:29:22 -04:00
Justin Baur
334601e74f
[PM-10788] Handle chrome.runtime.lastError (#10479)
* Handle `chrome.runtime.lastError`

* Add Tests
2024-08-12 13:13:34 -04:00
SmithThe4th
c1bf1a797f
[PM-9714] Search results should clear and results reset after navigating away from Vault tab but persist if navigating to an Item view (#10378)
* created guard to clear search text when navigating between tabs

* removed reset filter from from vault list filter component on destroy and move to guard

renamed guard to clear vault state

* Fixed bug on chip select when comparing complex objects

moved compare values function to utils

* Added comment for future reference

* moved compare values to a seperate file

* fixed lint issue
2024-08-08 11:29:33 -04:00
Shane Melton
041cd87e7e
[PM-9675] Browser Refresh Login - Generator dialog (#10352)
* [PM-9675] Introduce CipherFormGenerator component

* [PM-9675] Introduce VaultGeneratorDialog component for Browser

* [PM-9675] Introduce BrowserCipherFormGeneration Service

* [PM-9675] Fix aria label on popup header

* [PM-9675] Cleanup html

* [PM-9675] Cleanup vault generator dialog spec file
2024-08-07 12:02:33 -07:00
Justin Baur
dcb21c2685
Move lastSync State (#10272) 2024-08-06 15:01:42 -04:00
Bernd Schoolmann
2ce8500391
[PM-990] Unix biometrics unlock via Polkit (#4586)
* Update unix biometrics for desktop biometrics rework

* Implement polkit policy setup

* Enable browser integration on Linux

* Remove polkit policy file

* Undo change to messages.json

* Fix biometrics setup, implement missing functions

* Implement osSupportsBiometrics

* Fix polkit settings message

* Remove unwraps in biometrics unix rust module

* Force password reprompt on start on linux with biometrics

* Merge branch 'main' into feature/unix-biometrics

* Allow browser extension to be unlocked on Linux via Polkit

* Implement availability check

* Cleanup

* Add auto-setup, manual setup, setup detection and change localized prompts

* Implement missing methods

* Add i18n to polkit message

* Implement missing method

* Small cleanup

* Update polkit consent message

* Fix unlock and print errors on failed biometrics

* Add dependencies to core crate

* Fix reference and update polkit policy

* Remove async-trait

* Add tsdoc

* Add comment about auto setup

* Delete unused init

* Update help link

* Remove additional settings for polkit

* Add availability-check to passwords implementation on linux

* Add availability test

* Add availability check to libsecret

* Expose availability check in napi crate

* Update d.ts

* Update osSupportsBiometric check to detect libsecret presence

* Improve secret service detection

* Add client half to Linux biometrics

* Fix windows build

* Remove unencrypted key handling for biometric key

* Move rng to rust, align linux bio implementation with windows

* Consolidate elevated commands into one

* Disable snap support in linux biometrics

---------

Co-authored-by: DigitallyRefined <129616584+DigitallyRefined@users.noreply.github.com>
2024-08-06 11:04:17 -04:00
Bernd Schoolmann
cc45655b86
Revert "[PM-6296] Fix biometrics error prompt when biometrics are temporarily…" (#10373)
This reverts commit 1184c504d1.
2024-08-02 07:46:54 -04:00
Bernd Schoolmann
1184c504d1
[PM-6296] Fix biometrics error prompt when biometrics are temporarily unavailable in browser extension (#9851)
* Add availability check to biometrics

* Move isbiometricunlockavailable logic to parent component

* Fix availability detection on desktop

* FIx response parsing on browser

* Suppress pending biometric message while checking for availability

* Refactor biometrics functions out of platformutilsservice

* Remove unused constructor

* Remove unused abstract function definitions

* Rename abstract services

* Add documentation

* Rename service abstraction, add comments

* Add comments

* Refactor browser biometrics into background/foreground and remove callbacks

* Remove unused logs

* Remove unused logs
2024-08-02 12:31:11 +02:00
Cesar Gonzalez
86acca3bec
[PM-10079] Add keyboard shortcut to autofill identity and credit cards (#10254)
* [BEEEP] Autofill Identity and Card Ciphers From Keyboard Shortcut

* [PM-10079] Add keyboard shortcut to autofill identity and credit card ciphers

* [PM-10079] Fixing jest tests

* [PM-10079] Added an enum for the autofill commands, and adjusted how we filter out cipher types before sorting them by last used when calling for ID and card ciphers

* [PM-10079] Updating copywriting for the autofill settings revolving around keyboard shortcuts

* [PM-10079] Setting a method within CipherService as private
2024-07-31 12:52:04 -05:00
Jared Snider
ea72552599
Auth/PM-7077 - Browser Extension - UI Refresh - Account Switcher Component (#10268)
* PM-7077 - (1) Convert app-header to standalone (2) Convert account-switcher to standalone (3) Start wiring up extension refresh feature flag and fixing deps.

* PM-7077 WIP

* PM-7077 - Mostly get account switcher and account component converted to CL components.

* PM-7077 - Apply semibold classes to section headers to match storybook

* PM-7077 - AccountSwitcher - (1) Fix margin per design call (2) Add missing lockAll call

* PM-7077 - Remove test code.
2024-07-29 12:57:54 -04:00
renovate[bot]
b9eb4003a1
[deps] Autofill: Update prettier to v3.3.3 (#10228)
* [deps] Autofill: Update prettier to v3.3.3

* prettier formatting changes

* fix SyntaxError for literal @ inline html

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2024-07-25 11:11:55 -04:00
Will Martin
4d3026d2ea
[CL-334] transparent popup-header (#10242)
* add background input to popup header; update styles; update stories
2024-07-24 17:35:57 -04:00
Victoria League
5a2db79235
[CL-305] Allow margin to be disabled for elements at the bottom of a page (#10132) 2024-07-24 12:08:33 -04:00
Nick Krantz
26a3f6b8ec
[PM-8602-8603] Sticky search & filters (#9846)
* add "above-scroll-area" to popup page so that content can be excluded from the scroll area

* move filters and search above the scrollable area

* move bottom border to popup-page component

* fix duplicate scrollbar on popup page

* update padding to match popup header

* move all content of the popup page within the `main` element

* update documentation for `above-scroll-area` slot

* hide scrollable content when loading
2024-07-23 21:07:03 -05:00
Matt Gibson
5b5c165e10
[PM-8847] Delay browser local storage operations during reseed (#9536)
* Define matchers to test promise fulfillment

These are useful for validating that promises depend on other events prior to fulfilling.

* Expose custom matchers to jest projects

Team-specific projects are not touched here to try and reduce review burden.

* Block browser local operations awaiting reseed

This should closes a narrow race condition resulting from storage operations during a reseed event.

* Import from barrel file

This might fix the failing test, but I'm not sure _why_

* Document helper methods

* Validate as few properties as possible per test

* Simplify expected value representation

* Allow waiting in promise matchers

* Specify resolution times in promise orchestration tests.

* Test behavior triggering multiple reseeds.

* Fix typo

* Avoid testing implementation details

* Clear reseed on startup

in case a previous process was aborted in the middle of a reseed.

* Correct formatting
2024-07-19 16:12:29 -04:00
Victoria League
154f15fa58
[CL-285] Add default loading state to popup-page (#10040) 2024-07-15 14:29:58 -04:00
Cesar Gonzalez
974162b1a4
[PM-6426] Create TaskSchedulerService and update long lived timeouts in the extension to leverage the new service (#8566)
* [PM-6426] Create TaskSchedulerService and update usage of long lived timeouts

* [PM-6426] Implementing nextSync timeout using TaskScheduler

* [PM-6426] Implementing systemClearClipboard using TaskScheduler

* [PM-6426] Fixing race condition with setting/unsetting active alarms

* [PM-6426] Implementing clear clipboard call on generatePasswordToClipboard with the TaskSchedulerService

* [PM-6426] Implementing abortTimeout for Fido2ClientService using TaskSchedulerService

* [PM-6426] Implementing reconnect timer timeout for NotificationService using the TaskSchedulerService

* [PM-6426] Implementing reconnect timer timeout for NotificationService using the TaskSchedulerService

* [PM-6426] Implementing sessionTimeout for LoginStrategyService using TaskSchedulerService

* [PM-6426] Implementing eventUploadInterval using TaskScheduler

* [PM-6426] Adding jest tests for the base TaskSchedulerService class

* [PM-6426] Updating jest tests for GeneratePasswordToClipboardCommand

* [PM-6426] Setting up the full sync process as an interval rather than a timeout

* [PM-6426] Renaming the scheduleNextSync alarm name

* [PM-6426] Fixing dependency references in services.module.ts

* [PM-6426] Adding jest tests for added BrowserApi methods

* [PM-6426] Refactoring small detail for how we identify the clear clipboard timeout in SystemService

* [PM-6426] Ensuring that we await clearing an established scheduled task for the notification service

* [PM-6426] Changing the name of the state definition for the TaskScheduler

* [PM-6426] Implementing jest tests for the BrowserTaskSchedulerService

* [PM-6426] Implementing jest tests for the BrowserTaskSchedulerService

* [PM-6426] Adding jest tests for the base TaskSchedulerService class

* [PM-6426] Finalizing jest tests for BrowserTaskScheduler class

* [PM-6426] Finalizing documentation on BrowserTaskSchedulerService

* [PM-6426] Fixing jest test for LoginStrategyService

* [PM-6426] Implementing compatibility for the browser.alarms api

* [PM-6426] Fixing how we check for the browser alarms api

* [PM-6426] Adding jest tests to the BrowserApi implementation

* [PM-6426] Aligning the implementation with our code guidelines for Angular components

* [PM-6426] Fixing jest tests and lint errors

* [PM-6426] Moving alarms api calls out of BrowserApi and structuring them within the BrowserTaskSchedulerService

* [PM-6426] Reworking implementation to register handlers separately from the call to those handlers

* [PM-6426] Adjusting how we register the fullSync scheduled task

* [PM-6426] Implementing approach for incorporating the user UUID when setting task handlers

* [PM-6426] Attempting to re-work implementation to facilitate userId-spcific alarms

* [PM-6426] Refactoring smaller details of the implementation

* [PM-6426] Working through the details of the implementation and setting up final refinments

* [PM-6426] Fixing some issues surrounding duplicate alarms triggering

* [PM-6426] Adjusting name for generate password to clipboard command task name

* [PM-6426] Fixing generate password to clipboard command jest tests

* [PM-6426] Working through jest tests and implementing a method to guard against setting a task without having a registered callback

* [PM-6426] Working through jest tests and implementing a method to guard against setting a task without having a registered callback

* [PM-6426] Implementing methodology for having a fallback to setTimeout if the browser context is lost in some manner

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Working through jest tests

* [PM-6426] Finalizing stepped setInterval implementation

* [PM-6426] Implementing Jest tests for DefaultTaskSchedulerService

* [PM-6426] Adjusting jest tests

* [PM-6426] Adjusting jest tests

* [PM-6426] Adjusting jest tests

* [PM-6426] Fixing issues identified in code review

* [PM-6426] Fixing issues identified in code review

* [PM-6426] Removing user-based alarms and fixing an issue found with setting steppedd alarm interavals

* [PM-6426] Removing user-based alarms and fixing an issue found with setting steppedd alarm interavals

* [PM-6426] Fixing issue with typing information on a test

* [PM-6426] Using the getUpperBoundDelayInMinutes method to handle setting stepped alarms and setTimeout fallbacks

* [PM-6426] Removing the potential for the TaskScheduler to be optional

* [PM-6426] Reworking implementation to leverage subscription based deregistration of alarms

* [PM-6426] Fixing jest tests

* [PM-6426] Implementing foreground and background task scheduler services to avoid duplication of task scheudlers and to have the background setup as a fallback to the poopup tasks

* [PM-6426] Implementing foreground and background task scheduler services to avoid duplication of task scheudlers and to have the background setup as a fallback to the poopup tasks

* [PM-6426] Merging main into branch

* [PM-6426] Fixing issues with the CLI Service Container implementation

* [PM-6426] Reworking swallowed promises to contain a catch statement allow us to debug potential issues with registrations of alarms

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adding jest tests to the ForegroundTaskSchedulerService and the BackgroundTaskSchedulerService

* [PM-6426] Adjusting implementation based on code review feedback

* [PM-6426] Reworking file structure

* [PM-6426] Reworking file structure

* [PM-6426] Adding comments to provide clarity on how the login strategy cache experiation state is used

* [PM-6426] Catching and logging erorrs that appear from methods that return a promise within VaultTimeoutService
2024-07-15 10:32:30 -05:00
Jason Ng
6d6785297b
[PM-7161] browser v2 view container (#9723)
* Build new view-v2 component and reusable view sections. Custom Fields, Item Details, Attachments, Additional Info,  Item History
2024-07-10 00:11:51 -04:00
Justin Baur
053e255a68
Delete Unused Bits of StateService (#9858)
* Delete Unused Bits of StateService

* Fix Tests
2024-07-08 20:38:10 -04:00
Will Martin
8df054cf51
[CL-319] custom back action in popup header component (#9829)
* expose FunctionReturningAwaitable from CL lib

* expose backAction as input on popup header component
2024-06-25 15:55:49 -04:00
Cesar Gonzalez
3b0005b48c
[PM-8518] Autofill scripts do not inject into sub frames on install (#9459)
* [PM-8518] Autofill scripts do not inject into sub-frames on install

* [PM-8518] Implementing jest tests for added BrowserApi methods

* [PM-8518] Adding generic typing to tabSendMessage call
2024-06-11 15:50:03 -05:00
Will Martin
472a7a9d4d
[CL-302] respect bottom padding in scrollable popup-layout (#9514) 2024-06-05 17:17:24 -04:00
Victoria League
d3f1992ad5
[CL-294] Make section-header work across clients (#9386) 2024-06-05 15:07:00 -04:00
Cesar Gonzalez
f79d1dac92
[PM-8480] Rename ambiguous Jest testing method (#9417) 2024-05-30 08:39:19 -05:00