Repository navigation
feat(site): Exercise federated bootstrap delivery with synthetic fixtures - #209
Conversation
203d45b to
144c0ce
Compare
21bf466 to
137147b
Compare
144c0ce to
8ffad90
Compare
36d69d2 to
f3b7885
Compare
… kind Federation refused bootstrap data. The hub now writes each payload as a MachineAllocationPayload beside its handoff, before the handoff that names it, and deletes it when the coordinator answers the result, which removes the cell's copy. A worker that runs before the payload arrives sends nothing, stores no result, and is retried. The payload is its own kind, not a Secret. Karmada's member identity watches every propagated kind cluster-wide, and the lab BMC's credentials are Secrets, so a Secret transport would have exposed them. On this kind, the member identity, kro and the worker each hold only what they need: kro holds get to grant each worker get on its one payload, and holds no escalate or bind. The worker identity policy admits only the per-operation Role and binding shapes, on create and update, and a new policy refuses any cluster-wide RBAC kro writes. A test against a real API server runs each refused shape as kro and shows it is admitted once the one rule it tests is removed. The harness probes the same shapes on the live cell. Also add the NoCloud seed archive a network boot will load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The local VM and Redfish workers refused bootstrap data. The worker now renders the verified payload as a NoCloud seed archive on the operation's boot admission. The boot service serves it as a second initrd only while the admission is open, and the admission drops it when it closes. The installer copies it to the disk, and on its first disk boot the installed system prints the salted digest of what it found. The worker requires exactly that line before it reports success, and the evidence carries the digest. A direct kernel boot refuses bootstrap data. Consumer A's multi-plane install carries synthetic bootstrap data, and the evidence checks the guest's report and that no payload copy remains. The hub now deletes every payload no delivered operation needs after each complete coordinator pass, so a payload of an operation that ended without a collected result does not outlive it. A worker retries only while its payload is missing, and refuses one that does not decode. kro's Job policy refuses environment from Secrets and any program but the site worker for its own handoff. The policy test weakens the exact clauses each refused shape names, including binding a worker to kro's own Role, and waits for the policies to take effect before counting an admission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bootstrap seed stayed in a boot admission whenever an install did not reach a clean close: a failure before the admission opened, an expired admission, or an error out of the Redfish wait. Kinds that keep payload copies in their own site records now scrub them when the operation's result is stored, and whenever the site raises the Device's fence, so a superseded install's seed goes too. Test that a failed and an expired install drop the seed, that a recovery fence drops a superseded one, that each coordinator pass keeps exactly the delivered operations' payloads and a failed pass sweeps nothing, and that every hub delete carries the listed UID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the Redfish counterpart of the local VM test: a recovery that only raises the fence drops the seed a superseded install left behind. Rewrap the status page's guest paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install success depended on the installed OS printing the salted digest of its bootstrap data on first boot, but Fleet does not own the guest OS. The installer now reads the seed back from the target disk past the page cache, checks that the NoCloud user data and the authorized keys match it, and prints the salted digest before its own receipt. The worker requires exactly the admitted digest from the installer before it lets the disk boot run, and the evidence records it as installerVerifiedBootstrap. A wrong, truncated or missing report fails the install before the disk boot. The installed system no longer prints anything about bootstrap data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standalone smoke still read the renamed evidence field. Cover a Redfish line for another receipt and a seed the boot never fetched, and drop the guest wording from the seed comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install success stays installer-verified. On its first disk boot, the lab guest now checks that the user data and keys are where NoCloud and SSH read them and prints the salted digest on a separate line, which no worker reads. The multi-plane evidence requires that line for consumer A's install in both the local VM and Redfish modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8ffad90 to
82aaca1
Compare
f3b7885 to
c714ee1
Compare
ecv
left a comment
There was a problem hiding this comment.
Request changes.
This turns bootstrap delivery on for federation, and the seed it serves contradicts the boot-delivery design merged in #227. It also conflicts with its base.
- The seed holds tenant user-data and SSH keys, and is served as
seed.cpioover plain HTTP. Any host on the boot network that knows a server's MAC getsboot.ipxefrom/pxe/<mac>/, with its capability token, and can then fetch the seed as often as it likes while the admission is open. The doc calls this lab-only, but #199 left federation refusing bootstrap (Hub.DeliverreturnedErrBootstrapUnsupported), and this PR is what makes federation carry it. Nothing in the code limits it to the lab. - #227, merged 28 Nov, serves bootstrap data only over HTTPS that the BMC verifies, and proves success from the installed OS's first-boot report. This PR serves HTTP and treats the installer's read-back as proof ("success never depends on the installed OS"). Either follow #227, or gate this path to the lab explicitly and update the doc so the two do not conflict.
- GitHub reports this CONFLICTING with
feat/sealed-bootstrap; #199's base has also moved. Rebase after #199. - The rest is carefully scoped. Payloads travel as their own
MachineAllocationPayloadkind, never a Secret and never in the handoff. Each worker may get only its own payload by name, and kro holds only get. Thefleet-site-kro-worker-identityandfleet-site-kro-cluster-rbacpolicies are tested against a real API server.Forgetdeletes the hub's payload before marking the result answered, and the sweep runs only after a complete pass. Removing any of these guards fails a test: the complete-pass condition, the hub sweep's keep list, delete-on-answer, the payload match on deliver, the fence scrub of a superseded seed, and the installer-digest requirement.
Follow-ups:
- Removing the seed in
closeBoot(VM) or the Redfish close (boot.Seed = nil) leaves every site test green. The server'sClosedcheck and the result-time scrub cover it, but the seed stays in the site store longer than the doc says. - Nothing tests the cell's check that
spec.payloadequals the derived name; add a case where a handoff names another operation's payload. - The installer leaves
/fleet-bootstrap/{salt,data}on the installed disk. The payload JSON is not needed after first boot. - Encryption at rest for
MachineAllocationPayloadand the Karmada Work objects that carry it, which the PR defers.
|
@ecv I kept federated customer bootstrap disabled rather than claiming the provisioning bridge is confidential. At Tests cover default hub refusal with zero API actions, denied HTTP reads against open admissions in both workers, seed removal at close, and a handoff naming another operation's derived payload. Raw network-seed JSON and salt stay in the initramfs; only NoCloud files and authorized keys are installed. Encryption at rest and audit-body omission for provider payloads, hub/cell payloads and Karmada Work remain prerequisites, not claims about deployment. Focused worker, custody, allocation and transport tests, real-API negative authorization tests, renders and the offline harness passed. No live multi-plane or hardware acceptance was run. The branch includes the updated #199 head without rewriting history. |
ecv
left a comment
There was a problem hiding this comment.
Approve.
The head resolves all three points of the earlier hold: the path is now test-only, the docs say so and defer to #227, and the PR no longer conflicts.
- Seed served over plain HTTP, not limited to the lab: resolved. The seed gate is a private
fixtureSeedsfield that only in-package tests set. The hub'sCarriesPayloadsreturns it and ordinary federation returnsErrBootstrapUnsupportedbefore any payload or handoff is written. The cell refuses before fetching a payload. The Redfish and VM boot services refuseseed.cpiounless the same flag is set, even for an open admission. There is no flag, config or deployment path that turns it on. - Contradiction with #227: resolved.
machine-images.mdnow calls the installer readback a test assertion, states that #227's certificate-verified HTTPS plus the installed OS's first-boot report is the success proof, and says customer bootstrap via virtual media stays refused. The roadmap andredfish-lab.mdno longer claim a proposed lab proof or a HTTP seed in the lab. - Conflict with
feat/sealed-bootstrap: resolved. GitHub reports it mergeable, andgit merge-treeof the head with staging is clean. - Forcing
fixtureSeedsto true failsTestFederationRefusesSeedsBeforeAnyWrite,TestOrdinaryBootServerRefusesSeedBeforeCloseandTestTheBootServerServesTheSeedOnlyWhileOpen, so the gate is guarded on the hub and both boot services.
Follow-ups:
- Earlier follow-ups still stand: a test where a handoff names another operation's payload, a test that fails when the seed is not cleared at boot close, and the installer leaving
/fleet-bootstrap/{salt,data}on the installed disk. - When this is promoted from test-only, replace HTTP seed serving with the #227 HTTPS path instead of lifting the flag; encryption at rest for
MachineAllocationPayloadand the Work objects is still open.
ecv
left a comment
There was a problem hiding this comment.
Approve.
The delta since my last review is a merge of the updated stack base, which now carries the merged cleaning policy, drive discovery, power UI and multi-plane changes. The hand resolutions keep both sides: the catalog and cleaning imports and fixtures, both CRDs and protected resources, and the installation-requester role holding both cleaningpolicies get and sealedpayloads create. Earlier findings stand.
This test-only prototype transports a synthetic seed in a separate
MachineAllocationPayload. Each worker has named-object access; the hub deletes answered payloads and sweeps after complete passes. Both boot workers scrub retained seed bytes at close. The network installer writes only the NoCloud files and authorized keys to disk, not raw JSON or salt.Ordinary federation refuses before payload or handoff creation. Cells refuse before fetching a seed, and HTTP boot services refuse seed requests even for open admissions. Only in-package tests enable this path; there is no runtime opt-in, live lab fixture or deployment path. Installer readback is not the verified HTTPS transport or installed-OS first-boot report required by #227. Customer bootstrap via virtual media is refused.
The branch includes #199 at
cc8b7ea4. Local checks cover scoped Go tests, real-API authorization, renders, documentation and the offline harness. No live multi-plane or hardware acceptance was run. Payload and Karmada Work encryption at rest and audit-body omission are documented prerequisites, not deployed controls.