oci-image/v1 environment payload
$id | https://github.com/buildwarden/buildwarden/schemas/v1/environment-oci-image.json |
| Machine schema | environment-oci-image/v1.schema.json |
| Applies to | The signed payload of an environment record of type oci-image/v1 |
| Written by | The 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.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | integer, always 2 | yes | Manifest schema version |
mediaType | text | see below | Manifest or index media type |
config | object | no | Image config descriptor |
layers | array | see below | Layer descriptors (a manifest) |
manifests | array | see below | Manifest descriptors (an index) |
type | — | must be absent | A 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.