Repository navigation
Add optional immutable image preparation for Verified app delivery - #3
Open
joshhalley wants to merge 1 commit into
Open
joshhalley wants to merge 1 commit into
joshhalley wants to merge 1 commit into
Conversation
Add digest/platform-specific image preparation, content verification, deterministic Docker-save output, provenance and the shared artifact schema. Bound registry authentication, redirects, bytes and deadlines, and publish local outputs atomically without replacing existing directories. Keep no-argument HTTP server operation unchanged; signing, scanning and deployment approval remain external.
This branch has not been deployed
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.
Problem and resulting behavior
CVK needs a reliable way to replace externally sourced application images when a newer release fixes a defect or vulnerability. An on-demand download identified only by a mutable tag is not a retained release artifact with a stable package identity.
This PR adds an optional
preparecommand that acquires an image by immutable SHA-256 digest and explicit platform, validates its content, and retains a deterministic Docker-save package with identity/provenance metadata. Running the binary without arguments still starts the existing HTTP service.Standard remains the default workflow. Verified preparation is opt-in. Governed lifecycle policy is deferred. This producer does not gain device-control or deployment-approval authority.
Changes
Immutable acquisition and conversion
docker-http-passthrough prepare --repository … --digest sha256:… --platform linux/ARCH[/VARIANT] --output-dir ….diff_id.Retained artifact contract
package.tardescriptor.jsonapphosting.cisco.com/v1alpha1artifact identity: source, platform, package SHA-256/size, producer and evidence referencesprovenance.jsonrecipe.jsonchecksums.jsonThe vendored artifact schema is byte-identical to the companion CVK schema. Source-image identity and converted-package identity are separate: the latter identifies the exact tar intended for delivery.
Network, resource and publication boundaries
The preparation-specific guarantees do not automatically apply to the existing HTTP download routes. The earlier authentication/registry-route work is already on main and is not introduced by this PR.
How this fits with CVK
flowchart LR Registry["Registry digest and platform"] --> Prepare["Optional prepare command"] Prepare --> Output["Unsigned package and metadata"] Output --> Pipeline["External pipeline: chosen scans, signing and publication"] Pipeline --> Store["Immutable HTTPS artifact store"] Store --> CVK["Opt-in CVK Verified delivery"]A separate trusted producer pipeline signs the exact descriptor bytes and publishes unchanged objects. CVK then verifies the signature, package identity and staged device bytes before installation. Standard users can continue using ordinary package URLs without this infrastructure.
Companion PR: cisco-open/cisco-virtual-kubelet#213. The producer and device runtime remain separate projects with a shared artifact contract.
Validation
cargo fmt --all -- --checkcargo test --lockedThe suite covers existing HTTP route/authentication behavior as well as deterministic preparation, direct/indexed manifests, plain/gzip layers, corruption rejection, unsupported sources, platform selection, byte/decompression/deadline limits, atomic non-overwrite publication, restricted token realms/scopes, redirect credential stripping and private-CA input validation.
These are the recorded pre-publication checks for commit
cec5128cf556a7eb91589e9188fc898f1983df94; they are not a claim that this PR's GitHub CI has already passed. Formatting-only changes were applied to the new preparation code before those checks.Remaining limitations and explicit non-goals
Review pointers
Start with
src/prepare.rs,src/registry/verified.rs, their tests, andschemas/app-hosting-artifact-v1alpha1.schema.json. The changes tomain.rsonly select command mode when arguments are present; no-argument server startup remains the default.