mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 14:13:18 +08:00
Add cipher seeding with Rust SDK encryption to enable cryptographically correct test data generation (#6896)
This commit is contained in:
96
util/Seeder/Models/EncryptedCipherDto.cs
Normal file
96
util/Seeder/Models/EncryptedCipherDto.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Bit.Seeder.Models;
|
||||
|
||||
public class EncryptedCipherDto
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("organizationId")]
|
||||
public Guid? OrganizationId { get; set; }
|
||||
|
||||
[JsonPropertyName("folderId")]
|
||||
public Guid? FolderId { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("notes")]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonPropertyName("login")]
|
||||
public EncryptedLoginDto? Login { get; set; }
|
||||
|
||||
[JsonPropertyName("fields")]
|
||||
public List<EncryptedFieldDto>? Fields { get; set; }
|
||||
|
||||
[JsonPropertyName("favorite")]
|
||||
public bool Favorite { get; set; }
|
||||
|
||||
[JsonPropertyName("reprompt")]
|
||||
public int Reprompt { get; set; }
|
||||
|
||||
[JsonPropertyName("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonPropertyName("creationDate")]
|
||||
public DateTime CreationDate { get; set; }
|
||||
|
||||
[JsonPropertyName("revisionDate")]
|
||||
public DateTime RevisionDate { get; set; }
|
||||
|
||||
[JsonPropertyName("deletedDate")]
|
||||
public DateTime? DeletedDate { get; set; }
|
||||
}
|
||||
|
||||
public class EncryptedLoginDto
|
||||
{
|
||||
[JsonPropertyName("username")]
|
||||
public string? Username { get; set; }
|
||||
|
||||
[JsonPropertyName("password")]
|
||||
public string? Password { get; set; }
|
||||
|
||||
[JsonPropertyName("totp")]
|
||||
public string? Totp { get; set; }
|
||||
|
||||
[JsonPropertyName("uris")]
|
||||
public List<EncryptedLoginUriDto>? Uris { get; set; }
|
||||
|
||||
[JsonPropertyName("passwordRevisionDate")]
|
||||
public DateTime? PasswordRevisionDate { get; set; }
|
||||
|
||||
[JsonPropertyName("fido2Credentials")]
|
||||
public object? Fido2Credentials { get; set; }
|
||||
}
|
||||
|
||||
public class EncryptedLoginUriDto
|
||||
{
|
||||
[JsonPropertyName("uri")]
|
||||
public string? Uri { get; set; }
|
||||
|
||||
[JsonPropertyName("match")]
|
||||
public int? Match { get; set; }
|
||||
|
||||
[JsonPropertyName("uriChecksum")]
|
||||
public string? UriChecksum { get; set; }
|
||||
}
|
||||
|
||||
public class EncryptedFieldDto
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("value")]
|
||||
public string? Value { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonPropertyName("linkedId")]
|
||||
public int? LinkedId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user