-
Notifications
You must be signed in to change notification settings - Fork 100
add: Sign and Verify Images from the CLI (#2043) #1796
Conversation
e84e6d3
to
0e7824c
Compare
70b6468
to
2c7d444
Compare
If it's not too much work to implement, I think this would be nice for the user. I assume (haven't tested it yet) that I also have a PR out for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other question - what does acorn image sign
do if the user does not specify the push option? I assume it is not pushing signatures into the internal registry, since the CLI has no direct access to the internal registry. It is it basically a dry run?
@g-linville Yeah it's basically a dry-run. We could think about outputting the signature artifact e.g. to the filesystem. |
50cd869
to
730d5cf
Compare
@g-linville here you go: $ acorn pull --verify --key gh://iwilltry42 'my.reg.io/public/acorn/hello-world:v1.0.0'
• Verifying Image my.reg.io/public/acorn/hello-world:v1.0.0 (digest: sha256:1a6c64d2ccd0bb035f9c8196d3bfe72a7fdbddc4530dfcb3ab2a0ab8afb57eeb) using key gh://iwilltry42
✔ Signature verified
[112231571/112231571] ███████████████████████████████████████████████ 100% | 2s
$ acorn pull --verify --key gh://g-linville 'my.reg.io/public/acorn/hello-world:v1.0.0'
• Verifying Image my.reg.io/public/acorn/hello-world:v1.0.0 (digest: sha256:1a6c64d2ccd0bb035f9c8196d3bfe72a7fdbddc4530dfcb3ab2a0ab8afb57eeb) using key gh://g-linville
✗ ERROR: NOT pulling image: failed to find valid signature for my.reg.io/public/acorn/hello-world@sha256:1a6c64d2ccd0bb035f9c8196d3bfe72a7fdbddc4530dfcb3ab2a0ab8afb57eeb matching given identity and annotations using 1 loaded verifiers/keys This is not checking against IARs right now |
1177378
to
1f4a75a
Compare
Co-authored-by: Donnie Adams <[email protected]> Signed-off-by: Thorsten Klein <[email protected]>
Co-authored-by: Donnie Adams <[email protected]> Signed-off-by: Thorsten Klein <[email protected]>
…se them during verification Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Co-authored-by: Donnie Adams <[email protected]> Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
Co-authored-by: Tyler Slaton <[email protected]> Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
… in internal registry Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
…tion seems to persist Signed-off-by: Thorsten Klein <[email protected]>
Signed-off-by: Thorsten Klein <[email protected]>
c939dab
to
6109db2
Compare
Signed-off-by: Thorsten Klein <[email protected]>
Ref #2043
This PR changed quite a lot due to lots of discussions around UX, etc.
Here's the current state (20.07.2023):
The CLI-side
acorn image sign
&acorn image verify
to sign and verify local/remote imagesacorn image pull --verify
to only pull an image if verification passed (extra flags--key
and--annotation
)acorn image push --sign
to sign an image and push it together with the new signature (extra flags--key
and--annotation
)The Server Side
ImageDetails
now contain the signature digest if we could find a signature for an imageimage/sign
andimage/verify
subresources, where we never pass in the private key, only public keysgh://
andac://
identifiers to pull public keys from GitHub and Acorn Manager user accounts for verificationImagePush
andImagePull
now take care of the signature as well if there is oneImageCopy
andRepoCopy
now both consider signatures as wellImageDelete
cleans up signatures from the registryDiscussion
Answered
acorn image sign
(would allow for local-only signatures, e.g. I pull an image from DockerHub, where I cannot push my signature back, but I just sign it directly in-cluster usingacorn image sign
to allow it to be run)Checklist
This is a title (#1216)
. Here's an example