1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[PM-1380] Modify Device Table (#2937)

* Update Models

- Add Controller Method

* Add MSSQL Migration

* Update SQL Proj

* Update SQL Migration

* Update Models

* Update SQL Project

* Add EF Migrations

* Switch to using Identifier

* Update Code Comment
This commit is contained in:
Justin Baur
2023-06-09 21:36:12 -04:00
committed by GitHub
parent 5f4a303180
commit 5874ff42c3
17 changed files with 6978 additions and 7 deletions

View File

@ -17,6 +17,26 @@ public class Device : ITableObject<Guid>
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
/// <summary>
/// Intended to be the users symmetric key that is encrypted in some form, the current way to encrypt this is with
/// the devices public key.
/// </summary>
public string EncryptedUserKey { get; set; }
/// <summary>
/// Intended to be the public key that was generated for a device upon trust and encrypted. Currenly encrypted using
/// a users symmetric key so that when trusted and unlocked a user can decrypt the public key for all their devices.
/// This enabled a user to rotate the keys for all of their devices.
/// </summary>
public string EncryptedPublicKey { get; set; }
/// <summary>
/// Intended to be the private key that was generated for a device upon trust and encrypted. Currenly encrypted with
/// the devices key, that upon successful login a user can decrypt this value and therefor decrypt their vault.
/// </summary>
public string EncryptedPrivateKey { get; set; }
public void SetNewId()
{
Id = CoreHelpers.GenerateComb();