You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: descriptor.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ The following fields contain the primary properties that constitute a Descriptor
48
48
49
49
This OPTIONAL property contains an embedded representation of the referenced content.
50
50
Values MUST conform to the Base 64 encoding, as defined in [RFC 4648][rfc4648-s4].
51
+
The decoded data MUST be identical to the referenced content and SHOULD be verified against the [`digest`](#digests) and `size` fields.
52
+
See [Embedded Content](#embedded-content) for when this is appropriate.
51
53
52
54
Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details.
53
55
@@ -149,6 +151,17 @@ Implementations MAY implement SHA-512 digest verification for use in descriptors
149
151
When the _algorithm identifier_ is `sha512`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`.
150
152
Note that `[A-F]` MUST NOT be used here.
151
153
154
+
## Embedded Content
155
+
156
+
In many contexts, such as when downloading content over a network, resolving a descriptor to its content has a measurable fixed "roundtrip" latency cost.
157
+
For large blobs, the fixed cost is usually inconsequental, as the majority of time will be spent actually fetching the content.
158
+
For very small blobs, the fixed cost will be quite significant.
159
+
160
+
Implementations MAY choose to embed small pieces of content directly within a descriptor to avoid roundtrips.
161
+
162
+
Implementations SHOULD NOT populate the `data` field in situations where doing so would unexpectedly modify content identifiers.
163
+
For example, a registry SHOULD NOT arbitrarily populate `data` fields within uploaded manifests, as that would modify the content address of those manifests.
164
+
152
165
## Examples
153
166
154
167
The following example describes a [_Manifest_](manifest.md#image-manifest) with a content identifier of "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" and a size of 7682 bytes:
0 commit comments