mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 03:46:37 +00:00
3b5164032a
A RustFS cluster device needs a durable identity before it can exchange a one-time registration token for a certificate. This adds the device-side half of that exchange, which rustfs/connect already verifies. `connect::identity` builds the canonical registration transcript frozen by protocol/agent/v1/registration-proof.md, signs it as low-S ES256, and emits the PKCS#10 certificate request Connect consumes for its SubjectPublicKeyInfo. `connect::identity_store` seals the P-256 key at mode 0600 and publishes it through a no-clobber link, so a retry or a concurrent start returns the original identity rather than minting a second one, and a corrupt or widened key is refused rather than silently replaced. The protocol fixture set is copied here byte-identically because fixture-sets.json names this repository as the consumer copy; the tests verify it against its own manifests and cross-verify Connect-produced ECDSA proofs against transcripts rebuilt locally. Nothing starts a task or touches the S3 data path: an unenrolled deployment generates no key and holds no identity.
105 lines
4.2 KiB
JSON
105 lines
4.2 KiB
JSON
{
|
|
"protocolVersion": "v1",
|
|
"fixtureSet": "redaction",
|
|
"fixture": "allowed-vectors",
|
|
"description": "Ordinary collected documents. Every vector must survive with redactedCount 0: versions, counts, capacities, flags, and single-case digests are exactly what the L0 and L1 registry exists to collect, and over-redaction would make a support bundle useless.",
|
|
"vectors": [
|
|
{
|
|
"name": "a complete heartbeat payload",
|
|
"source": "heartbeat",
|
|
"document": {
|
|
"protocolVersion": 1,
|
|
"agentVersion": "rustfs-agent/1.19.4",
|
|
"capabilities": [
|
|
"inventory",
|
|
"events",
|
|
"jobs"
|
|
],
|
|
"sequence": 8421,
|
|
"clientTime": "2026-08-17T04:05:06Z",
|
|
"coarseNodeSummary": {
|
|
"total": 8,
|
|
"healthy": 7,
|
|
"degraded": 1
|
|
}
|
|
},
|
|
"expectedCanonicalJson": "{\"agentVersion\":\"rustfs-agent/1.19.4\",\"capabilities\":[\"inventory\",\"events\",\"jobs\"],\"clientTime\":\"2026-08-17T04:05:06Z\",\"coarseNodeSummary\":{\"degraded\":1,\"healthy\":7,\"total\":8},\"protocolVersion\":1,\"sequence\":8421}"
|
|
},
|
|
{
|
|
"name": "a complete inventory snapshot",
|
|
"source": "inventory",
|
|
"document": {
|
|
"rustfsVersion": "1.19.4",
|
|
"osVersion": "Ubuntu 22.04.5 LTS",
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityUsedBytes": 412316860416,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"coarseFlags": {
|
|
"degraded": false,
|
|
"readOnly": false,
|
|
"rebalancing": true
|
|
}
|
|
},
|
|
"expectedCanonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":{\"degraded\":false,\"readOnly\":false,\"rebalancing\":true},\"driveCount\":96,\"nodeCount\":8,\"osVersion\":\"Ubuntu 22.04.5 LTS\",\"rustfsVersion\":\"1.19.4\"}"
|
|
},
|
|
{
|
|
"name": "a complete offline diagnostic covering L0 and L1",
|
|
"source": "offline-diagnostic",
|
|
"document": {
|
|
"rustfsVersion": "1.19.4",
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityUsedBytes": 412316860416,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"coarseHealthFlags": {
|
|
"degraded": false
|
|
},
|
|
"osSummary": "Ubuntu 22.04.5 LTS",
|
|
"kernelSummary": "6.8.0-51-generic",
|
|
"cpuSummary": {
|
|
"architecture": "aarch64",
|
|
"cores": 64
|
|
},
|
|
"memorySummary": {
|
|
"totalBytes": 274877906944,
|
|
"underPressure": false
|
|
},
|
|
"filesystemSummary": [
|
|
"xfs",
|
|
"ext4"
|
|
],
|
|
"networkSummary": {
|
|
"interfaceCount": 4,
|
|
"bondCount": 2
|
|
}
|
|
},
|
|
"expectedCanonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseHealthFlags\":{\"degraded\":false},\"cpuSummary\":{\"architecture\":\"aarch64\",\"cores\":64},\"driveCount\":96,\"filesystemSummary\":[\"xfs\",\"ext4\"],\"kernelSummary\":\"6.8.0-51-generic\",\"memorySummary\":{\"totalBytes\":274877906944,\"underPressure\":false},\"networkSummary\":{\"bondCount\":2,\"interfaceCount\":4},\"nodeCount\":8,\"osSummary\":\"Ubuntu 22.04.5 LTS\",\"rustfsVersion\":\"1.19.4\"}"
|
|
},
|
|
{
|
|
"name": "single-case digests and long identifiers are not mistaken for key material",
|
|
"source": "inventory",
|
|
"document": {
|
|
"rustfsVersion": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
|
|
"osVersion": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"
|
|
},
|
|
"expectedCanonicalJson": "{\"osVersion\":\"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855\",\"rustfsVersion\":\"da39a3ee5e6b4b0d3255bfef95601890afd80709\"}"
|
|
},
|
|
{
|
|
"name": "extreme but ordinary capacity and count values survive unchanged",
|
|
"source": "inventory",
|
|
"document": {
|
|
"nodeCount": 0,
|
|
"driveCount": 1024,
|
|
"capacityUsedBytes": 0,
|
|
"capacityTotalBytes": 9223372036854775807,
|
|
"coarseFlags": {
|
|
"degraded": null,
|
|
"utilisation": 0.9375
|
|
}
|
|
},
|
|
"expectedCanonicalJson": "{\"capacityTotalBytes\":9223372036854775807,\"capacityUsedBytes\":0,\"coarseFlags\":{\"degraded\":null,\"utilisation\":0.9375},\"driveCount\":1024,\"nodeCount\":0}"
|
|
}
|
|
]
|
|
}
|