mirror of
https://github.com/bitwarden/server
synced 2026-02-28 18:33:51 +00:00
[PM-31052][PM-32469] Add V2UpgradeToken for key rotation without logout (#6995)
* User V2UpgradeToken for key rotation without logout * reset old v2 upgrade token on manual key rotation * sql migration fix * missing table column * missing view update * tests for V2UpgradeToken clearing on manual key rotation * V2 to V2 rotation causes logout. Updated wrapped key 1 to be a valid V2 encrypted string in tests. * integration tests failures - increase assert recent for date time type from 2 to 5 seconds (usually for UpdatedAt assertions) * repository test coverage * migration script update * new EF migration scripts * broken EF migration scripts fixed * refresh views due to User table alternation
This commit is contained in:
3588
util/PostgresMigrations/Migrations/20260219164255_V2UpgradeToken.Designer.cs
generated
Normal file
3588
util/PostgresMigrations/Migrations/20260219164255_V2UpgradeToken.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class V2UpgradeToken : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "V2UpgradeToken",
|
||||
table: "User",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "V2UpgradeToken",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
@@ -2058,6 +2058,9 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<bool>("UsesKeyConnector")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("V2UpgradeToken")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("VerifyDevices")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user