mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 19:42:17 +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.
231 lines
8.5 KiB
JSON
231 lines
8.5 KiB
JSON
{
|
|
"protocolVersion": "v1",
|
|
"fixtureSet": "inventory",
|
|
"fixture": "unknown-field-vectors",
|
|
"description": "Unknown optional members and unknown coarse flag tokens. Every one is accepted, discarded before validation, never persisted, never echoed back, and never logged in raw form. Every vector here carries the same content hash as the valid fixture's fully populated snapshot, which is the executable statement that an unknown member cannot influence stored inventory. The discarded list is bookkeeping: its membership is the contract, not its order.",
|
|
"baseVector": "fully populated snapshot",
|
|
"baseContentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"vectors": [
|
|
{
|
|
"name": "one unknown optional member from a newer agent",
|
|
"category": "unknown-field",
|
|
"sameContentHashAs": "fully populated snapshot",
|
|
"input": {
|
|
"protocolVersion": "v1",
|
|
"rustfsVersion": "1.4.2",
|
|
"osVersion": { "family": "linux", "major": 6, "minor": 8 },
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"capacityUsedBytes": 412316860416,
|
|
"coarseFlags": ["cluster.degraded", "drive.offline"],
|
|
"telemetryProfile": "extended"
|
|
},
|
|
"expected": {
|
|
"decision": "ACCEPT",
|
|
"reason": null,
|
|
"httpStatus": null,
|
|
"retained": [
|
|
"protocolVersion",
|
|
"rustfsVersion",
|
|
"osVersion",
|
|
"nodeCount",
|
|
"driveCount",
|
|
"capacityTotalBytes",
|
|
"capacityUsedBytes",
|
|
"coarseFlags"
|
|
],
|
|
"discarded": ["telemetryProfile"],
|
|
"defaultsApplied": {},
|
|
"canonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":[\"cluster.degraded\",\"drive.offline\"],\"driveCount\":96,\"nodeCount\":8,\"osVersion\":{\"family\":\"linux\",\"major\":6,\"minor\":8},\"rustfsVersion\":\"1.4.2\"}",
|
|
"contentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"echoedBack": [],
|
|
"stored": [],
|
|
"logged": []
|
|
}
|
|
},
|
|
{
|
|
"name": "unknown optional members of every JSON type at once",
|
|
"category": "unknown-field",
|
|
"sameContentHashAs": "fully populated snapshot",
|
|
"input": {
|
|
"protocolVersion": "v1",
|
|
"rustfsVersion": "1.4.2",
|
|
"osVersion": { "family": "linux", "major": 6, "minor": 8 },
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"capacityUsedBytes": 412316860416,
|
|
"coarseFlags": ["cluster.degraded", "drive.offline"],
|
|
"erasureSetSize": 12,
|
|
"experimentalFlags": { "fastInventory": true },
|
|
"regionHints": ["eu-west", "us-east"],
|
|
"supersededBy": null,
|
|
"telemetryProfile": "extended"
|
|
},
|
|
"expected": {
|
|
"decision": "ACCEPT",
|
|
"reason": null,
|
|
"httpStatus": null,
|
|
"retained": [
|
|
"protocolVersion",
|
|
"rustfsVersion",
|
|
"osVersion",
|
|
"nodeCount",
|
|
"driveCount",
|
|
"capacityTotalBytes",
|
|
"capacityUsedBytes",
|
|
"coarseFlags"
|
|
],
|
|
"discarded": [
|
|
"erasureSetSize",
|
|
"experimentalFlags",
|
|
"regionHints",
|
|
"supersededBy",
|
|
"telemetryProfile"
|
|
],
|
|
"defaultsApplied": {},
|
|
"canonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":[\"cluster.degraded\",\"drive.offline\"],\"driveCount\":96,\"nodeCount\":8,\"osVersion\":{\"family\":\"linux\",\"major\":6,\"minor\":8},\"rustfsVersion\":\"1.4.2\"}",
|
|
"contentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"echoedBack": [],
|
|
"stored": [],
|
|
"logged": []
|
|
}
|
|
},
|
|
{
|
|
"name": "unknown member nested inside osVersion",
|
|
"category": "unknown-field",
|
|
"sameContentHashAs": "fully populated snapshot",
|
|
"input": {
|
|
"protocolVersion": "v1",
|
|
"rustfsVersion": "1.4.2",
|
|
"osVersion": {
|
|
"family": "linux",
|
|
"major": 6,
|
|
"minor": 8,
|
|
"distribution": "debian",
|
|
"kernelRelease": "6.8.0-41-generic"
|
|
},
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"capacityUsedBytes": 412316860416,
|
|
"coarseFlags": ["cluster.degraded", "drive.offline"]
|
|
},
|
|
"expected": {
|
|
"decision": "ACCEPT",
|
|
"reason": null,
|
|
"httpStatus": null,
|
|
"retained": [
|
|
"protocolVersion",
|
|
"rustfsVersion",
|
|
"osVersion",
|
|
"nodeCount",
|
|
"driveCount",
|
|
"capacityTotalBytes",
|
|
"capacityUsedBytes",
|
|
"coarseFlags"
|
|
],
|
|
"discarded": ["osVersion.distribution", "osVersion.kernelRelease"],
|
|
"defaultsApplied": {},
|
|
"canonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":[\"cluster.degraded\",\"drive.offline\"],\"driveCount\":96,\"nodeCount\":8,\"osVersion\":{\"family\":\"linux\",\"major\":6,\"minor\":8},\"rustfsVersion\":\"1.4.2\"}",
|
|
"contentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"echoedBack": [],
|
|
"stored": [],
|
|
"logged": []
|
|
}
|
|
},
|
|
{
|
|
"name": "coarse flag tokens this Connect does not know",
|
|
"category": "unknown-field",
|
|
"sameContentHashAs": "fully populated snapshot",
|
|
"input": {
|
|
"protocolVersion": "v1",
|
|
"rustfsVersion": "1.4.2",
|
|
"osVersion": { "family": "linux", "major": 6, "minor": 8 },
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"capacityUsedBytes": 412316860416,
|
|
"coarseFlags": [
|
|
"cluster.degraded",
|
|
"drive.offline",
|
|
"rebalance.pending",
|
|
"tier.transition.stalled"
|
|
]
|
|
},
|
|
"expected": {
|
|
"decision": "ACCEPT",
|
|
"reason": null,
|
|
"httpStatus": null,
|
|
"retained": [
|
|
"protocolVersion",
|
|
"rustfsVersion",
|
|
"osVersion",
|
|
"nodeCount",
|
|
"driveCount",
|
|
"capacityTotalBytes",
|
|
"capacityUsedBytes",
|
|
"coarseFlags"
|
|
],
|
|
"discarded": [
|
|
"coarseFlags[rebalance.pending]",
|
|
"coarseFlags[tier.transition.stalled]"
|
|
],
|
|
"defaultsApplied": {},
|
|
"canonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":[\"cluster.degraded\",\"drive.offline\"],\"driveCount\":96,\"nodeCount\":8,\"osVersion\":{\"family\":\"linux\",\"major\":6,\"minor\":8},\"rustfsVersion\":\"1.4.2\"}",
|
|
"contentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"echoedBack": [],
|
|
"stored": [],
|
|
"logged": []
|
|
}
|
|
},
|
|
{
|
|
"name": "near-miss member names are unknown because matching is exact and case sensitive",
|
|
"category": "unknown-field",
|
|
"sameContentHashAs": "fully populated snapshot",
|
|
"input": {
|
|
"protocolVersion": "v1",
|
|
"rustfsVersion": "1.4.2",
|
|
"osVersion": { "family": "linux", "major": 6, "minor": 8 },
|
|
"nodeCount": 8,
|
|
"driveCount": 96,
|
|
"capacityTotalBytes": 1099511627776,
|
|
"capacityUsedBytes": 412316860416,
|
|
"coarseFlags": ["cluster.degraded", "drive.offline"],
|
|
"RustfsVersion": "1.4.2",
|
|
"capacityFreeBytes": 687194767360,
|
|
"capacity_used_bytes": 412316860416,
|
|
"nodeCounts": 8
|
|
},
|
|
"expected": {
|
|
"decision": "ACCEPT",
|
|
"reason": null,
|
|
"httpStatus": null,
|
|
"retained": [
|
|
"protocolVersion",
|
|
"rustfsVersion",
|
|
"osVersion",
|
|
"nodeCount",
|
|
"driveCount",
|
|
"capacityTotalBytes",
|
|
"capacityUsedBytes",
|
|
"coarseFlags"
|
|
],
|
|
"discarded": [
|
|
"RustfsVersion",
|
|
"capacityFreeBytes",
|
|
"capacity_used_bytes",
|
|
"nodeCounts"
|
|
],
|
|
"defaultsApplied": {},
|
|
"canonicalJson": "{\"capacityTotalBytes\":1099511627776,\"capacityUsedBytes\":412316860416,\"coarseFlags\":[\"cluster.degraded\",\"drive.offline\"],\"driveCount\":96,\"nodeCount\":8,\"osVersion\":{\"family\":\"linux\",\"major\":6,\"minor\":8},\"rustfsVersion\":\"1.4.2\"}",
|
|
"contentHash": "e1cba9f30a26b94bb289a8a4b630a704dafaeb4960bffd38cef98e3d2581518f",
|
|
"echoedBack": [],
|
|
"stored": [],
|
|
"logged": []
|
|
}
|
|
}
|
|
]
|
|
}
|