1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00
Commit Graph

59 Commits

Author SHA1 Message Date
02bea3c48d [SG-167] Implement Passwordless Authentication via Notifications (#2276)
* [SG-549] Commit Initial AuthRequest Repository (#2174)

* Model Passwordless

* Scaffold database for Passwordless

* Implement SQL Repository

* [SG-167] Base Passwordless API (#2185)

* Implement Passwordless notifications

* Implement Controller

* Add documentation to BaseRequestValidator

* Register AuthRequestRepo

* Remove ExpirationDate from the AuthRequest table

* [SG-407] Create job to delete expired requests (#2187)

* chore: init

* remove exp date

* fix: log name

* [SG-167] Added fingerprint phrase to response model. (#2233)

* Remove FailedLoginAttempt logic

* Block unknown devices

* Add EF Support for passwordless

* Got SignalR working for responses

* Added delete job method to EF repo

* Implement a GetMany API endpoint for AuthRequests

* Ran dotnet format

* Fix a merge issues

* Redated migration scripts

* tried sorting sqlproj

* Remove FailedLoginAttempts from SQL

* Groom Postgres script

* Remove extra commas from migration script

* Correct isSpent()

* [SG-167] Adde identity validation for passwordless requests. Registered IAuthRepository.

* [SG-167] Added origin of the request to response model

* Use display name for device identifier in response

* Add datetime conversions back to postgres migration script

* [SG-655] Add anonymous endpoint for checking if a device & user combo match

* [review] Consolidate error conditions

Co-authored-by: Brandon Maharaj <107377945+BrandonM-Bitwarden@users.noreply.github.com>
Co-authored-by: André Filipe da Silva Bispo <andrefsbispo@hotmail.com>
Co-authored-by: André Bispo <abispo@bitwarden.com>
2022-09-26 13:21:13 -04:00
7f5f010e1e Run formatting (#2230) 2022-08-29 16:06:55 -04:00
bae03feffe Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
2022-08-29 15:53:48 -04:00
34fb4cca2a Turn on file scoped namespaces (#2225) 2022-08-29 14:53:16 -04:00
231eb84e69 Turn On ImplicitUsings (#2079)
* Turn on ImplicitUsings

* Fix formatting

* Run linter
2022-06-29 19:46:41 -04:00
e314537713 PS-661 Fix Captcha Bypass Token Validation (#2004) 2022-05-19 10:15:49 -03:00
3ffd240287 captcha scores (#1967)
* captcha scores

* some api fixes

* check bot on captcha attribute

* Update src/Core/Services/Implementations/HCaptchaValidationService.cs

Co-authored-by: e271828- <e271828-@users.noreply.github.com>

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: e271828- <e271828-@users.noreply.github.com>
2022-05-09 12:25:13 -04:00
7046aecfd5 [Captcha] BUG Add null checks | Make ceiling default to zero (#1903)
* [Captcha] BUG Add null checks | Make ceiling default to zero

* Formatting
2022-03-09 12:07:06 -06:00
19d5817f8f [Captcha] Implement failed logins ceiling (#1870)
* [Hacker1] Failed Login Attempts Captcha

* [Captcha] Implement failed logins ceiling

* Formatting

* Updated approach after implementation talks with Kyle

* Updated email templates // Updated calling arch for failed attempts

* Formatting

* Updated 2fa email links

* Renamed baserequest methods to better match their actions

* EF migrations/scripts

* Updated with requested changes

* Defaults for MaxiumumFailedLoginAttempts
2022-03-02 15:45:00 -06:00
e4a10aae27 Split out repositories to Infrastructure.Dapper / EntityFramework (#1759) 2022-01-11 10:40:51 +01:00
23b0a1f9df Run dotnet format (#1764) 2021-12-16 15:35:09 +01:00
fd37cb5a12 Add support for Key Connector OTP and account migration (#1663)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2021-11-09 16:37:32 +01:00
44f30e7948 Remove erroneous not (#1629) 2021-10-11 09:53:19 -05:00
8a5a371a8f Allow bypass of captcha token if the device is known (#1626) 2021-10-08 18:59:35 -05:00
f58b9fcab4 uncomment to require auth-email header (#1604) 2021-09-30 11:24:29 -04:00
f92628fb80 Use UrlB64 encoding for auth-email header (#1503) 2021-08-11 06:21:46 +10:00
7a135ae7cd Protect user registration with captcha (#1480)
* Protect user registration with captcha

* PR feedback
2021-07-22 12:29:06 -05:00
8e1e2fa2fe Feature/sync Enable hcaptcha on login (#1469)
* Share globalSettings hcaptcha public key with clients

* Require captcha valid only prior to two factor

users with two factor will have already solved captcha is necessary.
Users without two factor will have`TwoFactorVerified` set to false

* Do not require CaptchaResponse on two-factor requests

* Add option to always require captcha for testing purposes

* Allow for self-hosted instances if they want to use it

* Move refresh suggestion to correct error

* Expect lifetime in helper method

* Add captcha bypass token to successful captcha validations

* Remove twofactorValidated

* PR Feedback
2021-07-21 13:42:06 -05:00
d2e48a5c2c hcaptcha validation on password login (#1398) 2021-06-16 12:47:41 -04:00
52dea4c2a4 commented code to validate auth-email header (#1361)
* commented code to validate auth-email header

* format comment more
2021-05-28 16:04:58 -04:00
5537470703 Use sas token for attachment downloads (#1153)
* Get limited life attachment download URL

This change limits url download to a 1min lifetime.
This requires moving to a new container to allow for non-public blob
access.

Clients will have to call GetAttachmentData api function to receive the download
URL. For backwards compatibility, attachment URLs are still present, but will not
work for attachments stored in non-public access blobs.

* Make GlobalSettings interface for testing

* Test LocalAttachmentStorageService equivalence

* Remove comment

* Add missing globalSettings using

* Simplify default attachment container

* Default to attachments containe for existing methods

A new upload method will be made for uploading to attachments-v2.
For compatibility for clients which don't use these new methods, we need
to still use the old container. The new container will be used only for
new uploads

* Remove Default MetaData fixture.

* Keep attachments container blob-level security for all instances

* Close unclosed FileStream

* Favor default value for noop services
2021-02-22 15:35:16 -06:00
edd4bc2623 Add disable send policy (#1130)
* Add Disable Send policy

* Test DisableSend policy

* PR Review

* Update tests for using CurrentContext

This required making an interface for CurrentContext and mocking out
the members used. The interface can be expanded as needed for tests.

I moved CurrentContext to a folder, which changes the namespace
and causes a lot of file touches, but most are just adding a reference

* Fix failing test

* Update exemption to include all exempt users

* Move all CurrentContext usages to ICurrentContext

* PR review. Match messaging with Web
2021-02-04 12:54:21 -06:00
66e44759f0 [Require SSO] Enterprise policy enforcement (#970)
* Initial commit of require sso authentication policy enforcement

* Updated sproc to send UseSso flag // Updated base validator to send back error message // Added changes to EntityFramework (just so its there for the future

* Update policy name // adjusted conditional to demorgan's

* Updated sproc // Added migrator script

* Added .sql file extension to DeleteOrgUserWithOrg migrator script

* Added policy // edit // strings // validation to business portal

* Change requests from review // Added Owner & Admin exemption

* Updated repository function used to get org user's type

* Updated with requested changes
2020-10-26 11:56:16 -05:00
0d0c6c7167 sso integrations (#822)
* stub out hybrid sso

* support for PKCE authorization_code clients

* sso service urls

* sso client key

* abstract request validator

* support for verifying password

* custom AuthorizationCodeStore that does not remove codes

* cleanup

* comment

* created master password

* ResetMasterPassword

* rename Sso client to OidcIdentity

* update env builder

* bitwarden sso project in docker-compose

* sso path in nginx config
2020-07-16 08:01:39 -04:00
9800b752c0 Changed all C# control flow block statements to include space between keyword and open paren 2020-03-27 14:36:37 -04:00
a5b809f477 update rolling file settings for LogRollBySizeLimit 2019-11-25 11:40:04 -05:00
2693ffeab0 include ip in log message. only for self host 2019-11-22 10:23:11 -05:00
d022517762 login failed log message 2019-11-22 07:30:32 -05:00
7d47dac65f DisableEmailNewDevice 2019-04-01 08:28:36 -04:00
6c86996ab3 disable new device emails env variable. 2019-04-01 08:27:37 -04:00
b19628c6f8 new device logged in email notification 2019-01-24 22:37:49 -05:00
951e8f562e email token provider 2018-12-19 22:27:45 -05:00
ac7c7b5077 move some 2fa logic functions to userService 2018-12-19 10:47:53 -05:00
d10d25afea add null check 2018-10-13 16:06:54 -04:00
006cfffab3 new "Challenge" token for U2f 2018-10-10 17:51:38 -04:00
2562d5a40d reference OrganizationMembership instead 2018-08-31 17:05:27 -04:00
c41a1e0936 CanAccessPremium checks instead of User.Premium 2018-08-28 16:23:58 -04:00
e350ef650a dont cycle security token on re-hash 2018-04-17 08:10:17 -04:00
389512d51e added org duo to 2fa flow 2018-04-03 14:31:33 -04:00
0662fc2163 log events to various organization indexes as well 2017-12-01 12:14:46 -05:00
d94c2a8f50 log user events 2017-12-01 10:07:14 -05:00
a9b9094b9c refactored logic around remember me token 2017-08-15 08:19:20 -04:00
2492491f32 dont check if remember 2fa is enabled 2017-07-27 09:58:00 -04:00
295d6510a9 premium checks on 2fa providers 2017-07-06 16:56:12 -04:00
a1008353fd added nfc flag for yubikey config 2017-06-29 12:34:10 -04:00
f4fa990cb1 send redacted email on 2fa login 2017-06-24 11:50:20 -04:00
59b8438a0f update u2f lib. send 2fa login email 2017-06-24 09:20:12 -04:00
64189067cd handle two factor remember failed case 2017-06-23 10:46:04 -04:00
15dcb43f44 remember two factor token 2017-06-23 10:08:53 -04:00
3ae96bd510 u2f token provider 2017-06-22 09:09:51 -04:00