mirror of
https://github.com/bitwarden/server
synced 2026-02-25 17:03:22 +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:
@@ -255,6 +255,12 @@ public class UserRepository : Repository<Core.Entities.User, User, Guid>, IUserR
|
||||
userEntity.AccountRevisionDate = user.AccountRevisionDate;
|
||||
userEntity.RevisionDate = user.RevisionDate;
|
||||
|
||||
userEntity.SignedPublicKey = user.SignedPublicKey;
|
||||
userEntity.SecurityState = user.SecurityState;
|
||||
userEntity.SecurityVersion = user.SecurityVersion;
|
||||
|
||||
userEntity.V2UpgradeToken = user.V2UpgradeToken;
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
// Update re-encrypted data
|
||||
|
||||
Reference in New Issue
Block a user