namespace ZB.MOM.WW.Secrets.Abstractions; /// /// The safe, UI-facing projection of a secret. Deliberately carries no /// array members, so neither ciphertext nor plaintext can leak into /// rendered markup or logs via this type — it is safe to bind directly in management UIs. /// public record SecretMetadata { /// The normalized secret name. public required SecretName Name { get; init; } /// Optional human-readable description. public string? Description { get; init; } /// How the decrypted plaintext should be interpreted. public required SecretContentType ContentType { get; init; } /// Identifier of the key-encryption key (KEK) that wrapped the DEK. public required string KekId { get; init; } /// Monotonic revision number. public required long Revision { get; init; } /// Whether the secret is soft-deleted (tombstoned). public bool IsDeleted { get; init; } /// When the secret was first created (UTC). public required DateTimeOffset CreatedUtc { get; init; } /// When the secret was last updated (UTC). public required DateTimeOffset UpdatedUtc { get; init; } /// Principal that created the secret, if known. public string? CreatedBy { get; init; } /// Principal that last updated the secret, if known. public string? UpdatedBy { get; init; } }