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

2754 Commits

Author SHA1 Message Date
53f6ec0a71 [SG-692] Block unknown devices from using passwordless auth (#2315)
* Block unknown devices from initiating auth requests

* Rename anonymousHub route to anonymous-hub
2022-09-29 14:10:21 -04:00
96fa8781f3 [EC-588] Add secrets override for dev logging (#2309) 2022-09-29 08:02:14 +10:00
0629394cec [SG-169] Add arguements to AuthRequest_Update.sql (#2313) 2022-09-28 14:46:07 -04:00
c11a179332 [SM-220] Move identity specific files to identity (#2279) 2022-09-27 18:30:37 +02:00
ddb683dbff Set serilog min level (#2304) 2022-09-26 21:38:35 -05:00
c8c9b32904 Add logging to tokenables (#2298)
* Add logging to token usages

* Add settings manipulation of log levels

* Maintain no logging for dev

* Log exception causing Token failure in TryUnprotect

* dotnet format 🤖

* Added deconstruction operator on new debug logs.

* Split off log level settings into separate files

* Improve log messages

* dotnet format 🤖

* Fix token serialization

* Final review notes

Co-authored-by: Todd Martin <>
2022-09-26 14:22:02 -05:00
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
7c3637c8ba [EC-387] Don't count revoked users towards occupied seat count (#2256)
Also autoscale seats when restoring user if required
2022-09-23 14:30:39 +10:00
893c4fbf6c Update deprecation message for register and prelogin (#2288) 2022-09-19 17:15:53 +02:00
d0c793c951 Update API endpoint to use RegisterResponseModel (#2282) 2022-09-19 09:35:57 -04:00
3a8f344202 Fix swagger errors (#2277) 2022-09-15 17:14:35 +02:00
287dc2e06b [SG-656] Send a captcha bypass token back from the register endpoint (#2278)
* Send a captcha bypass token back from the register endpoint

* [review] Use existing user

* [review] Introduce ICaptcheProtectedResponseModel
2022-09-15 10:02:37 -04:00
735ad264f1 Remove Batch (#2274) 2022-09-14 14:57:05 -04:00
e2b6f2a5bb [EC-529] fix: missing constructor DI assignment (#2258)
* [EC-529] fix: missing constructor DI assignment

* [EC-239] fix: move logging to CiphersController
2022-09-09 13:20:59 +02:00
70f16bc069 [SM-206] Update sqlproject to match migrations (#2246) 2022-09-08 21:42:02 +02:00
e7c1014f96 [EC-484] Remove getBilling API (#2250)
* [EC-484] Remove getBilling API

* Formatting
2022-09-08 10:20:36 -05:00
e2eb0de384 Remove the admin field from the config object (#2252) 2022-09-08 10:47:19 -04:00
c085f5d49c Add error message if revoked user tries to accept invite (#2241) 2022-09-08 07:54:58 +10:00
ed1406acc2 [SM-90] Add Config Endpoint Phase 1 (#2130)
* Add config endpoint with version and gitHash in response

* Remove gitHash from version, formatting and other improvements

* change name of variable in ConfigController

* Update to properly get gitHash

* SM-94: Add global settings for api url

* SM-94: ConfigController cleanup

* SM-94: Make version and gitHash available for all projects, using AssemblyHelper

* Update ConfigResponseModel GetVersion() call

* Change AssemblyHelpers.cs to use the UTF-8 charset

* SM-94: Use AssemblyHelpers.GetVersion and deprecate CoreHelpers.GetVersion

* SM-90: Add other BaseServiceUriSettings urls

* SM-94: Fix dotnet format issue

* remove old GetVersion method

* Add back the linebreak

* Fix typo in Directory.Build.props

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

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-09-05 11:19:04 -04:00
2bf8438ff7 [EC-502] Rate Limiting Improvements (#2231)
* [EC-502] Add custom Redis IP rate limit processing strategy

* [EC-502] Formatting

* [EC-502] Add documentation and app setting config options

* [EC-502] Formatting

* [EC-502] Fix appsettings.json keys

* [EC-502] Replace magic string for cache key

* [EC-502] Add tests for custom processing strategy

* [EC-502] Formatting

* [EC-502] Use base class for custom processing strategy

* [EC-502] Fix failing test
2022-08-31 14:17:29 -07:00
e0f9d99b49 [EC-495] Updated GroupService.SaveAsync to check if collections are supplied and prevent deleting Group-to-Collection associations. Added unit test. (#2234) 2022-08-31 16:03:13 +01: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
7c4521e0b4 [SM-153] Add scaffolded API integration test project (#2209) 2022-08-29 16:24:52 +02:00
194c695cd0 [SM-151] Move EF Dapper tests to Infrastructure.EFIntegration.Test (#2204) 2022-08-29 09:40:59 -04:00
c36d6fa3ba [SG-614] Web Version Discrepancy
[SG-614] Fixed web/core version, they were switched. (#2207)
2022-08-23 10:31:29 +01:00
13d1e74d69 expand sources and tax_ids for stripe api 2020-08-27 (#2199) 2022-08-17 14:39:21 -04:00
37641ba08b Cherry pick/stripe sdk fixes (#2170)
* update stripe sdk (#2166)

* Bump version to 2022.8.1 (#2167)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit eaca9a5864)

* added setting to toggle stripe api version errors (#2168)

* Bump version to 2022.8.2 (#2169)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 3d7e5e165c)

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-09 09:32:18 -04:00
dad666fc96 Add Microsoft.Data.SqlClient back as quartz dependency (#2161) 2022-08-02 17:52:34 -05:00
ebdd30f5d4 [EC-388] Enforce organization policies when restoring user (#2152) 2022-08-02 17:09:22 -04:00
95b727e3f1 PS-1027 - prevent encoding of the organization name in master password reset email (#2147) 2022-08-02 12:57:56 -07:00
1cad0268c0 [SM-142] Rename CommCore to Commercial.Core (#2158)
* Rename CommCore to Commercial.Core
2022-08-02 20:41:18 +02:00
038d5e7734 [EC-276] Admin with custom permission is unable to manage all collections (#2143)
* Updated CollectionService.GetOrganizationCollections to check if the user has permissions to view all collections

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
2022-07-28 17:23:43 +01:00
169a4381dd [EC-247] Add columns to provider portal clients table (#2136)
* Added migration script to alter ProviderOrganizationOrganizationDetailsView to add new columns UserCount, Seats and Plan

* Modified EF query ProviderOrganizationOrganizationDetailsReadByProviderIdQuery

* Modified model to output new view columns

* Updated view to count only active users

* Filtering the organization user count by only confirmed users
2022-07-28 09:31:03 +01:00
d1db4d31cb [fix] Address QA found defects for the Stripe Subscriptions admin tool (#2150)
* [fix] Clear the page on Stripe Subscription search change
[SG-404]

* [fix] Ensure page is null when selecting all Stripe Subscriptions for an action
[SG-404]

* [feat] Allow Stripe Subscriptions to be filtered by a test clock
[SG-404]
2022-07-26 13:59:41 -04:00
d1a2e58ce1 EC-261 - Update OrganizationLicense for SCIM (#2151) 2022-07-26 13:04:59 -04:00
c0f2255569 [PS-617] Fix null value detection on ssoToken parameter (#2085)
* Fix null value detection on ssoToken parameter

* Use TryGet

* Format

Co-authored-by: Justin Baur <admin@justinbaur.com>
2022-07-26 10:53:16 -04:00
2979fde0f7 Remove unused qwerty helpers (#2149) 2022-07-26 13:27:09 +02:00
7dfb04298d [EC-92] Add organization vault export to event logs (#2128)
* Added nullable OrganizationId to EventModel

* Added EventType Organization_ClientExportedVault

* Updated CollectController to save the event Organization_ClientExportedVault

* Added OrganizationExportResponseModel to encapsulate Organization Export data

* Added OrganizationExportController to have a single endpoint for Organization vault export

* Added method GetOrganizationCollections to ICollectionService to get collections for an organization

* Added GetOrganizationCiphers to ICipherService to get ciphers for an organization

* Updated controllers to use new methods in ICollectionService and ICipherService
2022-07-25 09:56:23 +01:00
f6a18db582 [EC-338] Update SCIM code naming conventions (revoked/restore) (#2140)
* Keep old endpoints but mark as deprecated
* Do not change existing sproc naming
2022-07-25 10:47:44 +10:00
378b54524f [SG 475] Fix error thrown when changing payment method (#2137)
* Add null check for sources

* Add expand to get customer sources
2022-07-21 12:55:57 -04:00
ac183363bd Set UseScim flag for new organizations (#2134) 2022-07-21 08:26:51 -04:00
4e3d8172ff Re-evaluate lock files to ensure they match project dependencies (#2132) 2022-07-20 09:10:08 -07:00
4f145b3938 Update restore/revoke error message wording (#2126) 2022-07-20 11:42:06 +10:00
28ca17109a Configure EventsProcessor to use Azurite for local dev (#2120) 2022-07-20 09:26:21 +10:00
7d40b38352 [PS-93] Distributed Ip rate limiting (#2060)
* Upgrade AspNetCoreRateLimiter and enable redis distributed cache for rate limiting.

- Upgrades AspNetCoreRateLimiter to 4.0.2, which required updating NewtonSoft.Json to 13.0.1.
- Replaces Microsoft.Extensions.Caching.Redis with Microsoft.Extensions.Caching.StackExchangeRedis as the original was deprecated and conflicted with the latest AspNetCoreRateLimiter
- Adds startup task to Program.cs for Api/Identity projects to support AspNetCoreRateLimiters breaking changes for seeding its stores.
- Adds a Redis connection string option to GlobalSettings

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Cleanup Redis distributed cache registration

- Add new AddDistributedCache service collection extension to add either a Memory or Redis distributed cache.
- Remove distributed cache registration from Identity service collection extension.
- Add IpRateLimitSeedStartupService.cs to run at application startup to seed the Ip rate limiting policies.

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Add caching configuration to SSO Startup.cs

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Add ProjectName as an instance name for Redis options

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Use distributed cache in CustomIpRateLimitMiddleware.cs

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Undo changes to Program.cs and launchSettings.json

* Move new service collection extensions to SharedWeb

* Upgrade Caching.StackExchangeRedis package to v6

* Cleanup and fix leftover merge conflicts

* Remove use of Newtonsoft.Json in distributed cache extensions

* Cleanup more formatting

* Fix formatting

* Fix startup issue caused by merge and fix integration test

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Linting fix

Signed-off-by: Shane Melton <smelton@bitwarden.com>
2022-07-19 11:58:32 -07:00
8c0996efec [SM-82] Add HttpController Attribute to protect secrets manager controllers during development (#2117)
* Adding development only attribute for sm API

* dotnet format changes

* Swapping attribute name to SecretsManager
2022-07-18 09:05:26 -05:00
be146a8f62 update OrgUserDetailsView to include PlanType and other sponsorship parameters previously removed (#2122) 2022-07-17 20:28:46 -04:00
6628dc3336 [EC-315] Record user IP and device type for OrgUser and ProviderUser events (#2119) 2022-07-18 10:24:46 +10:00