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

Proposal: Add SignatureMediaTypes array to RemoteVerifyOptions in notation.Verify() #217

Open
patrickzheng200 opened this issue Nov 25, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@patrickzheng200
Copy link
Contributor

patrickzheng200 commented Nov 25, 2022

Created this issue to track adding SignatureMediaTypes array to RemoteVerifyOptions.
Proposed behavior:

  1. When SignatureMediaTypes is empty, i.e. left by user as default, all signature media types will be processed by notation.Verify().
  2. When set by user, only process signature media type(s) contained in the array.

One reason to do so is that a certain signature media type with version v1 might have security issue and needs to release a v2 version. All signatures signed in v1 shall be skipped in notation.Verify(). In this case, we can set SignatureMediaTypes as [example v2] to filter out signatures already signed in v1.

@patrickzheng200 patrickzheng200 added this to the RC-2 milestone Nov 25, 2022
@patrickzheng200 patrickzheng200 changed the title Adding SignatureMediaType array to RemoteVerifyOptions in notation.Verify() Adding SignatureMediaTypes array to RemoteVerifyOptions in notation.Verify() Nov 25, 2022
@yizha1 yizha1 modified the milestones: RC-2, Discuss Dec 14, 2022
@patrickzheng200 patrickzheng200 self-assigned this Dec 20, 2022
@priteshbandi
Copy link
Contributor

priteshbandi commented Feb 3, 2023

The origination of this issue lies in #208 (comment) and I think we still need to figure out few things

One reason to do so is that a certain signature media type with version v1 might have security issue and needs to release a v2 version. All signatures signed in v1 shall be skipped in notation.Verify(). In this case, we can set SignatureMediaTypes as [example v2] to filter out signatures already signed in v1.

If an implementation starts filtering out a signature formt that then its not abiding by Notary V2 spec and is implementing only subset of specifications because notary v2 says it supports multiple signature formats.
Also, if there is security issue with v1 signature it will take more than filtering because user will need to re-sign the artifacts so just filtering won't help. Also, if there is security issue with v1 format then notary should drop support for it.

@patrickzheng200
Copy link
Contributor Author

patrickzheng200 commented Feb 3, 2023

Also, if there is security issue with v1 signature it will take more than filtering because user will need to re-sign the artifacts so just filtering won't help. Also, if there is security issue with v1 format then notary should drop support for it.

Yes, the user needs to re-Sign. Besides re-sign, we still need this change in the Verification process to filter out the old v1 signatures. (These v1 signatures have already been pushed into the remote registry and Notation does not have a delete method to remove them.) If we do not do the filtering, v1 and v2 signatures will be mixed in the Verification process. So the user won't be able to tell if a successful verification is triggered by a v1 signature or a re-signed v2 signature.

@shizhMSFT shizhMSFT added the enhancement New feature or request label Feb 9, 2023
@shizhMSFT shizhMSFT changed the title Adding SignatureMediaTypes array to RemoteVerifyOptions in notation.Verify() Proposal: Add SignatureMediaTypes array to RemoteVerifyOptions in notation.Verify() Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

4 participants