1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
Commit Graph

4031 Commits

Author SHA1 Message Date
Kyle Spearrin
6f04298e17
Data protection for user columns at rest (#2571)
* ServerProtectedData for user entity

* remove using statements

* formatting

* use data protection libs

* no async

* add data protection to ef user repo

* switch to `SetApplicationName` per ASPNET docs

* null checks

* cleanup

* value converter for EF

* new line at eof

* fix using

* remove folder ref

* restore ctor

* fix lint

* use global constant

* UseApplicationServiceProvider for integration tests

* implement constant for DatabaseFieldProtectedPrefix

* Fix EF IntegrationTest

* restore original values after protect and save

* lint fixes

* Use Constants

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2023-01-18 13:16:57 -05:00
Rui Tomé
22201bf30a
[EC-619] Exceeding seat limit results in vague "Unhandled server error" message (#2558)
* [EC-619] Added 'AggregateException' type to ExceptionHandlerFilter to return error messages in response

* [EC-619] Updated ExceptionHandlerFilterAttribute to return multiple errors using ErrorResponseModel internal property
2023-01-18 09:56:08 +00:00
Rui Tomé
119c815c16
[EC-912] Updated IdentityServerTests to reinitialize the database on constructor (#2538)
* [EC-912] Updated IdentityServerTests to reinitialize the database on constructor

* [EC-912] dotnet format
2023-01-17 15:21:36 +00:00
Justin Baur
c6e2db1ff5
Remove Unused Auto Properties (#2580)
* Correct Auto Navigation Property

* Add Needed Migration
2023-01-13 14:24:58 -05:00
Oscar Hinton
504395a4e1
Fix linting errors (#2577)
* Fix linting errors

* Use microsoft.Data.SqlClient
2023-01-13 17:02:44 +01:00
Oscar Hinton
1f0fc43278
[SM-394] Secrets Manager (#2164)
Long lived feature branch for Secrets Manager

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
Co-authored-by: CarleyDiaz-Bitwarden <103955722+CarleyDiaz-Bitwarden@users.noreply.github.com>
Co-authored-by: Thomas Avery <tavery@bitwarden.com>
Co-authored-by: Colton Hurst <colton@coltonhurst.com>
2023-01-13 15:02:53 +01:00
Matt Gibson
09e524c9a2
Include SQLite in migrations (#2559) 2023-01-12 07:59:00 -06:00
Kyle Spearrin
e06323d94b
add missing connectors to nginx template (#2569) 2023-01-12 08:47:02 -05:00
Matt Bishop
503630497e
[PS-2185] Update defaults for SQL Server to trust the server certificate (#2563)
* Update defaults for SQL Server to trust the server certificate

* Use an explicit
2023-01-10 17:13:33 -05:00
Matt Bishop
df2edcfb8c
Migrate to Microsoft.Data.SqlClient (#2548) 2023-01-10 15:58:41 -05:00
github-actions[bot]
4c6354cd5b
Bump version to 2023.1.0 (#2562)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-01-10 13:11:56 -07:00
Todd Martin
145071d499
Remove EF migration scripts (#2550)
* Removed Scripts folders

* Removed .csproj references.

* Added back HelperScripts

* Added back additional helper scripts.

* Fixed extra ItemGroup
2023-01-10 13:46:19 -05:00
Matt Bishop
ea9e30c35f
Upload and process test results as an artifact and report (#2555) 2023-01-10 10:58:19 -05:00
Kyle Spearrin
97b5a7e55d
add sqlite migrations for avatar color (#2543)
* add sqlite migrations for avatar color

* lint fix
2023-01-10 07:50:34 -05:00
cyprain-okeke
e7958609b6
[PS 2020] Fixing value cannot be null, parameter source (#2554)
* Fixing value cannot be null, parameter source

* Running the dotnet format -v diag
2023-01-09 14:51:34 +01:00
Oscar Hinton
b1dfbe7519
[SM-412] Remove postgres timezone legacy behavior (#2547) 2023-01-09 11:53:47 +01:00
Matt Bishop
452891b39e
Upgrade to the latest System.Data.SqlClient (#2546) 2023-01-06 14:36:12 -05:00
Kyle Spearrin
e800219d73
change unified to debian images (#2514)
* change to debian images

* add back sqlite connectionstring

* add back sqlite connection string

* Update docker-unified/entrypoint.sh

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>

* Update docker-unified/entrypoint.sh

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>

* update settings

* uid requires #

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2023-01-05 09:27:28 -05:00
Mathijs van Veluw
3e07d0bd32
Fix Inactive two-step login check (#2523)
It looks like 2fa.directory has changed it's API endpoint.
According to https://2fa.directory/api/ it now uses `api.2fa.directory` instead of `2fa.directory/api`.

This PR fixes the URL's where needed.
A fix for the client side is also created.
2023-01-03 19:57:53 +01:00
Brandon Maharaj
aa1f443530
[SG-58] Avatar color selector (#2330)
* chore: backend work

* changed typing to match efc

* Update User_Update.sql

* fix: script cleanup

* fix: adjust max length

* fix: adjust max length

* fix: added missing script changes

* fix: use short form for creating objects

* add: mysql migrations

* chore: add mysql script

* chore: posgres migrations

* chore: postgres migrations

* fix: lint

* Update 20221115034053_AvatarColor.cs

* fix: removed gravatar inline (#2447)

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2023-01-01 11:28:59 -05:00
mimartin12
90ef8d863a
Remove deprecated workflow (#2525) 2022-12-30 13:52:48 -06:00
Rui Tomé
c2fe3e4949
[EC-277] Remove SHA-1 encryption from SSO Outbound and Minimum Signing Algorithm lists (#2509) 2022-12-29 12:38:31 +00:00
Kyle Spearrin
bc85cbe381
add support for BW_DB_PORT (#2520) 2022-12-27 12:15:09 -05:00
Kyle Spearrin
c39fb8f7af
update ef core libraries (#2515)
* update ef core libraries

* lock file updates
2022-12-25 20:49:14 -05:00
Michał Chęciński
481ce38934
Fix failing ACR purge workflow (#2511)
* Fix failing ACR purge workflow

* Coment out prod for testing

* Enable prod after testing
2022-12-21 17:47:23 +01:00
Kyle Spearrin
a8aeadd138
add support for unified sqlite config (#2513) 2022-12-21 11:23:17 -05:00
Rui Tomé
4adc4b0181
[EC-758] Add environment variable to enforce SSO Policy for all users (#2428)
* [EC-758] Add environment variable GlobalSettings.Sso.EnforceSsoPolicyForAllUsers to enforce SSO Policy for all users

* [EC-758] Add integration tests

* [EC-758] Add Entities namespace to resolve ambiguous reference

* [EC-758] dotnet format

* [EC-758] Updated integration tests to check for logins with all user types

* [EC-758] Create new TestServer for each test

* [EC-758] Combine unit tests and refactor to use BitAutoData
2022-12-20 13:08:29 +00:00
Michał Chęciński
d60746d9b1
Add Billing Into Server CI Workflow (#2478) 2022-12-20 12:09:17 +01:00
Matt Bishop
152450d53a
Add SQLite migration project to solution (#2504) 2022-12-16 17:13:47 -05:00
Jared Snider
a791f93051
Defect/SG-825 - users in org w/ no personal vault still see personal vault (disabled org policies now still apply) (#2429)
* SG-825 - Policy_ReadByUserId stored proc now pulls back policies of disabled orgs

* SG-825 - SyncController - Always retrieve policies -- even if orgs are disabled.

* SG-825 - EF - PolicyReadByUserId - autoformat to remove whitespace and pass eslint build error
2022-12-16 15:22:39 -05:00
SmithThe4th
9ce6ee443b
Fixed null issue when an organization key does not exist (#2501) 2022-12-15 13:11:27 -05:00
Matt Gibson
7cbc4a8970
Add Sqlite as EF DB provider (#2487)
* Add Sqlite as EF DB provider

Note: In-memory sqlite does not work across projects, since the migrator
only runs on the Admin project

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

* Include example sqlite connection string

* Add migrator assembly to sqlite connection

* Update initial migration to current schema state

* dotnet format 🤖

* Update package locks

* Respect name set in BW_SSL_KEY for cert generation (#2490)

(cherry picked from commit 2469e10110)

* [PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495)

(cherry picked from commit c6fbe8cc44)

* Add SqliteMigrations project to unified Dockerfile

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: accolon <mail@accolon.net>
Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-12-14 08:28:51 -06:00
André Bispo
16ad5db418
[SG-859] Key and MasterPasswordHash stored on AuthRequest when you deny login request (#2469)
* [SG-856] Remove nullable from RequestApproved property

* [SG-856] Assign key and hash only if approved
2022-12-13 21:50:53 +00:00
github-actions[bot]
a504364e91
Bumped version to 2022.12.0 (#2497)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-13 14:35:22 -06:00
Alena N
456cc6773e
Fix bug #2317: add deletion date validation for file Sends (#2342)
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2022-12-13 20:30:01 +01:00
Vince Grassia
c6fbe8cc44
[PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495) 2022-12-13 10:31:19 -05:00
accolon
2469e10110
Respect name set in BW_SSL_KEY for cert generation (#2490) 2022-12-13 08:56:03 -05:00
Todd Martin
e340cba8fc
[SG-823] Undid changes to capture device push token on login (#2427)
* Revert "Set Id property on existing devices so we don't try to create a new one instead of updating existing. (#2420)"

This reverts commit 02e4b10ae8.

* Revert "Update push token on login to allow multiple users on mobile devices (#2404)"

This reverts commit 24469e2267.

* Added back test changes.
2022-12-12 15:51:41 -05:00
Rui Tomé
e042360c00
[EC-654] Create commands for Group Create and Group Update (#2442)
* [EC-654] Add CreateGroupCommand and UpdateGroupCommand

Added new CQRS commands CreateGroupCommand and UpdateGroupCommand
Updated GroupService to use new commands
Edited existing GroupServiceTests and added new tests for the new commands

* [EC-654] dotnet format

* [EC-654] Replace GroupService.SaveAsync with CreateGroup and UpdateGroup commands

* [EC-654] Add assertions to check calls on IReferenceEventService

* [EC-654] Use AssertHelper.AssertRecent for DateTime properties

* [EC-654] Extracted database reads from CreateGroupCommand and UpdateGroupCommand. Added unit tests.

* [EC-654] Changed CreateGroupCommand and UpdateGroupCommand Validate method to private
2022-12-12 09:59:48 +00:00
Vince Grassia
9ca93381ce
Allow changing default NGINX port in unified (#2484) 2022-12-08 17:10:49 -05:00
Shane Melton
328c2ca21c
[EC-812] Fix broken EF update user groups query (#2479) 2022-12-08 07:41:46 -08:00
Daniel James Smith
6ef1863ad8
[PS-1980] Create issue template for Bitwarden Unified (#2474)
* Clean up and name Server Bug report

* Create issue template for Bitwarden Unified

* Update .github/ISSUE_TEMPLATE/bw-unified.yml

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

* Update Docker compose details to just be database image

* Change Label

* Add Link to Epic

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2022-12-07 16:26:43 -05:00
Michał Chęciński
d4bb3c30b5
Create Dockerfile for Billing (#2477)
* build script for billing

* Add entrypoint script

* Add dockerfile and docker ignore
2022-12-07 09:51:25 +01:00
Rui Tomé
fe59186c96
[EC-584] Add TryParse to ClientVersion due to QA builds having an appended git hash (#2395)
* [EC-584] Add TryParse to ClientVersion due to QA builds having an appended git hash

* [EC-584] Add string.Split to only get 'ClientVersion' number when the input value includes the git hash

* Revert "[EC-584] Add string.Split to only get 'ClientVersion' number when the input value includes the git hash"

This reverts commit 9ebad69c6a.

* [EC-584] Update client version check to 2022.12

* [EC-584] Inverted check on ClientVersion

* [EC-584] Bumped version check to version 2023.01

* [EC-584] Removed the 0 prefix from the client version check
2022-12-06 15:35:05 +00:00
Michał Chęciński
f173988979
Remove DCT bypass for scim (#2451) 2022-12-06 09:48:55 -05:00
Rui Tomé
ae280a313c
[EC-343] Gate custom permissions behind enterprise plan (#2352)
* [EC-343] Added column 'UseCustomPermissions' to Organization table

* [EC-343] Added 'UseCustomPermissions' to Api responses

* [EC-343] Added 'UseCustomPermissions' to Admin view

* [EC-343] Add constraint to Organization table to have default UseCustomPermissions value

* [EC-343] Recreate OrganizationView to include UseCustomPermissions column

* [EC-343] Add MySql EF migrations

* [EC-343] Add Postgres EF migrations

* Revert "[EC-343] Add Postgres EF migrations"

This reverts commit 8f1654cb7d.

* [EC-343] Add Postgres migrations and script

* [EC-343] dotnet format

* [EC-343] Set 'Custom Permissions' feature as unchecked for teams plan

* [EC-343] Add CustomPermissions to plan upgrades

* [EC-343] Update CURRENT_LICENSE_FILE_VERSION

* [EC-343] Enable 'Custom Permissions' on Enterprise 2019 plan

* [EC-343] Updated migration script to include Enterprise 2019 plan

* [EC-343] Update CURRENT_LICENSE_FILE_VERSION to 10

* [EC-343] Move logic checking if Organization can use custom permissions to OrganizationService

* [EC-343] Add unit tests to validate UseCustomPermissions check

* [EC-343] Revert UseCustomPermissionsFlag migration

* [EC-343] Fix typo in OrganizationUserOrganizationDetailsViewQuery

* [EC-343] Add Postgres migrations without affecting other datetime column

* [EC-343] Create ValidateOrganizationCustomPermissionsEnabledAsync. Add more unit tests around CustomPermissions check

* [EC-343] Add curly brackets to if condition

* [EC-343] Rename unit tests
2022-12-06 09:50:08 +00:00
Alexander Schreiner
e0f37e514e
[PS-1992] Updating broken link to Server Setup Guide (#2476) 2022-12-06 10:42:25 +01:00
Kyle Spearrin
3fd7bda65b
default to beta tag in example file (#2472) 2022-12-05 20:43:57 -05:00
Vince Grassia
a98a5d8dc6
Remove 'rc-2022.12' logic (#2475) 2022-12-05 20:24:44 -05:00
Justin Baur
c25ef0be5c
[PS-1930] Fix UpdateCollectionsForAdminAsync (#2473)
* Fix UpdateCollectionsForAdminAsync

* Formatting
2022-12-05 13:59:11 -05:00