Skip to content

client: report manifest list digest for multi-arch images#250

Open
fitzthum wants to merge 1 commit intooras-project:mainfrom
fitzthum:manifest-list
Open

client: report manifest list digest for multi-arch images#250
fitzthum wants to merge 1 commit intooras-project:mainfrom
fitzthum:manifest-list

Conversation

@fitzthum
Copy link
Copy Markdown

@fitzthum fitzthum commented Mar 24, 2026

see #247

When pulling a multi-arch image, this crate automatically resolves the manifest list to the appropriate arch manifest. This is at odds with some multi-arch signing schemes where the manifest list is signed.

To account for these scenarios, introduce a new method that that reports the manifest list digest (or None if not multi-arch).

cc @rajatchopra

Copy link
Copy Markdown

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

src/client.rs Outdated
digest,
String::from_utf8(config.data.into()).map_err(|e| {
OciDistributionError::GenericError(Some(format!(
"Cannot not UTF8 compliant: {e}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point lets fix the English.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in main, but I'll fix it up.

@fitzthum fitzthum force-pushed the manifest-list branch 2 times, most recently from 129dd47 to 8fe143c Compare March 24, 2026 21:28
Copy link
Copy Markdown
Contributor

@flavio flavio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, can you:

  • rebase against main
  • address the GHA failures

Thanks!

When pulling a multi-arch image, this crate automatically resolves the
manifest list to the appropriate arch manifest.

When doing so, also keep track of the digest of the manifest list and
report it to the caller. This helps callers validate signatures of
multi-arch images.

Since we ensure that the digests in the manifest list match any manifest
that we pull from the manifest list, it is ok to sign just the top-level
manifest, although some tools will sign recursively.

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
@fitzthum
Copy link
Copy Markdown
Author

fitzthum commented Apr 2, 2026

@flavio I pushed a new version with the fixes. Can you spin the CI again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants