feat(api): add one-shot sterile cell leases - #336
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a feature-flagged, one-shot sterile-cell lease path so Sandboxwich can claim already-prepared isolation cells without weakening the existing sandbox boundary.
sterile -> leased -> destroyed|quarantined; no tenant-exposed guest, namespace, overlay, or sandbox can return to inventorySecurity decisions
kata_microvmis the VM-equivalent class;gvisor_lower_riskis separately admitted and never represented as equivalent to KataSANDBOXWICH_STERILE_CELL_SIGNING_KEY_FILE, with bounded startup reads; it is never accepted as a secret-valued environment variable or CLI argumentContract and rollout
The versioned Sandboxwich contract and Platform integration requirements are documented in
docs/sterile-cells.md. This change does not modify Deploy or Platform and does not put Cloudflare Workers in the sterile-cell request path.SANDBOXWICH_STERILE_CELLS_ENABLEDdefaults to false and must remain off initially. Enabling it requires an admitted release tuple, mounted signing-key file, ready-cell producer, and provider cleanup that destroys the tenant-exposed resource before reportingdestroyed.Verification
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceThe conditional PostgreSQL conformance test is included but did not execute locally because
SANDBOXWICH_TEST_POSTGRES_URLwas not configured.Post-Deploy Monitoring & Validation
Keep the flag off after deploy. Before a canary, confirm the mounted secret, admitted runtime class and policy digest, producer cleanup semantics, and ready inventory. During a bounded canary, watch lease-validation failures, empty claims, expiry quarantines, ambiguous cleanup conflicts, and terminal-state counts. Abort by disabling the flag; preserve terminal/quarantined rows and never return exposed cells to inventory.
Built with Compound Engineering