-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: manifest download with digest reference fails with 500 'image meta not found' #2299
Comments
@akashsinghal thanks for filing the issue. https://github.com/sigstore/cosign/releases/tag/v2.2.3 |
@rchincha Yes that's correct. Also I tried using zot 2.0.1 and same issue there. ORAS is 1.1.0 |
@akashsinghal ok, able to repro this. skopeo copy --format=oci docker://alpine:edge docker://localhost:5000 |
Manifests cat be retrieved by digest but we maintain stats based only on tags. So ignore errors if not found. Fixes issue project-zot#2299 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This bug doesn't reproduce if cosign uses an actual artifact type for the signature.
Ideally this behavior should have been the default by now, since the 1.1 spec has been released. It is no longer an experiment. |
Curious, what is the root cause of the issue here? Is cosign doing something unique or is it that any digest-based reference will fail for a manifest download? As a sanity check, I tried pushing another OCI image (no cosign in the picture here) by tag and then fetched by its digest reference and that worked fine. |
We have special handling for signatures, we save the data differently in the DB. Given pull was made by digest (and we don't know it is supposed to be a signatured based on the reference) and the manifest created by cosign this way doesn't have an artifact type, and the config mediatype is the same as for container images, zot considered it a container image and tries looking for it in the DB as an image, resulting in an error. If you pull it my tag zot considers it to be a signature based on the tag naming. |
Thanks for the explanation. Makes sense now why it'll work for OCI 1.1 supported Cosign |
@akashsinghal we take OCI conformance very seriously. |
@akashsinghal just curious, for your use case, are you unable to move to cosign with OCI 1.1 referrers support? |
Manifests cat be retrieved by digest but we maintain stats based only on tags. So ignore errors if not found. Fixes issue project-zot#2299 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Manifests cat be retrieved by digest but we maintain stats based only on tags. So ignore errors if not found. Fixes issue project-zot#2299 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Manifests cat be retrieved by digest but we maintain stats based only on tags. So ignore errors if not found. Fixes issue project-zot#2299 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Manifests cat be retrieved by digest but we maintain stats based only on tags. So ignore errors if not found. Fixes issue project-zot#2299 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Fixed in #2301 |
zot version
v2.0.2-rc.2
Describe the bug
I'm trying to download a manifest using a digested reference:
localhost:5000/cosign@sha256:f092da75cf80b71e7244f64b76bcd8f3cfebda0951fd00379bea2c8289379609
but it fails with a 500 error. Looking at the zot logs I can seeI've pushed an image
localhost:5000/cosign:signed-key
and used latest cosign to sign the image. I'm usingoras manifest fetch
to download the manifest of the cosign index. I can download the manifest if I reference it by tag but not by digest directly.I've confirmed that the digest of the cosign index is correct:
To reproduce
Configuration
Full Logs: https://gist.github.com/akashsinghal/f5f9705c925a3b375a66f181e13f2156
Expected behavior
No response
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: