Commit Graph

284 Commits

Author SHA1 Message Date
Matt Gibson a5ccca05da
Fix mistake and clarify api method name (#347) 2021-04-20 14:59:51 -05:00
Oscar Hinton 372e139810
Password reprompt (#343)
Add support for password reprompt on cipher items
2021-04-15 16:14:33 +02:00
Thomas Rittson 66eec2b022
Use sync instead of token to manage emailVerified (#344) 2021-04-15 07:00:49 +10:00
Oscar Hinton 92df633040
Remove last remnants of old analytics code (#345) 2021-04-14 21:34:30 +02:00
Matt Gibson 0a0cdaa7fd
Fix cipher upload (#346)
* Upload correct data array

* Require BufferArray Encryption for upload to server

The CipherArrayBuffer tiny type is only created by CryptoService
and required by all upload methods

* Add test for attachment upload encryption
2021-04-14 10:47:10 -05:00
Oscar Hinton 78d40d9f18
Remove electron remote (#332)
* Replace remote calls with ipcRenderer.invoke.
2021-04-07 19:42:06 +02:00
Matt Gibson bc7bd5bd3f
Pass ciphers to index and indexed ciphers to search service (#318) 2021-04-02 16:32:30 -05:00
Vincent Salucci f4f00b1eb2
[Reset Password] Enrollment API, event type, and models update (#315) 2021-03-31 11:05:09 -05:00
Matt Gibson afac694e9a
Attachment azure upload blobs (#312)
* Add direct attachment download and upload API endpoints

* Use direct download method

Enable download of emergency access attachments through EmergencyAccessId

* Match new Server model items

* New Server model for creating attachments.

Provides a url to upload data to, the type of upload, and the Cipher Response expected by the previous call

* Use direct upload url and scheme

* Report Failed single shot azure uploads

* Add cipher attachment upload to file upload service

* Deprecate legacy api methods

* Handle old servers missing new upload api methods

* Improve Send error handling

* Fallback attachment downloads on new endpoint not found

Limit upload size to the new 500MB

* Improve error handling

* lint fixes
2021-03-26 16:57:07 -05:00
Matt Gibson cfc7687815
Upload to Azure strorage blobs (#296)
* Implemen AzureStorageService

handes uploading files to azure blob

* Correct one-shot size

* Add azureStorage.service abstraction

* Rename azure upload method

* Prefer abstractions in DI

* Abstract file upload to a single service handling uploads

* Fallback to legacy upload method

* Linter fix

* Limit legacy upload to 404 error
2021-03-25 10:20:38 -05:00
Oscar Hinton f20af0cd7c
WebAuthn (#163) 2021-03-15 16:16:51 +01:00
Thomas Rittson 8328b55774
Expand encrypted export warning (#294)
* Allow html body in showDialog

* Add extra warnings about encrypted export
2021-03-04 11:15:51 -05:00
Matt Gibson 1324416784
Direct download for send (#288)
* Allow for responding with time-limited download URL

* Re-verify access on download link request
2021-03-01 15:03:04 -06:00
Thomas Rittson d376927e5e
Improved handling of grantor access to organizations after takeover (refactored) (#267)
* Revert "Add policy property to TakeoverResponse"

This reverts commit 31da5081e6833cf8a9d5bb869c14600f25ca3f39.

* Add getEmergencyGrantorPolicies to api service
2021-02-10 09:06:18 +10:00
Matt Gibson 09c444ddd4
Add send to cli (#253)
* Upgrade commander to 7.0.0

* Add url to Api call

This is needed to allow access to sends that are available from a
different Bitwarden server than configured for the CLI

* Allow upload of send files from CLI

* Allow send search by accessId

* Utils methods used in Send CLI implementation

* Revert adding string type to encrypted file data

* linter fixes

* Add Buffer to ArrayBuffer used in CLI send implementation
2021-01-29 15:08:52 -06:00
Matt Gibson e1f1d7e702
Enable search for sends (#249) 2021-01-22 19:54:22 -06:00
Addison Beck 68bd93e45b
added Send sync notification support (#250) 2021-01-22 16:52:08 -05:00
Matt Gibson cea09a22e5
Update revision date upon cipher restore (#243)
* Update revision date upon cipher restore

* Receive and use returned datetimes from restore
2021-01-08 08:53:41 -06:00
Kyle Spearrin afa01f67f4
send removePasswordWithServer and model updates (#242) 2020-12-30 16:23:52 -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
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
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
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
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
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
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 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
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
Kyle Spearrin 8cb5a9f505
hkdf crypto functions (#190)
* hkdf crypto functions

* comment to spec
2020-10-29 15:52:12 -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
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 3bf322a904 support defaultMatch for getAllDecryptedForUrl 2020-09-20 09:47:35 -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 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
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
Addison Beck 1cb59b5cc7 added api service methods for delete many w/admin calls 2020-08-03 22:24:06 -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
Vincent Salucci f301b92dc3
[SSO] Merge feature/sso into master (#139)
* [SSO] Reset Master Password (#134)

* Initial commit of reset master password (sso)

* Updated line length error

* Updated import line again

* Added trailing comma

* restored reference data for RegisterRequest

* Updated tracking boolean name // added success route update based on passed boolean

* Added new API // reverted Register // deleted reset // added change pw and sso

* Changed redirect URI to protected to override in sub-class

* Updated api to setPassword // Updated request model name // Updated change password refs // Updated formatting

* Encoded necessary parts of authorize url // Added default catch error message

* Refactored methods inside change password base component // removed unnecesary query param for sso

* [lint] Fixed error (#137)

* Cleaned lint error

* Fixed sso lint error
2020-08-01 08:42:24 -05:00
Chad Scharf b2fbc475c7 try catch nodeRT module via require 2020-07-31 19:42:13 -04:00
Kyle Spearrin 261a20031f
suth service support for complete sso login (#136) 2020-07-31 11:55:14 -04:00
Oscar Hinton c62f5287cd
Desktop biometrics support (#119)
* Initial work on windows hello support

* Switch to use windows.security.credentials.ui UserConsentVerifier

* Fix linting warnings

* Remove unessesary supportsBiometric from lock screen

* Rename biometric.main to windows.biometric.main. Add abstraction for biometric.

* Add support for dynamic biometric text.

* Add untested darwin implementation

* Rename fingerprintUnlock to biometric

* Add new functions to cliPlatformUtils.service.ts.

* Hide login if biometric is not supported

* Export default for biometric.*.main.ts

* Remove @nodert-win10-rs4/windows.security.credentials

* Add build requirements to readme

* Auto prompt biometric when starting the application.

* Ensure we support biometric before trying to auto prompt.

* Fix review comments and linting errors
2020-07-23 13:32:20 -04:00
Kyle Spearrin fefef546f0
sso support (#127)
* support for sso

* created master password boolean

* resetMasterPassword flows

* throw on bad ctor for token request
2020-07-16 08:59:29 -04:00
Chad Scharf 7fd52c62f3
Merge pull request #115 from bitwarden/feature/tax-info-collection
Support tax collection info
2020-06-17 10:50:14 -04:00