You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] add cosign for verifying signature while pulling image #3283
Abstract
What we propose is that we can support custom content trust verifiers into Docker besides Notary such as cosign. Actually, the idea is coming from a discussion on sigstoreslack channel by @developer-guy.
Motivation
cosign, is a lightweight, container signing, verification, and storage in an OCI registry. We should avoid unnecessary image pulling before checking whether the image is signed.
Proposal
Docker has support for Notary in its own CLI, the trust command and there is a special variable called
$ export DOCKER_CONTENT_TRUST=1
...which helps users to ensure that the image that they pull has a valid signature on the Notary server. Would it makes sense if we add the same functionality to the docker daemon for cosign? That said, this way we can avoid verifying the image after downloading it, we would have done it while downloading the image, do we have a plan for that.
$ docker image pull developer-guy/alpine:3.12
$ cosign verify -key cosign.pub developer-guy/alpine:3.12 # check if signed
Instead of this one, we would do these several ways:
Solution 1:cosign specific
$ export DOCKER_CONTENT_TRUST_COSIGN_ENABLED=1
$ docker image pull developer-guy/alpine:3.12 # check if signed
How will Docker decide to which content trust verifier be used?
Solution 2:support interchangeable container signers: users decide the trust verifier
By implementing this way, we may have to determine a custom trust verifier interface API. An interface that enables Docker to use a wide variety of container signers & verifiers.
Currently, image/trust.go only supports Notary client. To support different trust verifier clients (i.e., notary, cosign, etc.), should we create a new specification or interface for this?
The DOCKER_CONTENT_TRUST=1 "API" has not been very effective. The problem with it is that it is global, but with most images being unsigned this doesn't work well. We need a better interface that supports a gradual change in the ecosystem moving to signing.
Reacted by Furkan Türkal, Lars Francke, Chris Crone, Jason Hall, Jintao Zhang and Yuriy Yarosh
Activity
developer-guy commentedon Sep 10, 2021
would you like to help us with this issue folks, @crazy-max @thaJeztah? 🤝😋
thaJeztah commentedon Sep 10, 2021
Let me ping @justincormack, who may have ideas / thoughts on this.
Dentrax commentedon Sep 27, 2021
Currently, image/trust.go only supports Notary client. To support different trust verifier clients (i.e., notary, cosign, etc.), should we create a new specification or interface for this?
At the directory
./cli/command/image/we can create a new folder calledtrust-providerslike the following:Implementing the struct into
provider.gowill quite easy:Any thoughts?
thaJeztah commentedon Sep 28, 2021
Let me link this to docker/roadmap#269
justincormack commentedon Feb 28, 2022
The DOCKER_CONTENT_TRUST=1 "API" has not been very effective. The problem with it is that it is global, but with most images being unsigned this doesn't work well. We need a better interface that supports a gradual change in the ecosystem moving to signing.