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.
108 lines
3.1 KiB
JSON
108 lines
3.1 KiB
JSON
{
|
|
"protocolVersion": "v1",
|
|
"fixtureSet": "redaction",
|
|
"fixture": "rejection-vectors",
|
|
"description": "The input budget. A document the engine cannot scan inside its budget is refused whole rather than partially redacted, and every refusal message is built from a literal and an integer so no part of the input reaches the message or the stack trace.",
|
|
"builders": {
|
|
"literal": "Use document as it stands.",
|
|
"nestedDepth": "{field: {nested: {... depth times ...: {leaf: 1}}}}.",
|
|
"listNodes": "{field: [1 repeated count times]}.",
|
|
"bulkStrings": "{field: {f0..f(entries-1): 'a' repeated valueBytes times}}.",
|
|
"unrepresentable": "{field: NaN}, a float no JSON encoder can represent."
|
|
},
|
|
"vectors": [
|
|
{
|
|
"name": "a surface that is not a registered collection surface",
|
|
"source": "support-bundle",
|
|
"build": {
|
|
"kind": "literal",
|
|
"document": {
|
|
"rustfsVersion": "1.19.4"
|
|
}
|
|
},
|
|
"expected": {
|
|
"refused": true,
|
|
"message": "Redaction refused the document: it names no registered collection surface."
|
|
}
|
|
},
|
|
{
|
|
"name": "a document larger than the input budget",
|
|
"source": "inventory",
|
|
"build": {
|
|
"kind": "bulkStrings",
|
|
"field": "coarseFlags",
|
|
"entries": 100,
|
|
"valueBytes": 4000
|
|
},
|
|
"expected": {
|
|
"refused": true,
|
|
"message": "Redaction refused the document: its size in bytes exceeds the frozen budget of 262144."
|
|
}
|
|
},
|
|
{
|
|
"name": "a document nested past the depth budget",
|
|
"source": "heartbeat",
|
|
"build": {
|
|
"kind": "nestedDepth",
|
|
"field": "coarseNodeSummary",
|
|
"depth": 8
|
|
},
|
|
"expected": {
|
|
"refused": true,
|
|
"message": "Redaction refused the document: its nesting depth exceeds the frozen budget of 8."
|
|
}
|
|
},
|
|
{
|
|
"name": "a document with more nodes than the node budget",
|
|
"source": "heartbeat",
|
|
"build": {
|
|
"kind": "listNodes",
|
|
"field": "capabilities",
|
|
"count": 4096
|
|
},
|
|
"expected": {
|
|
"refused": true,
|
|
"message": "Redaction refused the document: its node count exceeds the frozen budget of 4096."
|
|
}
|
|
},
|
|
{
|
|
"name": "a value no JSON encoder can represent",
|
|
"source": "inventory",
|
|
"build": {
|
|
"kind": "unrepresentable",
|
|
"field": "capacityUsedBytes"
|
|
},
|
|
"expected": {
|
|
"refused": true,
|
|
"message": "Redaction refused the document: it is not representable as JSON."
|
|
}
|
|
},
|
|
{
|
|
"name": "the deepest document the depth budget still accepts",
|
|
"source": "heartbeat",
|
|
"build": {
|
|
"kind": "nestedDepth",
|
|
"field": "coarseNodeSummary",
|
|
"depth": 7
|
|
},
|
|
"expected": {
|
|
"refused": false,
|
|
"redactedCount": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "the largest node count the node budget still accepts",
|
|
"source": "heartbeat",
|
|
"build": {
|
|
"kind": "listNodes",
|
|
"field": "capabilities",
|
|
"count": 4095
|
|
},
|
|
"expected": {
|
|
"refused": false,
|
|
"redactedCount": 0
|
|
}
|
|
}
|
|
]
|
|
}
|