Skip to content

Digest and signature verification

A node runs code only from bytes whose digests match what the control plane pinned, and for a closure artifact the node also checks that the control plane authorized that artifact for that closure. The checks run on every artifact, whether it was just fetched or was already in the node's store. This page lists the checks in order, what each compares, and the code each failure reports.

What each artifact is checked against

Artifact Before bytes are read After fetch After opening
Distribution artifact, run route Provenance, when trust is required SHA-256 equals artifact_digest
runtime_foundation_rootfs Catalog entry; equals the foundation manifest's rootfs_digest SHA-256 equals blob_digest Opened digest, tree, role verifier
runtime_provider Catalog entry; the one approved provider the closure selected SHA-256 equals blob_digest Opened digest, tree, role verifier
dependency_component Selected by a binding; matches a catalog publication or a signed construction SHA-256 equals blob_digest Opened digest, tree, archive verifier
execution_capsule Catalog entry; publication attestation and its signature SHA-256 equals blob_digest Opened digest, tree, signed file tree

A digest is written sha256:<64 lowercase hex>. The run route also accepts a bare 64-character hex digest and normalizes it to that form; a closure artifact must carry the prefixed form.

One closure artifact, check by check

flowchart TB
  A["Artifact from the admitted<br/>closure's artifact set"]
  AU{{"Authority for its role"}}
  ST{{"Verified entry in<br/>the content store?"}}
  RE{{"Blob rehashed, flags true,<br/>opened tree rechecked"}}
  FE{{"Fetch, then SHA-256<br/>equals blob_digest"}}
  QU{{"Blob fits the<br/>content store quota"}}
  OP{{"Open into staging;<br/>opened digest equals content_digest"}}
  TR{{"Opened tree admitted"}}
  OK["Entry written read-only,<br/>reference taken"]
  E1["RUNTIME_CLOSURE_ARTIFACT_AUTHORITY_INVALID<br/>or _SIGNATURE_INVALID"]
  E2["RUNTIME_CLOSURE_ARTIFACT_FETCH_FAILED<br/>or _DIGEST_MISMATCH"]
  E3["RUNTIME_CLOSURE_CONTENT_STORE_QUOTA_EXCEEDED"]
  E4["RUNTIME_CLOSURE_ARTIFACT_DIGEST_MISMATCH<br/>or _OPEN_FAILED"]
  A --> AU
  AU -->|"admitted"| ST
  AU -.-> E1
  ST -->|"yes"| RE
  ST -->|"no"| FE
  RE -->|"reusable"| OK
  RE -->|"evicted, fetched again"| FE
  FE --> QU
  FE -.-> E2
  QU --> OP
  QU -.-> E3
  OP --> TR
  OP -.-> E4
  TR --> OK
  TR -.-> E4

Authority is checked first and on both paths, so an artifact the closure did not authorize is refused before its bytes are read from the store or the registry. A stored entry that fails any recheck is removed and fetched again under a new cache generation, and the recovery is counted in the materialization evidence.

Authority for each role

The artifact must equal, field for field, exactly one entry of its role in the published runtime artifact catalog the control plane sealed into the assignment. Each role then adds its own check:

  1. Foundation rootfs: its content_digest equals the admitted foundation manifest's rootfs_digest.
  2. Runtime provider: its content_digest is the provider the closure selected, and exactly one approved provider artifact carries that digest.
  3. Dependency component: a binding with a source other than the foundation selected it, and it equals a catalog publication or a component constructed under the signed candidate snapshot transition.
  4. Execution capsule: its publication attestation verifies against the registered capsule publication signer. See Capsule publication verification.

A failure reports RUNTIME_CLOSURE_ARTIFACT_AUTHORITY_INVALID, or RUNTIME_CLOSURE_ARTIFACT_SIGNATURE_INVALID for the capsule attestation, with the reason in the detail:

materialized artifact must exactly match one CP-sealed catalog publication for runtime_provider
foundation artifact does not name the admitted foundation rootfs
runtime-provider artifact does not name the uniquely approved provider selected by the closure
dependency-component artifact must exactly match a CP-sealed catalog publication or signed construction selected by the admitted closure

Reusing a stored entry

A stored entry is reused only when all of these hold:

  1. Its role, content digest, blob digest, immutable reference and publication digest equal the admitted artifact's.
  2. Its cache generation equals the generation recorded for that content digest.
  3. The stored blob's SHA-256 equals its blob_digest, and its size equals blob_size_bytes.
  4. blob_digest_verified and signature_verified are both true.
  5. The opened tree is present and passes the opened-tree checks again.

An entry whose identity fields disagree with the admitted artifact fails with RUNTIME_CLOSURE_CONTENT_STORE_STATE_INVALID. Any other failed condition evicts the entry and fetches the artifact again.

Opening and the opened tree

A fetched blob is opened into a staging directory by the opener for its role. The opened content's digest must equal content_digest (RUNTIME_CLOSURE_ARTIFACT_DIGEST_MISMATCH), and the opener must produce at least one file (RUNTIME_CLOSURE_ARTIFACT_OPEN_FAILED). The tree is made read-only, files 0444 and directories 0555, and moved into place.

The opened tree is then admitted, on the fetch path and on every reuse:

  1. Every entry is a regular file, a directory, or a symlink that resolves inside the tree. A device, socket, pipe, or a symlink that escapes or is broken refuses the artifact.
  2. The verifier for the artifact's role accepts the tree.
  3. For an execution capsule, the tree's measured digest equals the signed immutable_tree_digest.

A tree that fails is removed, and the failure reports RUNTIME_CLOSURE_ARTIFACT_OPEN_FAILED:

opened artifact contains an escaping or broken symlink: <name> for sha256:...
opened artifact contains a non-file filesystem object: <name> for sha256:...
signed capsule tree verification failed: ... for sha256:...

When one artifact fails

Materialization of a closure is all or nothing. The references it took on artifacts earlier in the set are released, and the closure produces no materialization evidence. The entries already verified stay in the store for the next attempt. The materialization codes and where to look for each are listed in Closure artifact sets and materialization.

Run route checks

On the run route, each distribution artifact in the resolver snapshot is fetched from your registry by its artifact_ref and hashed, and a SHA-256 other than artifact_digest fails the run with ARTIFACT_INTEGRITY_FAILED.

When the assignment's trust chain is required, each artifact must also carry a provenance record:

Provenance field Rule
attestation_id Present
status verified, compliant or trusted
artifact_digest When present, equals the artifact's digest

A provenance record that is present is checked by the same rules when trust is optional. A file the node already holds for that digest is hashed again before reuse; a file whose hash has changed is deleted and the run fails with cached artifact digest mismatch, and the next attempt fetches it again. See Artifact integrity gate.