Commit Graph

200 Commits

Author SHA1 Message Date
Federico Maccaroni f8a7eb4c94
Add Share app Extension on iOS for Send (re-PR) (#1660)
* WIP Add Share app extension on iOS for Send

* Added Share app extension on iOS for Send and some code fixes as well

* Updated iOS csprojs configs to linkskip the new extension project and also added AdHoc and AppStore configurations to iOS.ShareExtension.csproj

* Code clean up and transformed bundle resources into links to the already used pngs of the main iOS project on ShareExtension

* Updated build.yml to include provisioning profile for iOS Share extension

* Adding in the missing provisioning profile

* Removed .DS_Store from the iOS.ShareExtension csproj Resources

* switching out the share extension profile

* Added Share extension provisioning profile configuration on export options app store for github and also removed custom info.plist config for localhost which is not necessary

* Moved property so that it's grouped with the full ones

* Added AppCenter Crashes package to Core and updated FireAndForget Task Extension

* Updated bundle reference of FontAwesome.ttf to bwi-font.ttf in order for it to compile on ShareExtension

Co-authored-by: Joseph Flinn <joseph.s.flinn@gmail.com>
Co-authored-by: Álison Fernandes <vvolkgang@users.noreply.github.com>
2022-01-25 17:41:56 -03:00
Federico Maccaroni 4e7ceaf5b5
Account Deletion on SSO with CME (#1721)
* WIP Added Verification Code page and a verification flow helper to coordinate things

* Improved Verification Code page verification flow helper and fix some issues, also added flag ApiService to choose whether to logout on Unanuthorized

* Improved Verification Code page UI/UX verification flow helper and fix some issues and made some cleanups

* Fix spelling
2022-01-24 13:25:46 -03:00
Jake Fink 6f3999016f
Supress lock and logout when showing fileswitcher on Android (#1626)
* Supress lock and logout when showing fileswitcher on Android

* convert suppress bool to delay long
- move HandleVaultTimeoutAsync to vaultTimeoutService
2022-01-19 09:09:30 -05:00
Jake Fink ad3b401ed3
remove re-throws of exceptions, hiding stack trace (#1680)
* remove re-throws of exceptions, hiding stack trace

* revert to catch all ApiExceptions

* add back throw in auditService

* whitespace
2021-12-16 15:34:33 -05:00
Federico Maccaroni 9fdf2ada6f
Added account deletion feature on settings (#1621)
* Added account deletion feature on settings

* Disabled using Microsoft.AppCenter.Crashes for FDroid

* Moved drawable on Android.csproj to be with the others

Co-authored-by: Federico Maccaroni <fmaccaroni@bitwarden.com>
2021-11-24 16:09:39 -03:00
Federico Maccaroni 7d42d19ae3
Revert "Add Share app Extension on iOS for Send (#1647)" (#1655)
This reverts commit 75ed72f91b.
2021-11-19 17:00:54 -03:00
Federico Maccaroni 75ed72f91b
Add Share app Extension on iOS for Send (#1647)
* WIP Add Share app extension on iOS for Send

* Added Share app extension on iOS for Send and some code fixes as well

* Updated iOS csprojs configs to linkskip the new extension project and also added AdHoc and AppStore configurations to iOS.ShareExtension.csproj

* Code clean up and transformed bundle resources into links to the already used pngs of the main iOS project on ShareExtension

* Updated build.yml to include provisioning profile for iOS Share extension

* Adding in the missing provisioning profile

* Removed .DS_Store from the iOS.ShareExtension csproj Resources

* switching out the share extension profile

* Added Share extension provisioning profile configuration on export options app store for github and also removed custom info.plist config for localhost which is not necessary

Co-authored-by: Joseph Flinn <joseph.s.flinn@gmail.com>
2021-11-19 15:05:00 -03:00
Jake Fink 3ee80beda8
pass OrgId to SSO login while using CME (#1646) 2021-11-16 09:34:26 -05:00
Jake Fink 13869b5a1b
[KeyConnector] Add support for key connector OTP (#1633)
* initial commit
- add UsesKeyConnector to UserService
- add models
- begin work on authentication

* finish auth workflow for key connector sso login
- finish api call for get user key
- start api calls for posts to key connector

* Bypass lock page if already unlocked

* Move logic to KeyConnectorService, log out if no pin or biometric is set

* Disable password reprompt when using key connector

* hide password reprompt checkbox when editing or adding cipher

* add PostUserKey and PostSetKeyConnector calls

* add ConvertMasterPasswordPage

* add functionality to RemoveMasterPasswordPage
- rename Convert to Remove

* Hide Change Master Password button if using key connector

* Add OTP verification for export component

* Update src/App/Pages/Vault/AddEditPage.xaml.cs

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* remove toolbar item "close"

* Update src/Core/Models/Request/KeyConnectorUserKeyRequest.cs

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* remove new line in resource string
- format warning as two labels
- set label in code behind for loading simultaneously

* implement GetAndSetKey in KeyConnectorService
- ignore EnvironmentService call

* remove unnecesary orgIdentifier

* move RemoveMasterPasswordPage call to LockPage

* add spacing to export vault page

* log out if no PIN or bio on lock page with key connector

* Delete excessive whitespace

* Delete excessive whitespace

* Change capitalisation of OTP

* add default value to models for backwards compatibility

* remove this keyword

* actually handle exceptions

* move RemoveMasterPasswordPage to TabPage using messaging service

* add minor improvements

* remove 'this.'

Co-authored-by: Hinton <oscar@oscarhinton.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2021-11-10 20:46:48 -05:00
Thomas Rittson 90b62d61ae
[Linked fields] Add Linked Field as a custom field type (#1563)
* Add linked fields support

* Fix style, don't show linked field if Secure Note

* Finish basic linked fields for Login

* Use Field.LinkedId to store linked field info

* Reset Linked Custom Fields if cipherType changes

* Refactor to use ItemView class

* Use enum for LinkedId

* Detect if no linkedFieldOptions
2021-11-09 07:34:16 +10:00
Jake Fink 318a3e4de9
fix for bug stopping vault timeout to never (#1618)
- use nullable int on settings page and in vault service
2021-10-29 10:31:38 -04:00
Matt Portune a0bb16c35f
fix for crash on startup when policies are non-existent (#1579) 2021-10-14 13:53:57 -04:00
Oscar Hinton c9ce7256e5
MaximumVaultTimeout policy fixes (#1573) 2021-10-12 15:35:01 +02:00
Vincent Salucci 271e6b3d92
[Reset Password v1] Update Temp Password (#1492)
* [Reset Password v1] Update Temp Password

* fixed order of operations for reset temp password flow

* Refactored bool with auth result

* Finished removal of temp password flow from set password

* iOS extension support plus extension bugfixes

Co-authored-by: addison <addisonbeck1@gmail.com>
Co-authored-by: Matt Portune <mportune@bitwarden.com>
2021-09-24 13:14:26 -05:00
Thomas Rittson 716e52f6ff
Move policy checks inside PolicyService (#1533)
* Move policy checks inside PolicyService

* Remove leftover code

* Remove duplicate code

* Reorder code for consistency
2021-09-24 09:51:02 +10:00
Oscar Hinton 6023374fbe
Vault Timeout Policy (#1530) 2021-09-23 15:42:38 +02:00
Vincent Salucci 024d9380c9
[SSO Auto Enroll] Auto Enroll status retrieval (#1540)
* [SSO Auto Enroll] Auto Enroll status retrieval

* Updated object property to match server
2021-09-15 12:27:27 -05:00
Vincent Salucci d3f00340fb
[SSO] Auto enroll during set password (#1520)
* [SSO] Auto enroll during set password

* Updated with requested changes
2021-09-08 12:43:24 -05:00
Matt Portune 307a5a5843
FIDO2 WebAuthn support for mobile (#1519)
* FIDO2 / WebAuthn support for mobile

* fixes
2021-08-30 12:44:12 -04:00
Matt Gibson 2f2fa8a25b
Feature/use hcaptcha if bot (#1476)
* Add captcha to login models and methods

* Add captcha web auth to login

* Extract captcha to abstract base class

* Add Captcha to register

* Null out captcha token after each successful challenge

* Cancel > close
2021-08-04 14:47:23 -05:00
Georges Varouchas f44e6ab75f
bugfix in AuthService.LogInSsoAsync (#1474) (#1475)
add missing parameter in call to LogInHelperAsync
2021-07-23 14:36:49 -04:00
Thomas Rittson 79589b07fc
Use 2 iterations for local password hashing (#1423)
* Add HashPurpose parameter to HashPasswordAsync

* Use 2 iterations for local password hashing

* Force logout if user has old keyHash stored

* Revert "Force logout if user has old keyHash stored"

This reverts commit 497d4928fa.

* Add backwards compatability with existing keyHash
2021-06-15 07:39:34 +10:00
Matt Gibson 80a33e98a2
Use type to ensure transmitted data is encrypted (#1422) 2021-06-09 08:45:30 -05:00
Thomas Rittson fe58dea3e0
Add encKeyValidation string to encrypted exports (#1412) 2021-05-29 06:16:19 +10:00
Kyle Spearrin 569045fcd5
add `auth-email` header to auth request (#1414) 2021-05-28 14:06:42 -04:00
Oscar Hinton 976eeab6d7
Password reprompt (#1365)
* Make card number hidden

* Add support for password reprompt

* Rename PasswordPrompt to Reprompt

* Protect autofill

* Use Enums.CipherRepromptType

* Fix iOS not building

* Protect iOS autofill

* Update to match jslib

* Fix failing build
2021-05-21 15:13:54 +02:00
Matt Portune 2f6e1ff477
lib updates (#1381)
* lib updates

* included csv and biometric lib
2021-05-13 14:15:26 -04:00
Matt Gibson a3b4ede8f3
Use CipherByteArray to signify encrypted byte[] (#1366)
* Use CipherByteArray to signify encrypted  byte[]

* Rename CipherString and CipherByteArray to EncString and EncByteArray
2021-04-21 15:27:14 -05:00
Thomas Rittson 3b2b37b3b0
Use UserService to manage emailVerified (#1367) 2021-04-15 14:54:58 +10:00
Matt Gibson 75e27ffbe3
Move renew endpoint to fix overlapping endpoint issue (#1362) 2021-04-12 09:45:17 -05:00
Matt Gibson ce0b8bc62d
Attachment azure upload blobs (#1345)
* Update Size limits

* Add new Api paths for direct upload of Cipher Attachments

* Add Attachment upload to fileUploadService

* Save with direct upload and fallback to legacy uplaod

CipherID is required for direct upload to request an upload URL

* Inform on when to remove legacy code

* Test Attachment upload
2021-03-30 18:42:43 -05:00
Thomas Rittson 04aeddc5de
Hide email address in Sends (#1340)
* Add HideEmail model properties and locale strings

* Fix UI strings

* Add HideEmail to SendService

* Add HideEmail option to UI

* Tidy up declarations

* Add Bitwarden Send translation warning
2021-03-29 12:01:42 -04:00
Matt Gibson 13ffbe911a
Send azure upload (#1334)
* Add direct upload api endpoints

* Create azure upload service

* Update max file size

* Update send file upload test

* Move internationalization string to correct document

* Allow for one shot blob uploads

* Remove unused helper

* Use FileUploadService

Fallback to legacy method on old server implementations.
2021-03-29 09:45:04 -05:00
Matt Portune 654d71cbbc
use hardcoded kdfiterations for send passwords (#1315) 2021-03-13 12:40:41 -05:00
Matt Gibson 2c13cef17c
Send file model changes (#1293)
* Remove Url from SendFile.
Add file length hit to SendRequest

* Populate SendRequest file length
2021-03-02 10:09:26 -06:00
Matt Portune a18e59a28a
Send feature for mobile (#1256)
* Send feature for mobile

* added fallback for KdfIterations

* additional property exclusions for tests

* support encryptedFileData as byte array comparison in SendServiceTests

* formatting

* requested changes

* additional changes

* change position of send service registration to match declaration order
2021-02-10 19:50:10 -05:00
Matt Gibson 8d5614cd7b
Port send jslib to mobile (#1219)
* Expand Hkdf crypto functions

* Add tests for hkdf crypto functions

Took the testing infrastructure from bitwarden/server

* Move Hkdf to cryptoFunctionService

* Port changes from bitwarden/jslib#192

* Port changes from bitwarden/jslib#205

* Make Send Expiration Optional implement changes from bitwarden/jslib#242

* Bug fixes found by testing

* Test helpers

* Test conversion between model types

* Test SendService

These are mostly happy-path tests to ensure a reasonably correct
implementation

* Add run tests step to GitHub Actions

* Test send decryption

* Test Request generation from Send

* Constructor dependencies on separate lines

* Remove unused testing infrastructure

* Rename to match class name

* Move fat arrows to previous lines

* Handle exceptions in App layer

* PR review cleanups

* Throw when attempting to save an unkown Send Type

I think it's best to only throw on unknown send types here.
I don't think we want to throw whenever we encounter one since that would
do bad things like lock up Sync if clients get out of date relative to
servers. Instead, keep the client from ruining saved data by complaining
last minute that it doesn't know what it's doing.
2021-01-25 14:27:38 -06:00
Matt Portune 56935a7210
restore vault timeout timer for Android (#1220) 2021-01-15 14:04:07 -05:00
Matt Gibson ca7794e6f2
Update revision date from server on restore (#1211) 2021-01-08 08:53:45 -06:00
Matt Gibson bd3fdcab26
Do not export items that have been deleted (#1200) 2020-12-29 11:38:12 -06:00
Matt Gibson e0191c573d
Add encrypted hint json property (#1184) 2020-12-18 16:17:04 -06:00
Matt Portune ef4b53b337
Workaround for lack of shared DB support (#1182)
* workaround for lack of shared DB support

* dispose db in finally
2020-12-16 16:37:26 -05:00
Matt Portune acf2e4360f
Use monotonic clock for vault timeout (#1175)
* Use monotonic clock for vault timeout

* free memory

* removed vault timeout timers and added crash logging to iOS clock hack
2020-12-14 15:29:30 -05:00
Matt Gibson 3227daddaf
Enable Encrypted json export of vaults (#1174)
* Enable Encrypted json export of vaults

* Match jslib export of non-org ciphers

* Clean up export

* Update src/App/Pages/Settings/ExportVaultPage.xaml.cs

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

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-12-14 11:56:13 -06:00
Matt Portune dcfdc7d0ea
make kdfIterations nullable (#1169) 2020-12-08 10:54:58 -05:00
Matt Gibson e27370cf32
Include revision date in cipher requests (#1152)
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-11-23 14:41:43 -06:00
Matt Portune 0b7e07ebab
clear cipher cache when replacing ios autofill identities (#1112)
* clear cipher cache when replacing ios autofill identities

* changed to be service-centric

* support for multiple cache keys

* async suffix

* added cache keys for android
2020-10-13 15:39:36 -04:00
Matt Portune 2ddf624f7d
fix for sso login when bio unlock already enabled (#1086) 2020-09-23 09:02:20 -04:00
Kyle Spearrin db12cd92b7
check authed before checking if token has premium (#1074) 2020-09-18 15:07:32 -04:00
Matt Portune f1419a75f6
Added SSO flows and functionality (#1047)
* SSO login flow for pre-existing user and no 2FA

* 2FA progress

* 2FA support

* Added SSO flows and functionality

* Handle webauthenticator cancellation gracefully

* updates & bugfixes

* Added state validation to web auth response handling

* SSO auth, account registration, and environment settings support for iOS extensions

* Added SSO prevalidation to auth process

* prevalidation now hitting identity service base url

* additional error handling

* Requested changes

* fixed case
2020-09-03 12:30:40 -04:00