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

815 Commits

Author SHA1 Message Date
c3f58e692b Ran dotnet format 2023-09-04 10:24:47 +02:00
953e645bf1 Fix sql journal 2023-09-01 17:20:43 +02:00
3bbf36e69f Add optins parsing nuget for msSqlMigratorUtility 2023-09-01 17:20:36 +02:00
50145fb06f Remove testing sql script 2023-09-01 17:20:12 +02:00
8dab2943dd Embed dbScripts_data_migration folder 2023-09-01 17:19:57 +02:00
928179ebe8 Remove CreateSchemaTableSql as it'll be migrated using migration 2023-08-31 15:46:59 +02:00
82c17425a1 Fix sql scripts 2023-08-31 15:46:28 +02:00
c6df753eda Parse parameters on migrator utility 2023-08-31 15:45:54 +02:00
d242e6eb9c Add transition (aka rerunable) migrations to Setup 2023-08-31 15:45:35 +02:00
5d7da922fc Fix 2023-08-29 14:23:51 +02:00
5ecffdad74 Add rerunable options and folder 2023-08-28 16:41:01 +02:00
d82025b236 Add rerunable option and script folder name 2023-08-28 15:38:44 +02:00
3d65219f3b Change name 2023-08-25 12:43:48 +02:00
731be1fddd Add update from rerunable to not rerunable script 2023-08-25 12:40:17 +02:00
b5420e1922 Testing 2023-08-25 10:37:43 +02:00
d95c76638c After migration 2023-08-24 18:25:29 +02:00
a74231616c Trying to migrate first 2023-08-24 17:09:28 +02:00
d73dbfbe41 Fix journal table name 2023-08-24 16:30:25 +02:00
98168feb59 Trying 2023-08-24 16:02:54 +02:00
d413b4badd add rerunable column in dbo migrations table migration 2023-08-24 13:42:35 +02:00
edc8139c6d Enable logging in db migrator 2023-08-24 13:01:17 +02:00
c606efe2ab Fix typo 2023-08-24 12:47:39 +02:00
47f8555eab Format 2023-08-23 18:11:59 +02:00
ff021b3854 Add rerunable schema 2023-08-23 17:40:47 +02:00
ee26db7e98 Fix usings 2023-08-21 18:39:05 +02:00
683fd71bb4 Move RerunableSqlTableJournal to Extension class 2023-08-21 18:20:28 +02:00
2c3c869bd8 Rename to SqlTableJournalExtensions 2023-08-21 18:17:53 +02:00
1968d11d4a Disable logging 2023-08-18 10:46:30 +02:00
068c73b83e FIx 2023-08-18 10:08:01 +02:00
7a7585e173 Enable logging 2023-08-17 16:18:45 +02:00
e47d544baf format 2023-08-17 15:02:49 +02:00
4949c62792 Use rerunable sql journal 2023-08-16 17:32:10 +02:00
0d67ee7032 Add extension to use rerunable sql table journal 2023-08-16 17:31:58 +02:00
d83554b850 Add RerunableSqlTableJournal 2023-08-16 17:31:41 +02:00
fc814ff352 [AC-1597] Revert GetByUserIdWithPolicyDetailsAsync changes to unblock SQL CPU (#3203)
* Revert "[PM-3007] Caching user policies on PolicyService variable (#3117)"

This reverts commit 78588d0246.

* Don't delete old migration script

* Add migration to revert sproc
2023-08-16 13:42:09 +10:00
cf14f42dc9 Fix Attachments base image (#3190) 2023-08-15 19:48:25 -04:00
Ike
4ec01b0ef0 PM-2427-Defect-Cannot-delete-account-if-User-has-auth-request-on-table-FK-constraint (#3118)
* updated migrations and ef repo

* removed route alias

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2023-08-15 17:16:02 -04:00
0c76969506 [DEVOPS-1516] - Update server build workflow to push images to ACR (#3157)
* Update server build workflow to push images to ACR

* UPDATE: Remove docker_repos matrix variable

* FIX: make docker push command one-liner

* UODATE: revert attachment image source

* UPDATE: add suggestion and update tags in docker build

* UPDATE: docker build tags

* UPDATE: master branch tag to latest

* ADD: push server image to dockerhub

* ADD: sugesstions

* ADD: ACR var name change and usages

* Minor updates

* Fix syntax error

* UPDATE: use ACR var for image name step

---------

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2023-08-10 18:41:56 +01:00
a5bda60c4e Platform/pm 2535/upgrade to azure messaging servicebus (#3102)
* `dotnet add package Azure.Messaging.ServiceBus` 🤖

* Move to Azure.Messaging.ServiceBus

* `dotnet restore --locked-mode --force-evaluate` 🤖

Remove Microsoft.Azure.ServiceBus

* `dotnet restore --locked-mode --force-evaluate` 🤖

* Include broker filter

* `dotnet restore --locked-mode --force-evaluate` 🤖
2023-08-07 08:57:18 -05:00
42bf04c46a SM-873: Move the SecretsManagerBeta Data Migration Into a Normal Migration (#3159)
* SM-873: Remove SecretsManagerBetaColumn data migration and add new migration

* SM-873: Remove EF latest migration
2023-08-06 16:21:06 -04:00
222d57622e [AC-1360] Add logic to automatically populate the reseller name field (#3149)
* [AC-1360] Added Name field to view for creating a Reseller Provider

* [AC-1360] Added migration script to populate existing Reseller Provider names with value from BusinessName

* [AC-1360] Added fallback when retrieving display attribute name value

* [AC-1360] Added EF scripts for MySQL, Postgres and Sqlite

* [AC-1360] Added EF migration scripts

* [AC-1360] Changed down migrator methods to empty

* Revert "[AC-1360] Changed down migrator methods to empty"

This reverts commit 0e72c14d2f.

* Revert "[AC-1360] Added EF migration scripts"

This reverts commit a4ea5c4dca.

* Revert "[AC-1360] Added EF scripts for MySQL, Postgres and Sqlite"

This reverts commit 4b47d25755.

* [AC-1360] Moved data migration file do data migration folder
2023-08-04 17:47:03 +01:00
78588d0246 [PM-3007] Caching user policies on PolicyService variable (#3117)
* [PM-3007] Caching user policies on PolicyService variable

* [PM-3007] Added missing newlines on sql files
2023-08-03 18:36:47 +01:00
d94a54516e [AC-1344] Provider users unable to bulk restore vault items for client organizations (#2871)
* [AC-1344] Added method PutRestoreManyAdmin to CiphersController and refactored PutRestoreMany

* [AC-1344] Fixed unit test

* [AC-1344] Removed comment

* [AC-1344] Fixed sql.csproj

* [AC-1344] Added check for empty or null array; added more unit tests
2023-08-02 16:22:37 +01:00
6aff9b7b05 Update Setup project to handle EU region (#3137) 2023-07-31 13:14:33 -04:00
0c53867dbc SM-802: Add SecretsManagerBeta Column Migration (#3065)
* SM-802: Add SecretsManagerBetaColumn SQL migration and Org table update

* SM-802: Run EF Migrations for SecretsManagerBeta

* SM-802: Update the two Org procs and View, and move data migration to a separate file

* SM-802: Add missing comma to Organization_Create

* SM-802: Remove extra GO statement from data migration script

* SM-802: Add SecretsManagerBeta to OrganizationResponseModel

* SM-802: Move SecretsManagerBeta from OrganizationResponseModel to OrganizationSubscriptionResponseModel. Use sp_refreshview instead of sp_refreshsqlmodule in the migration script.

* SM-802: Remove OrganizationUserOrganizationDetailsView.sql changes

* SM-802: Remove SecretsManagerBetaColumn migration

* SM-802: Add SecretsManagerBetaColumn migration

* SM-802: Remove OrganizationUserOrganizationDetailsView update

* SM-802: Remove migration

* SM-802: Rename SecretsManagerBetaColumn migration files to have the correct date (now that this has passed QA)

* SM-802: Add SecretsManagerBeta migration
2023-07-26 15:55:28 -04:00
35111382e5 [AC-1486] Feature: SM Billing (#3073)
* [AC-1423] Add AddonProduct and BitwardenProduct properties to BillingSubscriptionItem (#3037)

* [AC-1423] Add AddonProduct and BitwardenProduct properties to BillingSubscriptionItem

* [AC-1423] Add helper to StaticStore.cs to find a Plan by StripePlanId

* [AC-1423] Use the helper method to set SubscriptionInfo.BitwardenProduct

* Add SecretsManagerBilling feature flag to Constants

* [AC 1409] Secrets Manager Subscription Stripe Integration  (#3019)

* [AC-1418] Add missing SecretsManagerPlan property to OrganizationResponseModel (#3055)

* [AC 1460] Update Stripe Configuration (#3070)

* [AC 1410] Secrets Manager subscription adjustment back-end changes (#3036)

* Create UpgradeSecretsManagerSubscription command

* [AC-1495] Extract UpgradePlanAsync into a command (#3081)

* This is a pure lift & shift with no refactors

* [AC-1503] Fix Stripe integration on organization upgrade (#3084)

* Fix SM parameters not being passed to Stripe

* [AC-1504] Allow SM max autoscale limits to be disabled (#3085)

* [AC-1488] Changed SM Signup and Upgrade paths to set SmServiceAccounts to include the plan BaseServiceAccount (#3086)

* [AC-1510] Enable access to Secrets Manager to Organization owner for new Subscription (#3089)

* Revert changes to ReferenceEvent code (#3091)

This will be done in AC-1481

* Add UsePasswordManager to sync data (#3114)

* [AC-1522] Fix service account check on upgrading (#3111)

* [AC-1521] Address checkmarx security feedback (#3124)

* Reinstate target attribute but add noopener noreferrer

* Update date on migration script

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: cyprain-okeke <cokeke@bitwarden.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
2023-07-25 08:05:05 +10:00
fe570cb6c8 [AC-1487] Update queries to use [User] table instead of [OrganizationUser] for email address (#3083) 2023-07-17 13:00:32 -05:00
a565b19ffb SM-768: Update EFCore and related packages to >= 7.0 (#3006)
* SM-768: Update EFCore and related packages to >= 7.0

* SM-768: Update more packages for the EF 7 upgrade

* SM-768: Update the PostgreSQL package

* SM-768: Run dotnet restore --force-evaluate

* SM-768: Revert package upgrades for 3 projects

* SM-768: Update the dotnet-ef tool
2023-07-07 09:56:31 -04:00
b151605c28 [PM-2594] Added new property "CloudRegion" to GlobalSettings and ConfigResponseModel to be able to override the cloud url value for selfhost instances (#3024)
* [PM-2594] Added new property "CloudVault" to GlobalSettings and ConfigResponseModel to be able to override this value for selfhost instances

* [PM-2594] Renamed EnvironmentConfigResponseModel.CloudVault to CloudWebVault

* [PM-2594] Added default value for globalSettings__baseServiceUri__cloudWebVault on EnvironmentFileBuilder

* [PM-2594] Erased CloudWebVault environment variable and added CloudVaultRegion

* [PM-2594] Changed var name on EnvironmentFileBuilder

* [PM-2594] Renamed the env. variable and also the output property to CloudRegion
2023-07-03 21:43:13 +01:00
49e849deb9 [PM-1198] Modify AuthRequest Purge Job (#3048)
* Add PasswordlessAuth Settings

* Update Repository Method to Take TimeSpan

* Update AuthRequest_DeleteIfExpired

- Take Configurable Expiration
- Add Special Cases for AdminApproval AuthRequests

* Add AuthRequestRepositoryTests

* Run Formatting

* Remove Comment

* Fix Bug in EF Repo

* Add Test Covering Expired Rejected AuthRequest

* Use Longer Param Names

* Use Longer Names in Test Helpers
2023-06-30 14:13:31 -04:00