Skip to content
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

As a user of Notation, I want to sign and verify images using distribution-spec 1.0 registries #112

Closed
sudo-bmitch opened this issue Oct 20, 2021 · 6 comments
Labels
Milestone

Comments

@sudo-bmitch
Copy link
Contributor

I think most of our work has focused on the ORAS artifact-spec work. It would be useful if there's a backwards compatible solution that can sign images on registries without the newer ORAS artifact-spec APIs. Possible options I'm thinking of:

  1. Use well known tags, similar to other projects that push a tag with the digest of the artifact being signed and some extension.
  2. Push a new Index that contains both the image being signed and any associated artifacts, changing the tag pointer.

For the first option, to push multiple signatures, we may need to wrap the signature artifacts with an OCI Index and the Index replaces the list of artifacts we'd see from the new API query. To handle race conditions, that may have to be a best-effort / user problem, unless we can get ETag and Precondition Semantics supported in the registry.

For the second option, there may be users that want that to tightly control what is associated with their image, who want this ability rather than the API anyway. The challenge is that this requires the existing runtimes to recursively descend through Index to find the image to run, and I'm not sure they do that if they don't see the platform field or if there's an Index within an Index, which may result in breaking changes to existing image runtimes that aren't checking the signatures. This would need a lot of testing if we went that way.

Are there other options than these, and is there interest in adding any of these backwards compatibility features to Notary v2?

@sajayantony
Copy link
Contributor

sajayantony commented Oct 20, 2021

I think digest pinned deployments will never see an updated scan report if we use the index to constantly append and recompose the images. This was my reason for supporting the first solution here

Ok thinking more through that even in the tag based model you need to lookup other tags. I think updating the tag pointing to an index has a few interesting areas to discuss. Like will pushing an patched image to the same tag cause lookup of previous images to fail?

It didn't cross my mind that distribution spec didn't explicitly call out preconditions and it seems like clarifying that will avoid a lot of issues.

@sudo-bmitch
Copy link
Contributor Author

If the tag points to an index with signatures included in the index, then pushing a new tag with just your image would be an unsigned image. You'd need to go through the same process used to push the previous image of attaching signatures in an index and pushing everything.

@sudo-bmitch
Copy link
Contributor Author

First pass at comparing the options: https://hackmd.io/FIa5U4xcSV6ccftwCPAZjA

@iamsamirzon iamsamirzon changed the title Support for distribution 1.0 registries Support for distribution 1.1 registries Mar 3, 2022
@sudo-bmitch
Copy link
Contributor Author

I'm not sure what 1.1 refers to. Distribution-spec is only at 1.0.1, and the .1 patch I believe is focused on a client side vulnerability.

@sudo-bmitch sudo-bmitch changed the title Support for distribution 1.1 registries Support for distribution-spec 1.0 registries Jun 2, 2022
@yizha1 yizha1 modified the milestones: future, RC-2 Aug 22, 2022
@yizha1
Copy link
Contributor

yizha1 commented Aug 22, 2022

This issue is related to distribution-spec for OCI Artifact update.

@iamsamirzon iamsamirzon changed the title Support for distribution-spec 1.0 registries [User Story] As a user of Notation, I want to sign and verify images using distribution-spec 1.0 registries Nov 29, 2022
@iamsamirzon iamsamirzon changed the title [User Story] As a user of Notation, I want to sign and verify images using distribution-spec 1.0 registries As a user of Notation, I want to sign and verify images using distribution-spec 1.0 registries Nov 29, 2022
@yizha1 yizha1 modified the milestones: RC-2, Discuss Apr 10, 2023
@yizha1
Copy link
Contributor

yizha1 commented Nov 5, 2024

Closed this issue, as Notary Project supports OCI 1. 0 registries now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

4 participants