feat: operator trust root: passkey-signed operator set, signed join codes, nodes verify and pin the chain at enrollment [CI SKIP]

This commit is contained in:
justme committed 2026-10-07 23:19:59 +08:00
1 parent 321cacac32
commit fc2bbdcc6d
35 files changed
+1374 -40

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
using System.Text.Json.Serialization;
namespace Fleet.Core;
/// <summary>passkey 对一段语句签出的断言(字段都是 base64url)。信任链的格式和验证在 Fleet.Identity 的 <c>OperatorTrust</c>。</summary>
public sealed class SignedStatementDto
{
[JsonPropertyName("statement")]
public string Statement { get; set; } = "";
[JsonPropertyName("credential_id")]
public string CredentialId { get; set; } = "";
[JsonPropertyName("authenticator_data")]
public string AuthenticatorData { get; set; } = "";
[JsonPropertyName("client_data_json")]
public string ClientDataJson { get; set; } = "";
[JsonPropertyName("signature")]
public string Signature { get; set; } = "";
}
/// <summary>一个成员带的证明:操作员签的委托,加加入码的私钥签的绑定。</summary>
public sealed class MemberProofDto
{
[JsonPropertyName("grant")]
public SignedStatementDto Grant { get; set; } = new();
[JsonPropertyName("binding")]
public string Binding { get; set; } = "";
[JsonPropertyName("binding_signature")]
public string BindingSignature { get; set; } = "";
}
/// <summary>操作员集合的链(创世在前),可选带一个委托(注册前取的,节点验过之后才继续)。</summary>
public sealed class TrustBundle
{
[JsonPropertyName("chain")]
public List<SignedStatementDto> Chain { get; set; } = [];
[JsonPropertyName("grant")]
public SignedStatementDto? Grant { get; set; }
}