Skip to content

feat(custody): Let customers pass bootstrap data through a sealed store - #199

Merged
scotwells merged 5 commits into
feat/manual-inventory-recordsfrom
feat/sealed-bootstrap
Nov 29, 2026
Merged

scotwells merged 5 commits into
feat/manual-inventory-recordsfrom
feat/sealed-bootstrap

Conversation

@scotwells

@scotwells scotwells commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Fleet admits catalog-selected images with optional simulator bootstrap data. The requester creates a sealed payload; custody verifies its salted digest before advancing the fence. Operations and evidence retain references or digests rather than plaintext. The coordinator alone reads the sealed store. Site-declared delivery methods, boot-address claims, commissioning and capacity projection remain in effect.

The branch integrates #192 through 6fff2486. Ordinary federation refuses customer bootstrap. Milo encryption at rest, audit-body omission and creator-scoped source Secret authorization remain prerequisites for production.

Focused Go and envtest admission, NSO release and negative authorization tests, standalone and synthetic-staging renders, the offline harness and documentation links passed locally. No live multi-plane acceptance or hardware operations were run.

scotwells and others added 2 commits November 25, 2026 19:21
Installs refused bootstrap data because nothing could hold it. The
Fleet provider now reads a customer's bootstrap Secret, seals it with a
random salt into an immutable SealedPayload in the provider project,
and creates a DeviceInstallation that carries only the payload's name
and salted digest. A retry after admission returns the operation and
seals nothing new.

The coordinator checks the payload at admission and fails the
operation with BootstrapUnavailable, sending nothing, if it is missing
or altered. Each pass it deletes payloads whose operation ended, that
their operation does not name, or that wait for an operation under an
allocation that is no longer Active. The courier delivers the payload
beside the assignment, the site takes the reference from the admitted
inputs, checks the payload again before anything is sent, and deletes
it when the operation ends or a newer fence passes it. Install evidence
must name the digest of the data handed to the server.

Only the coordinator role reads the sealed store, and a test walks
every Milo role the repository ships to prove it. The simulator site
carries bootstrap data end to end. Federation and the local VM and
Redfish sites refuse it until the lab increment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrive

A payload whose worker never ran stayed on the site disk after a
recovery raised the fence. The site now removes every payload below a
Device's fence whenever it raises one, and forgetting an answered
result removes its payload.

Bootstrap data must be UTF-8 and fit in 96 KiB once encoded, so a site
always receives exactly what the customer stored. Admission refuses
bootstrap data for a Device whose sites cannot receive payloads, so a
federated install fails at once instead of holding the server until
its deadline.

Add tests for the courier, the site API payload path, the hub refusal,
recovery pruning, and the new limits, and correct the status page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/machine-image-catalog branch from 5b0555d to 00111b7 Compare November 26, 2026 01:22
@scotwells
scotwells force-pushed the feat/sealed-bootstrap branch from 8ffad90 to 82aaca1 Compare November 26, 2026 01:22
@scotwells
scotwells marked this pull request as ready for review November 29, 2026 19:28
@scotwells
scotwells requested a review from a team as a code owner November 29, 2026 19:28

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

The sealed store is sound. RBAC, digest binding, wiping and size limits are tested, and every guard but one fails a test when removed. The head now merges the moved feat/machine-image-catalog with no hand-resolved conflicts.

  • Read access: the coordinator is the only role with get/list/watch/delete on sealedpayloads, the provider role has create only, and nothing in config/ or hack/ grants a wildcard. TestNoStaffRoleReadsTheSealedStore walks every shipped Milo role, resolving inheritance. The CRD is immutable, has no status, and names the payload by operation plus salted digest, so a retry cannot put new contents under an old name.
  • Tenancy: admission and the courier read the payload with a namespaced Get, so another project's payload is never found. Verify binds the payload name, operation and digest, and rechecks the salted hash. One field is not bound: spec.allocationName is read only by the sweep, and neither Verify nor the courier compares it. The operation name derives from the allocation, so the reach is small and stays inside one project, but add the comparison and a test.
  • The production check that makes reads safe sits outside this PR: sealed.Read says its caller "must act for the Installation's creator", and the only callers today are the standalone and multiplane fixtures, which read with their own identity. The real provider caller must not read with a broad identity.
  • Dormant on federation: Hub.Deliver returns ErrBootstrapUnsupported, Hub has no CarriesPayloads, and admission refuses with BootstrapUnsupported. The --synthetic-staging path and the standalone smoke use siteapi.Client, which does carry payloads to whatever provider URL is configured; that path is marked non-production but not gated in code.
  • No payload content reaches an error, Event, status field or evidence record I could find; evidence carries only the salted digest.

Follow-ups:

  • No test fails if the admission-time PayloadCarriers check is removed. Hub.Deliver still refuses, but the operation then fails at delivery instead of at admission, which is the case the check exists for.
  • SealedPayload holds plaintext in the provider project's etcd (a CRD, not a Secret, so no encryption at rest), and the PR defers that. Track encryption at rest and an audit policy that omits request bodies before real tenants use this.
  • A payload whose operation was never created (a crash between the two writes) lingers until release while the allocation stays Active. Bound the sweep by age.

@scotwells
scotwells requested a review from ecv November 29, 2026 21:03

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Base automatically changed from feat/machine-image-catalog to feat/manual-inventory-records November 29, 2026 21:19
@scotwells
scotwells merged commit c542e97 into feat/manual-inventory-records Nov 29, 2026
27 checks passed
@scotwells
scotwells deleted the feat/sealed-bootstrap branch November 29, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants