1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-29 13:25:17 +01:00
Commit Graph

2573 Commits

Author SHA1 Message Date
Vince Grassia
ea33c27b9e
Fix spelling of EF query name (#2368) 2022-10-27 14:24:57 -04:00
Kyle Spearrin
d60a0f52fd
fix logic in some EF cipher queries (#2366)
* fix logic in some cipher queries

* Update src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Update src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2022-10-27 10:03:35 -04:00
Kyle Spearrin
20ddd9ae8c
fix cipher attachment saving on EF repos (#2365) 2022-10-26 11:20:10 -04:00
Gbubemi Smith
351f62866b
[SG-763] Store the fact that a Passwordless request was denied in the AuthRequest table (#2363)
* Added migrations for sqlserver and mysql

* Added migrations for postgres

* renamed mysql migration script to make naming uniform

* introduced approved field to the update auth request controller;This change would keep track of denied passwordless requests

* Recreated the authRequestView, introduced the approved field to the create procedure and updated the response model

* Formatted code

* fixed incorrect syntax in the AuthRequest_Create.sql SP
2022-10-25 17:14:48 -04:00
dgoodman-bw
b938abab65
Ps 976 moving of read only organization collection items to different folder not possible (#2257)
* PS-976 - update PutPartial endpoint to return cipher info, update Cipher_Move sproc to allow users to update a cipher's folder even if they don't have edit permissions

* PS-976- fix formatting errors

* PS-976 - per cr feedback updated EF query to match cipher_move sproc update, and updated cipher tests to align with existing tests
2022-10-25 12:23:49 -07:00
Cat (she/they)
b5d5e6f65a
Added Atlassian global equivalent domain (#2361)
Thanks to @djsmith85 for pointing out atlassian.net & jira.com!
2022-10-25 19:53:25 +02:00
Rui Tomé
402c89dc25
[EC-425] Update log filters in admin portal (#2293)
* [EC-425] Remove 'Business Portal' option from Log filters

* [EC-425] Add 'SCIM' option to Log filters
2022-10-21 17:09:34 +01:00
Justin Baur
2a2f58980a
Read all dates as UTC (#2357)
* Read all dates as UTC

* Force EF Providers to read dates into UTC

* Update DatabaseContext.cs

remove new line

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2022-10-21 11:31:09 -04:00
Justin Baur
a349f28840
[PS-1471] Create Allocation Free EncryptedStringAttribute validation (#2273)
* Add new logic for validating encrypted strings

* Add benchmarks

* Formatting & Comments

* Move Debug assertion to just be a test

* Address PR feedback pt.1

* Address more PR feedback

* Formatting

* merge branch 'master' into 'encrypted-string-perf'

* Revert "merge branch 'master' into 'encrypted-string-perf'"

This reverts commit a20e127c9c.
2022-10-20 16:10:02 -04:00
Todd Martin
63ae7c8b66
[SG-419] Added logging to mobile push notifications (#2332)
* Added logging to push notifications.

* Added additional logging for testing push notifications.

* Removed package lock changes.

* Removed package lock changes.

* Renamed the property and added a description.

* Undid changes to LoggerFactory.

* Removed filter on Microsoft library logging.

Co-authored-by: Todd Martin <>
2022-10-19 10:22:40 -04:00
Gbubemi Smith
f445edb315
updated authrequestId to string to allow null value from client (#2350) 2022-10-19 06:37:18 -06:00
Oscar Hinton
07a091503c
[SM-244] Resolve dotnet warnings (#2283) 2022-10-18 22:12:26 +02:00
Gbubemi Smith
4a26c55599
[SG-698] Refactored 2fa send email and identity to cater for passwordless (#2346)
* Allow for auth request validation for sending two factor emails

* Refactored 2fa send email and identity to cater for passwordless

* Refactored 2fa send email and identity to cater for passwordless

Signed-off-by: gbubemismith <gsmithwalter@gmail.com>

* Inform that we track issues outside of Github (#2331)

* Inform that we track issues outside of Github

* Use checkboxes for info acknowledgement

Signed-off-by: gbubemismith <gsmithwalter@gmail.com>

* Refactored 2fa send email and identity to cater for passwordless

* ran dotnet format

Signed-off-by: gbubemismith <gsmithwalter@gmail.com>
Co-authored-by: addison <addisonbeck1@gmail.com>
2022-10-18 19:50:48 +01:00
Seth Falco
864ab5231d
feat: add amazon.com.be domain to amazon (#2349) 2022-10-18 12:59:32 +02:00
David Frankel
0ea70f68f1
Add CreationDate to CipherResponse (#2142) 2022-10-11 20:20:48 -05:00
Addison Beck
54354237ba
[SG-686] Correctly format AuthRequestResponse.Origin (#2325)
* Remove hardcoded URL case from AuthRequestResponse

* Just use URI host for AuthRequestResponse.Origin
2022-10-04 11:06:01 -04:00
Rui Tomé
8325f0eed4
[EC-508] SCIM CQRS Refactor - Users/Get (#2266)
* [EC-390] Added Scim.Test unit tests project

* [EC-390] Added ConflictException type. Updated BadRequestException to have parameterless constructor. Updated NotFoundException to have constructor with a message parameter

* [EC-534] Implemented CQRS for Users Get and added unit tests

* [EC-508] Renamed GetUserCommand to GetUserQuery

* [EC-508] Created ScimServiceCollectionExtensions

* [EC-508] Renamed AddScimCommands to AddScimUserQueries

* [EC-508] Created ExceptionHandlerFilterAttribute on SCIM project

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2022-10-04 11:40:28 +10:00
Addison Beck
707a39972b
[SG-617] [SG-697] [SG-686] Fix various minor passwordless bugs (#2320)
* Only push auth request responses if the request is approved

* Add error message when an unknown device tries to send an auth request

* Send the vault URL for self hosted auth requests
2022-10-03 11:37:37 -04:00
Addison Beck
c8783ced6d
Use a user-based known device check (#2318) 2022-09-30 09:45:07 -04:00
Addison Beck
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
Thomas Rittson
96fa8781f3
[EC-588] Add secrets override for dev logging (#2309) 2022-09-29 08:02:14 +10:00
Addison Beck
0629394cec
[SG-169] Add arguements to AuthRequest_Update.sql (#2313) 2022-09-28 14:46:07 -04:00
Oscar Hinton
c11a179332
[SM-220] Move identity specific files to identity (#2279) 2022-09-27 18:30:37 +02:00
Matt Gibson
ddb683dbff
Set serilog min level (#2304) 2022-09-26 21:38:35 -05:00
Matt Gibson
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
Addison Beck
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
Thomas Rittson
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
Oscar Hinton
893c4fbf6c
Update deprecation message for register and prelogin (#2288) 2022-09-19 17:15:53 +02:00
Addison Beck
d0c793c951
Update API endpoint to use RegisterResponseModel (#2282) 2022-09-19 09:35:57 -04:00
Oscar Hinton
3a8f344202
Fix swagger errors (#2277) 2022-09-15 17:14:35 +02:00
Addison Beck
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
Justin Baur
735ad264f1
Remove Batch (#2274) 2022-09-14 14:57:05 -04:00
Andreas Coroiu
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
Oscar Hinton
70f16bc069
[SM-206] Update sqlproject to match migrations (#2246) 2022-09-08 21:42:02 +02:00
Vincent Salucci
e7c1014f96
[EC-484] Remove getBilling API (#2250)
* [EC-484] Remove getBilling API

* Formatting
2022-09-08 10:20:36 -05:00
Colton Hurst
e2eb0de384
Remove the admin field from the config object (#2252) 2022-09-08 10:47:19 -04:00
Thomas Rittson
c085f5d49c
Add error message if revoked user tries to accept invite (#2241) 2022-09-08 07:54:58 +10:00
Colton Hurst
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
Shane Melton
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
Rui Tomé
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
Justin Baur
7f5f010e1e
Run formatting (#2230) 2022-08-29 16:06:55 -04:00
Justin Baur
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
Justin Baur
34fb4cca2a
Turn on file scoped namespaces (#2225) 2022-08-29 14:53:16 -04:00
Oscar Hinton
7c4521e0b4
[SM-153] Add scaffolded API integration test project (#2209) 2022-08-29 16:24:52 +02:00
Oscar Hinton
194c695cd0
[SM-151] Move EF Dapper tests to Infrastructure.EFIntegration.Test (#2204) 2022-08-29 09:40:59 -04:00
André Filipe da Silva Bispo
c36d6fa3ba
[SG-614] Web Version Discrepancy
[SG-614] Fixed web/core version, they were switched. (#2207)
2022-08-23 10:31:29 +01:00
Kyle Spearrin
13d1e74d69
expand sources and tax_ids for stripe api 2020-08-27 (#2199) 2022-08-17 14:39:21 -04:00
Chad Scharf
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
Matt Gibson
dad666fc96
Add Microsoft.Data.SqlClient back as quartz dependency (#2161) 2022-08-02 17:52:34 -05:00
Thomas Rittson
ebdd30f5d4
[EC-388] Enforce organization policies when restoring user (#2152) 2022-08-02 17:09:22 -04:00