feat: add primitive support for verify subject on local oci-store#22
Open
binbin-li wants to merge 1 commit intoratify-project:mainfrom
Open
feat: add primitive support for verify subject on local oci-store#22binbin-li wants to merge 1 commit intoratify-project:mainfrom
binbin-li wants to merge 1 commit intoratify-project:mainfrom
Conversation
468a194 to
d375779
Compare
Signed-off-by: Binbin Li <libinbin050215@gmail.com>
d375779 to
269b1a5
Compare
shizhMSFT
reviewed
Feb 7, 2025
shizhMSFT
left a comment
There was a problem hiding this comment.
It's a good PoC. Let's discuss offline and iterate on this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test:
I use a local oci layout as the store to test the verify command. I built an image which is signed by Notation.
The command to verify it:
config.json:
{ "name": "notation-verifier-1", "trustPolicyDoc": { "version": "1.0", "trustPolicies": [ { "name": "default", "registryScopes": [ "*" ], "signatureVerification": { "level": "strict" }, "trustStores": [ "ca:ratify2" ], "trustedIdentities": [ "*" ] } ] }, "trustStorePath": "/home/libinbin/.config/notation" }Note: the succeeded at root level is always false as we didn't set up the policy enforcer.
Validation result:
{ "succeeded": false, "artifactReports": [ { "subject": "oci-layout2/local-oci-layout@sha256:f2502800f0663995420b13214a0d20eae1ec9a3c072f99c462cef0132a684556", "artifact": "oci-layout2/local-oci-layout@sha256:8b9494d734b2c878eab7b4b5e21e7b13b93e10f564e3d2b382294c15cc711a08", "artifactType": "application/vnd.cncf.notary.signature", "results": [ { "succeeded": false, "verifierName": "notation-verifier-1", "verifierType": "notation", "detail": "signature is not produced by a trusted signer" } ], "artifactReports": null }, { "subject": "oci-layout2/local-oci-layout@sha256:f2502800f0663995420b13214a0d20eae1ec9a3c072f99c462cef0132a684556", "artifact": "oci-layout2/local-oci-layout@sha256:b3f6395ff2389b13a33f709f4e527530f16275d483b40a6a2712306b46722275", "artifactType": "application/vnd.cncf.notary.signature", "results": [ { "succeeded": true, "description": "Notation signature verification succeeded", "verifierName": "notation-verifier-1", "verifierType": "notation", "detail": { "Issuer": "CN=ratify3,O=Notary,L=Seattle,ST=WA,C=US", "SN": "CN=ratify3,O=Notary,L=Seattle,ST=WA,C=US" } } ], "artifactReports": null } ] }