Skip to content

Foundation reference resolution

A project names its runtime foundation by a reference that can move, such as an image tag, and the closure it runs on must be pinned to one exact foundation. The foundation resolution stage is where that reference becomes a digest. The control plane sends the reference, a registry profile and a policy; the node looks the reference up in your registry with its own identity and returns signed evidence of what it found. This page covers the assignment, the lookup, the evidence and the refusals.

For how the control plane admits the answer, see Foundation resolution admission.

What goes in and what comes out

flowchart TB
  subgraph AS["ASSIGNMENT, xck.foundation_reference_resolution_assignment.v1"]
    direction LR
    REF["requested_foundation_reference<br/>a mutable reference"]
    RP["registry_profile<br/>profile_id, registry_identity"]
    POL["foundation_policy,<br/>resolver, fence"]
  end
  subgraph NODE["NODE"]
    direction TB
    ADM{{"Assignment admitted<br/>no credentials or bytes inside"}}
    LK{{"Metadata lookup<br/>with the node's identity"}}
    EV[("Evidence<br/>resolved_foundation_digest,<br/>signed by the node")]
    ADM --> LK --> EV
  end
  REG[("Your registry<br/>foundation manifest")]
  CP["Control plane<br/>admission"]
  AS --> ADM
  LK <-->|"manifest, metadata<br/>snapshot, provenance"| REG
  EV -->|"stage result"| CP

The reference and the registry profile come from the control plane; the registry credentials are the node's own, and an assignment carrying one is refused. The evidence names the digest the reference resolved to at lookup time, so the foundation a project runs on stays fixed after the tag moves.

The assignment

The stage input is exactly one resolution_assignment, produced by control_plane:

Field Holds
assignment_id, project_uuid The assignment and the project it resolves for
fence fence_id and fence_epoch, at least 1
requested_foundation_reference The reference the project asked for
foundation_profile The foundation profile the project selected
registry_profile profile_id and registry_identity of the registry to look in
foundation_policy policy_id, policy_revision and policy_digest
resolver resolver_identity, resolver_version and resolver_configuration_digest
expected_workload_identity The SPIFFE identity the node must hold to perform it
assignment_digest The digest of the assignment

An assignment with any of these keys, at any depth, is refused before the lookup:

access_key  artifact_bytes  credential  credentials  password  private_key  secret  token

The lookup

The node asks its registry lookup for the requested reference under the registry profile, and accepts an answer with exactly three fields:

foundation_manifest        a RuntimeFoundationManifestV1, validated in full
metadata_snapshot_digest   the digest of the registry metadata the node read
provenance_digest          the digest of the foundation's provenance

An answer with more or fewer fields, or a manifest that fails validation, is refused with FOUNDATION_REFERENCE_LOOKUP_REFUSED. The manifest's foundation_digest is the value the reference resolved to. See Foundation identity and the foundation digest.

The evidence

The node returns xck.foundation_reference_resolution_evidence.v1, produced by data_plane_foundation_reference_resolver:

assignment_id, project_uuid, fence       copied from the assignment
requested_foundation_reference           copied from the assignment
foundation_profile, registry_profile     copied from the assignment
resolver                                 copied from the assignment
resolved_foundation_digest               the manifest's foundation_digest
metadata_snapshot_digest                 from the lookup
provenance_digest                        from the lookup
workload_identity                        the node's SPIFFE identity
evidence_digest                          over every field listed here
signature                                ed25519, key_id, signed_digest, signature, signer_identity

Before the node reports it, the evidence is checked against the assignment: the copied fields must equal the assignment's, resolved_foundation_digest must equal the manifest's, workload_identity must equal expected_workload_identity, and the signature must be one 64-byte Ed25519 signature over evidence_digest by that identity. The signing key is described in Tenant-side materialization.

When the stage is refused

Code Condition
FOUNDATION_REFERENCE_ASSIGNMENT_REFUSED The assignment fails its contract, or carries a credential, secret, token or bytes
FOUNDATION_REFERENCE_LOOKUP_REFUSED The lookup returned an answer of the wrong shape or an invalid manifest
FOUNDATION_REFERENCE_EVIDENCE_REFUSED The evidence the node built disagrees with the assignment or the manifest
RUNTIME_CLOSURE_RECONCILIATION_WORKLOAD_IDENTITY_MISMATCH The node's workload identity differs from expected_workload_identity

A refused stage completes its assignment as failed. How that failure is reported is on Runtime closure materialization and reconciliation.