1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-02 18:06:07 +02:00
Commit Graph

922 Commits

Author SHA1 Message Date
Rui Tome
00eea0621c
[AC-1682] dotnet format 2024-03-25 15:28:46 +00:00
Rui Tome
262887f9c3
[AC-1682] Added Sqlite migration and script 2024-03-25 15:22:17 +00:00
Rui Tome
9bde1604da
[AC-1682] Added Postgres migration and script 2024-03-25 13:59:28 +00:00
Rui Tome
d367f6de6b
[AC-1682] Added MySql migration and script 2024-03-22 15:58:07 +00:00
Rui Tome
d6f7d94b22
[AC-1682] Removed Sqlite migrations and scripts 2024-03-22 15:46:31 +00:00
Rui Tome
bb00cb4e59
[AC-1682] Removed Postgres scripts and migrations 2024-03-22 15:45:59 +00:00
Rui Tome
5383cd16fb
[AC-1682] Removed MySql scripts and migrations 2024-03-22 15:41:06 +00:00
Rui Tome
6c21d4e96a
Merge branch 'main' into ac/ac-1682/ef-migrations 2024-03-22 11:53:01 +00:00
Alex Morask
9f7e05869e
[AC-1900] Update Vault DB to support provider billing (#3875)
* Add Gateway columns to Provider table

* Add ProviderId column to Transaction table

* Create ProviderPlan table

* Matt's feedback

* Rui's feedback

* Fixed Gateway parameter on Provider
2024-03-21 11:15:49 -04:00
Daniel James Smith
2b440ed840
Update mssql to CU12 to support linux kernel 6.7.x (#3904)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-15 13:02:31 -06:00
Tom
997af0f6ab
[PM-221] Adding CipherId to the Send table, create/update sprocs, and added mi… (#3646)
* Adding CipherId to the Send table, create/update sprocs, and added migrations

* changing migrator script to drop create sprocs

* fixing double brackets

* Revert "changing migrator script to drop create sprocs"

This reverts commit 2d5171e7e5.

* Remove comment I nitpicked

* Script best practices

* Fix typo

* Try recreate again

* Fix missing output

* Revert "Try recreate again"

This reverts commit 38257ebeaa.

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: federicom09 <fmonesiglio@bitwarden.com>
2024-03-04 19:31:33 -05:00
Rui Tome
0f3aa5d1ae
Merge branch 'main' into ac/ac-1682/ef-migrations 2024-02-26 13:32:30 +00:00
Thomas Avery
1499d1e2c6
[SM-713] Add database support for secret access policies (#3681)
* mssql add column and migration

* Add secret access policies to EF models and config

* Clear new access policies on service account delete

* Add SM cleanup code on delete

* Fix EF org user bulk delete

* Run EF migrations
2024-02-22 10:06:39 -06:00
renovate[bot]
3a6b2d85d3
[deps] DevOps: Update CommandDotNet to v7.0.3 (#3824)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 15:59:55 -05:00
renovate[bot]
4e6360cc4f
[deps] DbOps: Update EntityFrameworkCore (#3823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 09:42:30 -05:00
Rui Tome
2f434b34f5
[AC-1682] Remove unnecessary migration scripts 2024-02-16 14:44:35 +00:00
Rui Tome
a24465b137
[AC-1682] Bumped up dates on EF migrations 2024-02-16 14:43:12 +00:00
Rui Tome
6d1ead5b61
[AC-1682] Bumped up date on migration scripts 2024-02-16 13:09:58 +00:00
Rui Tome
f7f692cf08
[AC-1682] Update RevisionDate in Group table 2024-02-16 12:51:13 +00:00
Rui Tome
39e336eddd
Merge branch 'main' into ac/ac-1682/ef-migrations
# Conflicts:
#	src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql
#	util/SqliteMigrations/SqliteMigrations.csproj
2024-02-16 12:47:39 +00:00
rkac-bw
744d21ec5e
[PM-4767] Update Grant_Save procedure (#3641)
* modify grant_save sql script to migration and Auth SQL scripts to not use merge

* Update formatting for sql files

* Fix formatting for sql files

* Format using Prettier

* Rename 2024-01-03_00_FixGrantSave.sql to 2024-02-12_00_FixGrantSave.sql

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-14 09:48:58 -07:00
Alex Morask
97018e2501
Upgrade logging packages for .NET 8 (#3798) 2024-02-13 14:34:55 -05:00
github-actions[bot]
ae4fcfc204
Move DbScripts_finalization to DbScripts (#3675)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2024-02-12 14:00:09 -05:00
renovate[bot]
615d6a1cd0
[deps] DbOps: Update dbup-sqlserver to v5.0.40 (#3708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-09 12:08:20 -05:00
Shane Melton
636f716d62
[AC-1124] Restrict admins from accessing items in Collections tab (#3676)
* [AC-1124] Add GetManyUnassignedOrganizationDetailsByOrganizationIdAsync to the CipherRepository

* [AC-1124] Introduce IOrganizationCiphersQuery.cs to replace some CipherService queries

* [AC-1124] Add additional CipherDetails model that includes CollectionIds

* [AC-1124] Update CiphersController and response models
- Add new endpoint for assigned ciphers
- Update existing endpoint to only return all ciphers when feature flag is enabled the user has access

* [AC-1124] Add migration script

* [AC-1124] Add follow up ticket for Todos

* [AC-1124] Fix feature service usage after merge with main

* [AC-1124] Optimize unassigned ciphers query

* [AC-1124] Update migration script date

* [AC-1124] Update migration script date

* [AC-1124] Formatting
2024-02-08 14:07:58 -08:00
Colton Hurst
7cbe888b82
SM-1012: Removing SM Beta (Phase 2) (#3663)
* SM-1012: Phase 2, removing SM Beta from the server (but not db)

* SM-1012: Add migration for RemoveSMBetaFromOrganization

* SM-1012: Dotnet format

* SM-1012: Undo RemoveSMBetaFromOrganization EF migration

* SM-1012: Redo RemoveSMBetaFromOrganization EF migration

* SM-1012: Ran dotnet format
2024-02-05 15:51:31 -05:00
Matt Bishop
ae1fdb0992
[PM-5052] Upgrade to .NET 8 (#3461)
* Upgrade to .NET 8

* Linting

* Clean up old JSON deserialization code

* More .NET 8-oriented linting

* Light feedback

* Get rid of old test we don't know the root issue for

* Fix a new test

* Remove now-unnecessary Renovate constraint

* Use Any()

* Somehow a 6.0 tooling config we don't need snuck back in

* Space out properties that always change per release

* Bump a few core packages since the last update
2024-02-05 13:03:42 -05:00
Matt Bishop
472b1f8d44
[PM-5313] Upgrade to SQL Server 2022 (#3580)
* Upgrade to SQL Server 2022

* CU11
2024-02-02 09:35:00 -05:00
Matt Bishop
b20b8099a7
[PM-5314] Upgrade MSSQL cumulative update (#3548)
* Upgrade MSSQL cumulative update

* Go to 24
2024-02-02 08:57:19 -05:00
Rui Tomé
7bf17a20f4
[AC-2104] Add flexible collections properties to provider organizations sync response (#3717) 2024-01-29 14:04:45 -06:00
Rui Tomé
bac06763f5
[AC-1682] Flexible collections: data migrations for deprecated permissions (#3437)
* [AC-1682] Data migrations for OrgUsers or Groups with AccessAll enabled

* [AC-1682] Added script to update [dbo].[CollectionUser] with [Manage] = 1 for all users with Manager role or 'EditAssignedCollections' permission

* [AC-1682] Updated sql data migration procedures with performance recommendations

* [AC-1682] Moved data migration scripts to DbScripts_transition folder

* Apply suggestions from code review: Remove Manage permission from Collection assignments

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-1682] Removed unnecessary Collection table join on ManagersEditAssignedCollectionUsers sql script

* [AC-1682] Change JOIN to INNER JOIN in SQL scripts

* [AC-1682] Renamed sql script to recent date and added correct order to file name

* [AC-1682] Add new rows to CollectionUser for Managers and users with EditAssignedCollections permission assigned to groups with collection access

* [AC-1682] Update FC data migration scripts to clear AccessAll flags and set all Managers to Users

* [AC-1682] Updated data migration scripts to bump the account revision date

* [AC-1682] Created Organization_EnableCollectionEnhancements to migrate organization data for flexible collections

* [AC-1682] Added script to migrate all organization data for flexible collections

* [AC-1682] Deleted old data migration scripts

* Revert "[AC-1682] Deleted old data migration scripts"

This reverts commit 54cc6fab8f.

* [AC-1682] Modified AccessAllCollectionUsers script to bump revision date by each OrgUser

* [AC-1682] Update data migration script to only enable collection enhancements for organizations that have not yet migrated

* [AC-1682] Updated AccessAllCollectionGroups migration script to use User_BumpAccountRevisionDateByCollectionId

* [AC-1682] Bumped up the date on data migration scripts

* [AC-1682] Added back batching system to AccessAllCollectionUsers data migration script

* [AC-1682] Added data migration script to set FlexibleCollections = 1 for all orgs

* [AC-1682] Modified data migration script to contain multiple transactions

* [AC-1682] Deleted old data migration scripts

* [AC-1682] Placed temp tables outside transactions

* [AC-1682] Removed batching from AllOrgsEnableCollectionEnhancements script

* [AC-1682] Removed bulk data migration script

* [AC-1682] Refactor stored procedure to enable collection enhancements

* [AC-1682] Added missing where clause

* [AC-1682] Modified data migration script to have just one big transaction

* [AC-1682] Combining all updated OrganizationUserIds to bump all revision dates at the same time

* Update src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* [AC-1682] Renamed aliases

* [AC-1682] Simplified inner queries

* [AC-1682] Bumping each modified groups RevisionDate

* [AC-1682] Removed updating CollectionUser existing records with [ReadOnly] = 0 and [HidePasswords] = 0

* [AC-1682] Updating OrganizationUser RevisionDate

* [AC-1682] Updated the stored procedure file

* [AC-1682] Selecting distinct values to insert into CollectionUser table

* Revert "[AC-1682] Removed updating CollectionUser existing records with [ReadOnly] = 0 and [HidePasswords] = 0"

This reverts commit 086c88f3c6.

* [AC-1682] Bumped up the date on the migration script

* [AC-1682] Updating OrganizationUser RevisionDate

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-01-25 14:08:09 +00:00
Thomas Avery
880ceafe9f
[BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625)
* Add missing indexes to EF auth tables

* Add EF migrations
2024-01-17 10:42:43 -06:00
Matt Bishop
b97a1a9ed2
[PM-5519] [PM-5526] [PM-5624] [PM-5600] More Grant SQL fixes (#3668)
* SQLite scripts to apply autoincrementing Id key

* Drop erroneous Id column if created
2024-01-16 09:08:55 -05:00
Rui Tome
8a0e90c3a1
[AC-1682] sqlite data migrations 2024-01-15 16:33:08 +00:00
renovate[bot]
2df5fe1340
[deps] SM: Update EntityFrameworkCore to v7.0.15 (#3666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-12 16:30:23 -07:00
Rui Tome
57cb97dc2d
Merge branch 'ac/ac-1682/data-migrations-for-deprecated-permissions' into ac/ac-1682/ef-migrations 2024-01-12 18:35:26 +00:00
Rui Tome
667f3cdd00
Merge branch 'main' into ac/ac-1682/data-migrations-for-deprecated-permissions 2024-01-12 18:35:03 +00:00
Rui Tome
d5b41c1b51
[AC-1682] Updated postgres migrations 2024-01-12 15:33:35 +00:00
Rui Tome
752e2c01ea
[AC-1682] Updated mysql migrations 2024-01-12 15:01:01 +00:00
Rui Tome
19fb7e583e
[AC-1682] Bumped up the dates on the migration scripts 2024-01-12 12:54:34 +00:00
Rui Tome
5c08d181a4
Merge branch 'main' into ac/ac-1682/ef-migrations 2024-01-12 12:02:14 +00:00
Matt Bishop
db4d7aa609
[PM-5519] [PM-5526] [PM-5624] [PM-5600] Tweak EF settings for MySQL grant auto-increment (#3662)
* Tweak EF settings for grant auto-increment

* Go back to zero generated default as that doesn't matter

* Explicit value generation callout

* Go with custom SQL for direct automatic increment

* Proper column creation

* Lint
2024-01-11 16:06:29 -05:00
Rui Tome
96b5278d7c
[AC-1682] Removed batching from AllOrgsEnableCollectionEnhancements script 2024-01-11 18:31:47 +00:00
Rui Tome
c4ad7d72e8
[AC-1682] Placed temp tables outside transactions 2024-01-11 18:01:11 +00:00
Rui Tome
3bf1b53536
[AC-1682] Deleted old data migration scripts 2024-01-11 17:43:39 +00:00
Rui Tome
f78e28f037
[AC-1682] Modified data migration script to contain multiple transactions 2024-01-11 16:42:30 +00:00
Rui Tome
ba06076577
[AC-1682] Added data migration script to set FlexibleCollections = 1 for all orgs 2024-01-11 14:41:16 +00:00
Rui Tome
68c586f3c7
[AC-1682] Added back batching system to AccessAllCollectionUsers data migration script 2024-01-11 14:40:29 +00:00
Rui Tome
8a5ea76d8d
[AC-1682] Bumped up the date on data migration scripts 2024-01-11 14:04:51 +00:00
Rui Tome
8cc889554d
[AC-1682] Updated AccessAllCollectionGroups migration script to use User_BumpAccountRevisionDateByCollectionId 2024-01-11 13:58:45 +00:00