oci-image/v1 environment payload

$idhttps://github.com/buildwarden/buildwarden/schemas/v1/environment-oci-image.json
Machine schemaenvironment-oci-image/v1.schema.json
Applies toThe signed payload of an environment record of type oci-image/v1
Written byThe container driver

Purpose

A container image. This schema describes the signed payload bytes, not record metadata: a reader takes the environment type from the payload (see Environment types).

Payload

The image's OCI image manifest or index (or Docker v2 equivalent), exactly as the container runtime returned it. For compatibility with ledgers written before typed environments this is the one type whose payload is not a wrapper object: it has no type member, and it is identified by the manifest's own schemaVersion together with layers, manifests or a manifest/index mediaType. See the OCI image spec for the full manifest format.

FieldTypeRequiredDescription
schemaVersioninteger, always 2yesManifest schema version
mediaTypetextsee belowManifest or index media type
configobjectnoImage config descriptor
layersarraysee belowLayer descriptors (a manifest)
manifestsarraysee belowManifest descriptors (an index)
type—must be absentA payload with type is a typed descriptor, not this type

At least one of layers, manifests, or a mediaType containing manifest or image.index must be present.

Metadata

The record's unsigned environment metadata carries reference (as the user gave it), digest (the registry digest of the pulled reference) and mediaType.

Verify

Hash the payload against the record. digest equals sha256(payload) only when the runtime returned the registry's exact bytes; runtimes may re-serialize the manifest, and the digest may name an index, so a mismatch there is informational.