18 Commits

Author SHA1 Message Date
CrazyMax
ca9bcf049c containerimage: preserve local fallback for default image resolution
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-29 17:17:04 +02:00
Tonis Tiigi
b0ba823284 containerimage: add resolve attestation support
Allow ResolveSourceMetadata to resolve specific bytes
from the attestation manifest.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-09 15:27:33 -08:00
Tonis Tiigi
a50e8a126d source: avoid error when attestation asked from non-index
Instead return that no attestation was found.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 12:05:37 -08:00
Tonis Tiigi
3402a0c281 containerimage: fix missing lease on fetching attestationchain
Without a lease, the manifest may get be deleted by GC
before the SetGCLabels() gets called, causing "not found" error.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 17:18:18 -08:00
Tonis Tiigi
7e17a06aa6 contentutil: add pull through cache for attestations chain resolve
Currently attestation chains were always loaded directly from
registry on each pull.

This adds cache capability to resolver so all the pulled manifests
are first pulled to content store and kept there with GC labels
references from the root manifest.

If blob or referrers request already exists in the content store
then local response is used without registry requests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-12-19 17:46:35 -08:00
Tonis Tiigi
9a3333c4d2 resolver: auth refactor for better readability
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-12-10 18:08:59 -08:00
Tonis Tiigi
2fc7854e44 image: remove image manifest content from attestation chain
Image manifest content is not needed for signature verification as
the verification is against the top index root. Still report
image manifest digest for more info about the reported attestation
subject but clients need to re-resolve it from the root manifest
for signature verification.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-05 14:15:49 -08:00
Tonis Tiigi
a13afb53c1 image: add attestationchain resolving to resolvesourcemeta
Attestation chain can be used by the client to verify
signature identity of the image.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-05 14:15:43 -08:00
Tonis Tiigi
b1118d8929 image: move image source resolver away from old interface
ResolveImageConfig was changed to ResolveSourceMetadata long time
ago for cross-source implementation but the worker implementation
was still using old method name with conversions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-05 14:15:42 -08:00
Tonis Tiigi
aa003bef56 llb: add checksum option to llb.Image
This allows images to be pulled by tag and then
checked against the digest. If digest is added directly
to the image reference, then tag is ignored.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-09-19 17:40:40 -07:00
Tonis Tiigi
b5286f8dcb apply x/tools/modernize fixes
Autogenerated with couple of manual patches.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-07 08:18:45 -08:00
Brian Goff
94ddeb7dbe Support OS version in platform string
This allows platforms following the new `platforms.FormatAll` function,
which allows for setting the `OSVersion` field of the platform with
`<os>(<ver>)/<arch>`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2025-01-14 09:27:19 -08:00
Marat Radchenko
5be7edb69c Upgrade to containerd 2
Co-authored-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2025-01-13 16:42:48 -08:00
Justin Chadwell
08bd6398fe otel: add wrapping "resolving" spans for ResolveImageConfig
Without this, a single ResolveImageConfig may emit many
"remotes.docker.resolver.HTTPRequest" spans. These can be difficult to
track and organize, especially if a single client performs multiple of
them.

To make traces a bit easier to navigate, these are now grouped under one
top-level span, instead of cluttering up the top-level.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-07-23 15:53:12 +01:00
Sebastiaan van Stijn
175973babc switch to github.com/containerd/platforms module
Switch to use github.com/containerd/platforms module, because containerd's
platforms package has moved to a separate module. This allows updating the
platforms parsing independent of the containerd module itself.

The package in containerd is deprecated, but kept as an alias to provide
compatibility between codebases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 22:59:12 +02:00
Tonis Tiigi
30c069cb03 replace resolveimageconfig with generic sourcemetaresolver
This is more versatile function that works for any source,
not just images.

It can be used together with a policy that switches
between input and output source as well as for adding
additional metadata for other sources in the future.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-02-11 22:06:23 -08:00
Paul "TBBle" Hampson
98e0d8dcff Whenever copying OCI Platform data, include OSVersion and OSFeatures
Trivially created by looking for every reference to .Variant and adding
OSVersion and OSFeatures, except the ones related to the string
representation of a Platform instance.

I then went through and ensured every assignment of OSFeatures that
might leak out, i.e., not local-only or for marhsalling purposes, uses
the append-to-nil idiom to avoid sharing the slice storage and allowing
accidental mutation after-the-fact.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2023-11-03 12:19:29 +09:00
Alex Suraci
6b27487fec source: make sources pluggable
Sources are a pretty neat extension point, except there are a few code
paths that hard-code against each type. This moves code around and
adjusts interfaces so that Source implementations are self-contained and
merely need to be registered with the source.Manager.

Signed-off-by: Alex Suraci <suraci.alex@gmail.com>
2023-08-16 09:57:55 +01:00