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

3848 Commits

Author SHA1 Message Date
8138db396b Fix secrets retrieval in build-self-host workflow (#2696) 2023-02-15 11:45:27 +01:00
5aa8f3db81 [DEVOPS-1161] fix the rate limiting issue in building bitwarden unified (#2694)
* Add GH_PAT secret to build

* Fix secret

* Fix

* Fix

* Maybe fix

* add cat for tags.json

* Maybe fix

* Matbe fix

* Trying to fix

* Change gh_pat path

* Fix

* Remove obsolete tags obtaining
2023-02-14 09:41:59 -07:00
ee03ad4158 Bumped version to 2023.2.0 (#2693)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-02-14 10:30:49 -05:00
5836c87bb4 SM-365: Add Export & Import Functionality for SM (#2591)
* SM-365: Add Export endpoint

* SM-365: Add SM Import/Export support

* SM-365: Fix DI and add temp NoAccessCheck

* SM-365: Add access checks to import / export

* SM-365: dotnet format

* SM-365: Fix import bugs

* SM-365: Fix import bug with EF & refactor based on PR comments

* SM-365: Update access permissions in export

* SM-365: Address PR comments

* SM-365: Refactor for readability and PR comments
2023-02-14 09:24:31 -05:00
109d915d9e Disable storage in tests (#2689) 2023-02-13 18:10:53 +01:00
c24b086275 [SM-500] Upload sql diff for database validation (#2690) 2023-02-13 15:07:42 +01:00
624df49698 [EC-430] Admin portal: Update organization information screen (#2672)
* [EC-430] Added ProviderOrganizationProviderDetailsView to get Provider details for an Organization

* [EC-430] Added Provider information to Organization Edit/View on Admin panel

* [EC-430] Remove "Add to Reseller" button

* [EC-430] Removed unused property OrganizationEditModel.ClientOwnerEmail

* [EC-430] Replaced IProviderOrganizationRepository.GetProviderDetailsByOrganizationAsync with IProviderRepository.GetByOrganizationIdAsync

* [EC-430] Deleted ProviderOrganizationProviderDetails and ProviderOrganizationProviderDetailsReadByOrganizationIdQuery
2023-02-13 10:26:58 +00:00
35b832dbc9 [SM-485] Add access policy on project creation (#2678)
* Add bootstrap access policy on create

* Update project integration tests
2023-02-09 08:58:05 -06:00
04c4be8a15 [EC-489] chore: remove obsolete identifier field (#2635)
* [EC-489] chore: remove obsolete `identifier` field

* [EC-489] chore: remove identifier from org response model
2023-02-08 16:33:45 +01:00
e3fdb2636b [EC-1055] [Tech Debt/Bug] Sql.sqlproj is missing sprocs (#2664)
* [EC-1055] fix: add missing sprocs to sqlproj

* [EC-1055] fix: remove duplicate sproc
2023-02-08 10:39:40 +01:00
d32cd79535 [PS-2425] Upgrade vulnerable packages (#2669)
* Upgrade vulnerable packages

* Added packages.lock.json files

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2023-02-07 17:44:40 -06:00
1ee14d93e6 [SM-473] Access Policies - Service Accounts (#2658)
* Add service account access policy endpoints

* Add unit & integration tests for new endpoints

* Fix formatting on response models

* Cleanup unit tests
2023-02-07 14:30:22 -06:00
f331188763 [EC-429] Provider details screen updated with Type, BillingPhone and Organization details (#2666) 2023-02-07 10:31:50 +00:00
7290776871 [EC-459 / EC-428] Admin panel: Add Provider Type to list and creation flow (#2593)
* [EC-427] Add columns 'Type' and 'BillingPhone' to Provider table

* [EC-427] Provider table Type and BillingPhone MySql migrations

* [EC-427] Provider table Type and BillingPhone Postgres migrations

* [EC-427] Add mysql migration script

* [EC-427] Add mysql migration script

* [EC-427] Updated Provider sql script to include default column value

* [EC-427] Removed default value from Provider.Type column

* [EC-427] Changed migration script to include a default value constraint instead of updating the null type

* [EC-427] Updated Sql project Provider table script

* [EC-427] Changed migration script to use 'Create OR Alter' for views and sprocs

* [EC-427] Added default values for 'BillingPhone' and 'Type' fields on sprocs [dbo].[Provider_Create] and [dbo].[Provider_Update]

* [EC-427] Adjusting metadata in migration script

* [EC-427] Updated Provider sprocs SQL script files

* [EC-427] Fixed migration script

* [EC-427] Added sqlite migration

* [EC-427] Add missing Provider_Update sproc default value

* [EC-427] Added missing GO action to migration script

* [EC-459] Added Type column to Providers list

* [EC-428] Added Type, BusinessName and BillingEmail to CreateProviderModel

* [EC-428] Updated Create Provider view to include new fields

* [EC-428] Updated ProviderService to not create a ProviderUser for the type Reseller

* [EC-428] Added custom validation for Provider fields depending on selected Type

* [EC-428] Redirect to Edit after creating Provider

* [EC-428] Setting Provider status as Created for Resellers

* [EC-428] Redirect on Provider creation depending if self host server

* [EC-428] Split ProviderService.CreateAsync into two methods: CreateMspAsync and CreateResellerAsync

* [EC-428] Created ICreateProviderCommand and added service for injection on Admin.Startup

* [EC-428] Modified Provider views to use DisplayName attribute values

* [EC-428] Moved ICreateProviderCommand to Core project

* [EC-428] Adding ICreateProviderCommand injection next to IProviderService

* [EC-428] Moved CreateProviderCommand to Commercial.Core project

* [EC-459] Added Type column to Providers list

* [EC-428] Added Type, BusinessName and BillingEmail to CreateProviderModel

* [EC-428] Updated Create Provider view to include new fields

* [EC-428] Updated ProviderService to not create a ProviderUser for the type Reseller

* [EC-428] Added custom validation for Provider fields depending on selected Type

* [EC-428] Redirect to Edit after creating Provider

* [EC-428] Setting Provider status as Created for Resellers

* [EC-428] Redirect on Provider creation depending if self host server

* [EC-428] Split ProviderService.CreateAsync into two methods: CreateMspAsync and CreateResellerAsync

* [EC-428] Created ICreateProviderCommand and added service for injection on Admin.Startup

* [EC-428] Modified Provider views to use DisplayName attribute values

* [EC-428] Moved ICreateProviderCommand to Core project

* [EC-428] Adding ICreateProviderCommand injection next to IProviderService

* [EC-428] Moved CreateProviderCommand to Commercial.Core project

* [EC-428] Moved CreateProviderCommand to namespace Bit.Commercial.Core.Providers
2023-02-07 10:27:41 +00:00
cf669286ed [SM-429] Add permission checks to access policy endpoints (#2628)
* Add permission checks to access policy endpoints

* Fix unit tests

* Add service account grant permission checks

* Add service account grant tests

* Add new endpoint unit tests

* Cleanup unit tests add integration tests

* User permission enum in create tests

* Swap to NotFoundException for access checks

* Add filter for potential grantees

* Add in AccessSecretsManager check and test it

* Add code review updates

* Code review updates

* Refactor potential grantees endpoint

* Code review updates
2023-02-06 11:26:06 -06:00
9110efa44e fix: update to 10 (#2670) 2023-02-06 11:36:03 -05:00
113ee8a680 [EC-861] feat: Add external id to member api (#2594) 2023-02-06 15:54:44 +01:00
55cc022d9b [EC-1003] feat: remove externalId from PUT/POST (#2589) 2023-02-06 10:27:40 +01:00
6514bdbb7e add more CSPs to the default correction check (#2668)
* add more CSPs to the default correction check

* add Dec2020ContentSecurityPolicy
2023-02-03 16:04:03 -05:00
0e84678150 [PS-2416 and PS-2417] dont set CSP config value by default (#2667)
* dont set CSP config value by default

* space
2023-02-03 14:50:33 -05:00
89ad63d378 Merge branch 'master' into feature/billing-obfuscation 2023-02-03 10:15:41 +00:00
7e74695afc add timestamps to user table for security related events (#2660)
* add timestamps to user table for security related events

* ef migrations

* fix lint problems

* formatting

* add missing namespace back

* move `now` up some

* review fixes

* add missing view rebuild to migration script
2023-02-02 14:39:57 -05:00
0ce95ec147 [SM-465] Add access policy on service account creation (#2649)
* Add access policy on service account creation
2023-02-02 12:25:14 -06:00
6390aaa011 Send in Guid instead of Cipher (#2662) 2023-02-02 12:12:41 -05:00
e019f0191d fix bumping AccountRevisionDate when creating and updating ciphers (#2634)
When the user is not part of an organization,
`UserBumpAccountRevisionDateByCipherIdQuery` doesn't work. In that case
we have to use `UserBumpAccountRevisionDateAsync` instead.

This was already done by most parts of the code but a few more were
missing.

Fixes #2615
2023-02-02 09:33:35 -05:00
28a3d4ad92 Add EF migrations for SecretsManager flag (#2659)
* Add EF migrations for SecretsManager flag
2023-02-01 12:27:13 -06:00
9e7741d58b [EC-1014] Create Organization Status (Pending/Created) (#2610)
* [EC-427] Add columns 'Type' and 'BillingPhone' to Provider table

* [EC-427] Provider table Type and BillingPhone MySql migrations

* [EC-427] Provider table Type and BillingPhone Postgres migrations

* [EC-427] Add mysql migration script

* [EC-427] Add mysql migration script

* [EC-427] Updated Provider sql script to include default column value

* [EC-427] Removed default value from Provider.Type column

* [EC-427] Changed migration script to include a default value constraint instead of updating the null type

* [EC-427] Updated Sql project Provider table script

* [EC-427] Changed migration script to use 'Create OR Alter' for views and sprocs

* [EC-427] Added default values for 'BillingPhone' and 'Type' fields on sprocs [dbo].[Provider_Create] and [dbo].[Provider_Update]

* [EC-427] Adjusting metadata in migration script

* [EC-427] Updated Provider sprocs SQL script files

* [EC-427] Fixed migration script

* [EC-427] Added sqlite migration

* [EC-427] Add missing Provider_Update sproc default value

* [EC-427] Added missing GO action to migration script

* [EC-428] Redirect to Edit after creating Provider

* Revert "[EC-428] Redirect to Edit after creating Provider"

This reverts commit 6347bca1ed.

* [EC-1014] Create OrganizationStatusType and add Status column to Organizations table

* [EC-1014] Added EF migrations

* [EC-1014] dotnet format

* [EC-1014] Changed Organization.Status from SMALLINT to TINYINT

* [EC-1014] Set Organization.Status default value = 1

* [EC-1014] Setting Organization.Status default value as 1
2023-02-01 10:45:40 +00:00
522df6e91a add wasm-unsafe-eval to CSP (#2656) 2023-01-31 16:21:06 -05:00
285b2ae55b Add explicit options to db migration script (#2637) 2023-01-31 13:41:11 -05:00
cf25d55090 [SM-378] Enable SM on a user basis (#2590)
* Add support for giving individual users access to secrets manager
2023-01-31 18:38:53 +01:00
54353f8b6c HeartbeatHostedService use cancel token (#2654) 2023-01-31 11:20:21 -05:00
8ba806667c add custom dp services to more projects (#2653) 2023-01-31 11:20:05 -05:00
814ca7b30b Fix HeartbeatHostedService logger (#2650) 2023-01-31 09:59:15 -05:00
62327137b0 create /var/lib/nginx/tmp (#2651) 2023-01-31 08:23:07 -05:00
82908b1fb7 [EC-826] Merge license sync feature branch to master (#2587)
* [EC-634] Extract GenerateLicenseAsync to a query (#2373)

* [EC-637] Add license sync to server (#2453)

* [EC-1036] Show correct license sync date (#2626)

* Update method name per new pattern
2023-01-31 07:42:10 +10:00
d0355fcd12 Add update for PROD ACR upload (#2643)
* Add update for PROD ACR upload

* Add update image tags

* add suggestions

* delete comment
2023-01-30 16:12:09 -05:00
328bee40bc Add Rider launch configurations (#2646) 2023-01-31 06:20:46 +10:00
28e6275063 [EC-1015] Fixed OrganizationService InviteUser unit tests to not depend on random Org seat number (#2607) 2023-01-30 10:54:44 +00:00
9ea520e038 Move CI testing to Ubuntu (#2638)
Change the CI for testing job from Windows to Ubuntu
2023-01-30 11:07:20 +01:00
2646d9200c apply trailing slash to attachments location (#2639) 2023-01-27 10:32:26 -05:00
b412a01d2a Defect/SG-992 ProviderOrgs Missing Plan Type & EC-591/SG-996 - Provider Org Autoscaling Email Invites Working (#2596)
* SG-992 - Provider receives free org prompt when trying to auto scale org seats because plan type was missing and defaulting to free. PlanType has now been added to provider orgs returned as part of the profile sync.

* SG-992 - Updated Stored proc name to match convention

* EC-591 / SG-996 - (1) Update ProviderUserRepo.GetManyDetailsByProviderAsync to accept optional ProviderUserStatusType (2) Update OrganizationService.cs autoscaling user logic to check if an org is a provider org and send owner emails to the confirmed provider users instead of the managed org owners. Prevents scenario where newly created, managed orgs would not have an owner yet, and ownerEmails would be null and the email service would explode.

* EC-591 / SG-996 - Remove comments

* EC-591 / SG-996 - ES lint fix.

* SG-996 - SQL files must have SQL extensions.

* SG-996 / EC-591 - Update alter sql to be actually backwards compatible

* SG-996 - Make Status actually optional and backwards compatible for ProviderUserUserDetails_ReadByProvider.sql

* SG-992 - Update migrations to meet standards - (1) use CREATE OR ALTER and (2) Update view metadata after change if necessary

* EC-591 / SG-996 - Update Stored Proc migration to use proper standards: (1) Remove unnecessary code and (2) Use CREATE OR ALTER instead of just ALTER

* SG-992 / EC-591 / SG-996 - Refactor separate migrations into single migrations file per PR feedback

* SG-992/SG-996 - Add SyncControllerTests.cs with basic test suite + specific test suite to ensure provider orgs have plan type mapped to output product type properly.

* Fix lint issues by removing unnecessary using statements

* SG-992 - Refresh of view metadata has to target the stored procs that reference the view -- not the view itself.
2023-01-26 11:51:26 -05:00
6dfbd06e8f [EC-1043] Fix syntax error in ReadKdfByEmail query (#2631) 2023-01-26 15:34:18 +10:00
7c55d56561 fix lint issues and sql csproj (#2627) 2023-01-25 12:44:32 -05:00
64c15ed8cd [EC-1032] if name is Empty, set to null before saving (#2619) 2023-01-25 11:07:33 -05:00
cb1ba50ce2 [PS-2267] Add KdfMemory and KDFParallelism fields (#2583)
* Add KdfMemory and KDFParallelism fields

* Revise argon2 support

This pull request makes the new attribues for argon2, kdfMemory and
kdfParallelism optional. Furthermore it adds checks for the argon2
parametrs and improves the database migration script.

* Add validation for argon2 in RegisterRequestModel

* update validation messages

* update sql scripts

* register data protection with migration factories

* add ef migrations

* update kdf option validation

* adjust validation

* Centralize and Test KDF Validation

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2023-01-25 07:56:54 -05:00
59f5285c88 [SM-460] Isolate SecretsManager files (#2616)
Move SecretsManager files to directories called SecretsManager and add CodeOwners
2023-01-24 19:57:28 +01:00
4041d7f009 Remove old Digital Ocean Marketplace files (#2622) 2023-01-24 13:26:21 -05:00
fe2fda5776 Update README example commands for self-host scripts (#2620) 2023-01-24 13:05:36 -05:00
0e32cb944a Upgrade Swagger (#2611) 2023-01-24 12:10:00 -05:00
aa9f859306 [SM-382] Service Account access policy checks (#2603)
The purpose of this PR is to add access policy checks to service account endpoints.
2023-01-24 09:50:04 -06:00