Add cipher seeding with Rust SDK encryption to enable cryptographically correct test data generation (#6896)

This commit is contained in:
Mick Letofsky
2026-01-30 13:53:24 +01:00
committed by GitHub
parent 93a28eed40
commit bfc645e1c1
40 changed files with 3245 additions and 48 deletions

View 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; }
}