1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-19 07:35:48 +02:00
Commit Graph

1089 Commits

Author SHA1 Message Date
Kyle Spearrin
91c61aea58
fix org getter on import and export warning dialog (#238) 2020-12-22 16:14:22 -05:00
Oscar Hinton
573eea66ee
Add support for Emergency Access (#204)
* Add support for Emergency Access

* Resolve review comments
2020-12-22 10:53:48 -05:00
Chad Scharf
12321e53b9
fix lint error, missing semicolon; (#236) 2020-12-21 14:24:04 -05:00
Oscar Hinton
1742228715
Make fingerprint optional for browser integration (#234)
* Make fingerprint optional for browser integration

* Force focus on biometrics

* Add dependency
2020-12-21 13:26:16 -05:00
Matt Gibson
acdbc22953
Force update of tray menu if on linux (#233) 2020-12-18 09:20:59 -06:00
Oscar Hinton
f9042408f4
Prevent reloading browser extension when using biometric (#230) 2020-12-16 16:07:15 -05:00
Matt Gibson
697e755c0f
Add missing event type from server (#231) 2020-12-16 15:04:05 -06:00
Chad Scharf
ceb78d054c
Linter build fix (#228)
Added comments to empty function block for CLI (doesn't have a "system theme" like other clients) to make linter happy.
2020-12-15 19:16:22 -05:00
Matt Gibson
75ca9f9c13
Move share button to view page (#229)
It is not possible to edit and share at the same time. Browser extension
currently utilizes this layout and it is confusing. This change is in
conjunction with altering that UI.
2020-12-15 17:49:51 -06:00
Sorin Davidoi
58f5369adc
feat(platform-utils): Get and react to changes to the system theme (#161)
These changes will allow the WebExtension (and later the desktop application) to respect the system theme.

I've added the Electron implementation until I realized that the required API [has been implemented but not released yet](https://www.electronjs.org/docs/api/native-theme/history). Let me know if you I should remove the code.

Part of https://github.com/bitwarden/browser/issues/1256.

https://www.electronjs.org/docs/api/native-theme

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
2020-12-15 17:22:24 -05:00
Cedric Wille
f7d8887304
Add verification for password hint - the hint should not equal the password for security reasons (#194) 2020-12-15 16:04:48 -05:00
Oscar Hinton
d7b5f0a26b
Avoid destroying the tray icon in linux (#227) 2020-12-15 15:26:51 -05:00
Matt Gibson
cc801ce0d7
Has Totp method will be used to enable quick copy (#225) 2020-12-15 10:02:54 -06:00
Matt Gibson
2c414ce27a
Use log service for console messages (#221)
* Use logService for console messages

* Implement a base ConsoleLog service

Use this class as a default for other services that would like to output
to console. This service is overriden in CLI and Desktop to use CLI's
consoleLogService and electronLogService, respectively.

* Use browser-process-hrtime for timing

* test LogService implementations

* Ignore default import of hrtime

* Clean up imports. Require ConsoleLog injection

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-11 10:44:57 -06:00
Oscar Hinton
63fe38b3f4
Fix dock icon not working when minimized to menu bar, fix window listeners not working after closing the main window (#223) 2020-12-11 09:46:20 -05:00
Matt Gibson
ecf1edfb3e
Specify to 2fa we're coming from sso (#218)
This will allow for closing of 2fa window to optionally alter behavior
for 2fa logins

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-09 15:30:29 -06:00
Matt Gibson
72bf18f369
Fix 1password importer (#222)
* Change cipher type based on csv type header

* Test identity and credit card import

* Do not use node 'fs' module

Karma is being used for automated tests so node modules are not available

* WIP: mac and windows 1password importer split

Need to improve windows field identification to limit secret data
exposure and improve user experience

* Hide fields with likely secret values

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-08 11:29:57 -06:00
Vincent Salucci
2d62e10d98
[Policy] Personal Ownership (#213)
* Initial commit of personal ownership enforcement

* Updated policy type enum

* Sync'd eventType for Policy_Updated with server enum value

* Added policyId to eventResponse model

* Removed explicit typing
2020-12-08 10:10:15 -06:00
Kyle Spearrin
dcbd09e736
encrypted import for bitwarden json (#220) 2020-12-04 21:05:11 -05:00
Matt Gibson
2b8c2c2b3e
Revert "Use logService for console messages (#214)" (#219)
This reverts commit 0fed528b6f.
2020-12-04 13:58:32 -06:00
Matt Gibson
0fed528b6f
Use logService for console messages (#214)
* Use logService for console messages

* linter autofixes

* Use full import path

* Implement a base ConsoleLog service

Use this class as a default for other services that would like to output
to console. This service is overriden in CLI and Desktop to use CLI's
consoleLogService and electronLogService, respectively.

* linter fixes

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-04 12:38:26 -06:00
Matt Gibson
6fb0646481
Fix 1password importer (#217)
* Fix import of 1password csv

* 1password is using '\' as a quote escape character.

* 1password's csv headers are sometimes capitalized. We want to identify
them case insensitively

* Change cipher type based on csv type header

* Translate 1password data to correct fields

* Test identity and credit card import

* linter fixes

* Do not use node 'fs' module

Karma is being used for automated tests so node modules are not available

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-04 12:29:31 -06:00
Oscar Hinton
c9df039fa9
Desktop fit & finish (#212)
* Add context menu on right click to mac

* Add hide dock setting

* Change "hide dock" to "always show dock"

* Add support on mac for minimize to menu bar on close, minimize or start

* Add "openAtLogin" to ElectronConstants

* Add "restoreFromTray" to TrayMainService
2020-12-04 12:21:34 -05:00
Addison Beck
0565d6f667
Implemented tax collection for subscriptions (#215) 2020-12-04 12:05:31 -05:00
Kyle Spearrin
93a3053f54
support for encrypted json export (#216)
* support for encrypted json export

* adjust filename prefix for encrypted formats

* flip if logic

* remove format param from encrypted export

* encryptedFormat getter
2020-12-03 15:20:38 -05:00
Chad Scharf
abb54f0073
Add normalized state compare for CLI (#211) 2020-11-23 16:45:09 -05:00
Chad Scharf
ea6fd5ac38
Update SSO component to parse state for comparison (#210)
* Update sso component to parse state for comparison

* No more truthy or dare

* fix lint errors for ===
2020-11-23 16:12:28 -05:00
Chad Scharf
0a73b6fca8
Fix lint error (#209) 2020-11-23 12:21:45 -05:00
Fredrik Ekre
adcc618b42
sync: move try-catch out of needsSyncing and handle errors it in fullSync (#207)
The motivation for this is https://github.com/bitwarden/cli/issues/129
where failed sync's are swallowed by try-catch. By moving the try-catch
to the outside it is possible to reuse the already existing
allowThrowOnError argument which callers can use to signal whether
fullSync should throw or ignore errors silently. This patch is
companioned with a patch to the SyncCommand CLI command to pass
allowThrowOnError.
2020-11-23 12:09:09 -05:00
Matt Gibson
cd6b3d47c2
Include revision date in cipher requests (#203)
This is in conjunction with API changes that validates the last known
revision date provided here with the actual last revision date on the
server to block potential data loss due to client desyncs.

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-11-23 08:48:40 -06:00
Vincent Salucci
d9d13bbf0e
Update success route before navigate action (#208) 2020-11-22 08:46:56 -06:00
Oscar Hinton
9e4d000b4d
Browser <-> desktop communication (#185)
* Add electron constant for browser integration

* Add constant for browser biometrics. Ensure biometry is locked on lock.

* Avoid saving keys outside desktop

* Fix eslint warning

* Add supportsSecureStorage helper to platformUtils to improve readability
2020-11-18 16:10:57 -05:00
Kyle Spearrin
f44e99d74d
sr lang (#206) 2020-11-18 15:58:12 -05:00
Kyle Spearrin
6563dccf3b
send service and syncing send data (#205)
* send service and syncing send data

* Update send.service.ts
2020-11-18 13:56:41 -05:00
Addison Beck
79b856cb6e
Implement User-based API Keys (#197)
* Added support for authenticating with an API key

* added api service methods for user api keys

* fixed a copy/pasted api endpoint url

* Let toIdentityToken() use a a prestored client_id in place of the application client_id if one exists

* Allowed for api key auth in the cli

* Removed some commented out code commited for apiKey auth

* Cleanup for ApiKey auth in the CLI

* Removed cli prefix from client_crendential auth types

* Removed ClientPrefix conditional from decoded token getters

* Update src/services/api.service.ts

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>

* formatting

* changed command from login --apiKey to login --apikey

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-11-10 15:15:40 -05:00
Chad Scharf
9aa3cbf73d
Turned off background throttling for browserWindow (#196) 2020-11-04 12:21:29 -05:00
Chad Scharf
6e89c04f3e
Added missing member, showValue to Field (#195) 2020-11-03 14:36:19 -05:00
Kyle Spearrin
0e9e73ce95
Some groundwork for Send (#192)
* send work

* New method to update the last used index (#184)

Instead of updating it every time you call getNext(), it will be updated in a separate call, to avoid updating the index when the cipher did not auto-fill correctly (e.g wrong frame)
Fixes #1392

* added OnlyOrg to PolicyType enum (#183)

* [Require SSO] Add policy type enumeration (#186)

* Added SsoAuthentication policy type

* Updated policy type name // added comments for clarification of what each type controls

* [SSO] New user provision flow (#173)

* Initial commit of new user sso flow

* Adjusted stateSplit conditional per review

* Add logging to lowdb storage service (#188)

* Fix lint errors/warnings (#187)

* remove password api

* access id

* makeSendKey

Co-authored-by: Josep Marí <xusoo@users.noreply.github.com>
Co-authored-by: Addison Beck <abeck@bitwarden.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
2020-11-02 15:58:18 -05:00
Vincent Salucci
5e50aa1a19
Added terms/privacy variables & logic (#193) 2020-11-02 12:50:58 -06:00
Kyle Spearrin
8cb5a9f505
hkdf crypto functions (#190)
* hkdf crypto functions

* comment to spec
2020-10-29 15:52:12 -04:00
Addison Beck
76c09641ba
changed OnlyOrg enum to be SingleOrg (#189) 2020-10-26 16:01:17 -04:00
Chad Scharf
23ded0d115
Fix lint errors/warnings (#187) 2020-10-20 10:20:22 -04:00
Chad Scharf
4cd20f0fa8
Add logging to lowdb storage service (#188) 2020-10-20 09:33:30 -04:00
Vincent Salucci
d84d6da7f7
[SSO] New user provision flow (#173)
* Initial commit of new user sso flow

* Adjusted stateSplit conditional per review
2020-10-13 15:21:03 -05:00
Vincent Salucci
595215a9da
[Require SSO] Add policy type enumeration (#186)
* Added SsoAuthentication policy type

* Updated policy type name // added comments for clarification of what each type controls
2020-10-13 12:06:51 -05:00
Addison Beck
9e9795fd85
added OnlyOrg to PolicyType enum (#183) 2020-10-12 11:54:20 -04:00
Josep Marí
685636b129
New method to update the last used index (#184)
Instead of updating it every time you call getNext(), it will be updated in a separate call, to avoid updating the index when the cipher did not auto-fill correctly (e.g wrong frame)
Fixes #1392
2020-10-09 07:30:55 -04:00
Kyle Spearrin
9216a8ead7
pre-create and chmod 600 data file (#182) 2020-10-01 14:13:51 -04:00
Matthew Rodatus
3628f44f98
Add Microsoft RDP URI schemes (#180)
This will allow users to launch the Remote Desktop client directly from
Bitwarden if their OS supports the URI scheme.

Per
https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-uri,
rdp:// is legacy and ms-rd: is the preferred one. I'm adding both so
that either can be used as ms-rd: is not available on all versions of
Windows and rdp:// is easier to add as a custom URI scheme in Windows 10
if it is desired.
2020-09-24 09:56:59 -04:00
Addison Beck
b5cc5409ff
bug fix + added launch time to view component (#178) 2020-09-23 13:53:43 -04:00
Addison Beck
26d40d4c43
Add login launch data (#174)
* added launch time data to CipherView for autofill

* removed unused code

* fixed linter errors
2020-09-23 12:41:25 -04:00
Kyle Spearrin
5cb3e9c965
implement launchUri function (#177) 2020-09-23 11:49:16 -04:00
Matt Portune
2ea1f8484f
hide bio unlock option when logging in with sso (#176) 2020-09-23 10:35:26 -04:00
Chad Scharf
5c6c3a8b0a
Fixed web vault URL reference for SSO launch (#175) 2020-09-23 10:18:14 -04:00
Kyle Spearrin
f0dc38b1c4
update languages (#172)
* update languages

* fix lint error
2020-09-21 11:17:48 -04:00
vachan-maker
5c3e337fb1
Added locale name(ml) (#171)
I have no clue if what I did was correct. If it is not, please try to display the locale name. Thanks
2020-09-21 08:09:10 -04:00
Kyle Spearrin
3bf322a904 support defaultMatch for getAllDecryptedForUrl 2020-09-20 09:47:35 -04:00
Kyle Spearrin
0a20face13
check authed before checking if token has premium (#170) 2020-09-18 15:02:49 -04:00
Chad Scharf
27bcbf4b41
Conditional load of biometrics API on Win10+ (#169)
* Conditional load of biometrics API on Win10+

* consolidate if block

* Return -1 instead of null
2020-09-17 15:36:11 -04:00
Chad Scharf
5e0a2d1d99
remove old Edge browser hacks (#168)
* remove old Edge browser hacks

* Remove final edge hacks

* Update constructor parameters

* Update search-ciphers.pipe.ts

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-09-15 10:23:21 -04:00
Chad Scharf
fa2b8e834b
Wrap sso login with pre-validation check (#160)
* Wrap sso login with pre-validation check

* Add form promise for SSO preValidate

* Removed boolean variable, .catch()
2020-09-08 10:36:22 -04:00
Addison Beck
0bff8bcd56
changed the way we load planResponse objects in organizationResponse objects (#167) 2020-09-08 09:17:04 -04:00
Addison Beck
4745c24695
reverted codeVerifier length back to 64 (#166) 2020-09-04 16:01:54 -04:00
Addison Beck
cc12e58ac5
updated sso password string to be 32 characters (#164) 2020-09-04 14:08:18 -04:00
Kyle Spearrin
bffec57e02
change to environmentService.getWebVaultUrl (#162) 2020-09-03 10:35:24 -04:00
Kyle Spearrin
700e945008 reduce cache ttl to 3 seconds 2020-08-27 14:58:37 -04:00
Vincent Salucci
42d5784ef3
[SSO] Set Password flow sync (#159)
* Added sync service to set-password // Added error for CLI in set-password flow

* Updated error string // added sync tracking boolean

* VS code failed to saved latest change - resaving false loading
2020-08-27 13:24:38 -05:00
Addison Beck
e07526a1b6
Link existing user to sso (#158)
* facilite linking an existing user to an org sso

* fixed a broken import

* added ssoBound and identifier to an org model

* added user identifier to sso callout url

* changed url for delete sso user api method

* facilite linking an existing user to an org sso

* fixed a broken import

* added ssoBound and identifier to an org model

* added user identifier to sso callout url

* changed url for delete sso user api method

* added a token to the existing user sso link flow

* facilite linking an existing user to an org sso

* fixed a broken import

* facilite linking an existing user to an org sso

* fixed a broken import

* added ssoBound and identifier to an org model

* added user identifier to sso callout url

* changed url for delete sso user api method

* added a token to the existing user sso link flow

* facilite linking an existing user to an org sso

* fixed a broken import

* removed an extra line

* encoded the user identifier on sso link

* code review cleanup for link sso

* removed a blank line
2020-08-27 11:00:05 -04:00
Vincent Salucci
8f27110754
[SSO] Bug - Fixed set password route (#156)
* Fixed 2fa + set password bug// moved query params parsing in shared lib

* Removed unnecessary params parse // added auth result conditional for success route
2020-08-26 10:54:16 -05:00
Kyle Spearrin
e55528e617
adds support for yoti csv importer (#157) 2020-08-24 12:21:17 -04:00
Vincent Salucci
6ab444a986
Updated depdency chain -> end result to allieviate issues in directory connector (#155) 2020-08-21 12:25:33 -05:00
Kyle Spearrin
5d874d07b3
abstract set password component to jslib (#153) 2020-08-19 10:57:35 -04:00
Kyle Spearrin
9957125d3a
dont set keys if not there on sso (#152)
* dont set keys if not there on sso

* a comment
2020-08-17 14:27:44 -04:00
Oscar Hinton
8fe78916e2
Upgrade Angular to 9 (#151)
* Upgrade Angular to 8

* Upgrade Angular to 9

* Fix format

* Add ordered-imports tslint rule

* Upgrade Angular CDK to 9.2.4
2020-08-17 12:14:40 -04:00
Kyle Spearrin
7bf00b4fb3
extend functionality for set password flow (#150) 2020-08-17 10:34:52 -04:00
Kyle Spearrin
ed6978baff
add support for org identifier to api models (#149) 2020-08-12 16:38:32 -04:00
Josep Marí
5c62938dbb
Add new method for cycling through every login (#142)
* Add new method for cycling through every login

To be used from browser extension when autofilling.
Related PR: https://github.com/bitwarden/browser/pull/956

* Cache sorted ciphers by URL and invalidate them after a period of 5 seconds

* Move file to models
2020-08-12 15:59:59 -04:00
Oscar Hinton
e516692559
Upgrade TypeScript (#148)
* Update typescript to 3.6.5 along with tslint to latest.

* Upgrade @types/node to 12.12.54 to get rid of compile errors.

* Update tslint.

* Use @types/node 10.17.28 instead
2020-08-12 15:42:42 -04:00
Addison Beck
b32b016f82
Merge plan and price updates (#145)
* Created a PlanResponse model & relevant API request for getting plan data from the server
2020-08-11 14:20:39 -04:00
Addison Beck
420393700b
Misc jslib cleanups (#146)
Fixed on import parameter type on login.component and added a deprecation warning to the index.ts in abstractions
2020-08-11 10:47:30 -04:00
Vincent Salucci
7c3a9d61e6
[SSO] Login - added launchSsoBrowser method (#144)
* Added launchSsoBrowser method

* Updated let -> const

* Saved state/verifier to storage
2020-08-10 08:38:31 -05:00
Chad Scharf
7c0c06705e
added try-catch around ext module calls (#143) 2020-08-06 12:27:49 -04:00
Kyle Spearrin
1513b25a35
callbacks for argv from window main (#141) 2020-08-05 10:53:26 -04:00
Addison Beck
31a0be290b
Merge pull request #130 from bitwarden/Feature.Web.534.AllowMultiSelectInOrgVault
Set up API calls for bulk delete from within an org vault
2020-08-04 16:02:20 -05:00
Kyle Spearrin
14b01f2e5d null check vaulttimeoutservice 2020-08-04 09:17:25 -04:00
Kyle Spearrin
bc31867e1a allow login command clientid from ctor 2020-08-04 08:50:13 -04:00
Addison Beck
e778735ac4 moved some logic back to web project for cipher selection 2020-08-03 22:24:06 -04:00
Addison Beck
144f06a115 added org id to the bulk delete request model 2020-08-03 22:24:06 -04:00
Addison Beck
1cb59b5cc7 added api service methods for delete many w/admin calls 2020-08-03 22:24:06 -04:00
Addison Beck
f0411d0240 broke up a long line 2020-08-03 22:24:06 -04:00
Addison Beck
5d93c84ae6 removed leaky code 2020-08-03 22:24:06 -04:00
Addison Beck
44903ef807 moved some cipher selection logic to base component 2020-08-03 22:24:06 -04:00
Addison Beck
36012e7d6f changed let to const 2020-08-03 22:24:06 -04:00
Addison Beck
88765ad093 yet another formatting issue 2020-08-03 22:24:06 -04:00
Addison Beck
f86c7e9c3f fixed a formatting issue 2020-08-03 22:24:06 -04:00
Addison Beck
f7058303f3 fix a formatting issue 2020-08-03 22:24:06 -04:00
Addison Beck
573f8283df Removed an extra line 2020-08-03 22:24:06 -04:00
Addison Beck
272ce2330c Added custom field consideration to basic search function 2020-08-03 22:24:06 -04:00
Kyle Spearrin
7d49902eea
SSO login for generic clients and CLI (#140)
* sso

* move break into try block

* make client id dynamic

* clientId is a string, DOH!

* reject if port not available

* lint fixes
2020-08-03 15:24:26 -04:00
Chad Scharf
101c5688c4
Merge pull request #138 from bitwarden/fix/desktop/495-try-catch-require-nodert
try catch nodeRT module via require
2020-08-01 16:28:41 -04:00