Support Verification in sigstore/cosign with X.509 Certificate Chain#581
Support Verification in sigstore/cosign with X.509 Certificate Chain#581yangkenneth wants to merge 4 commits intosigstore:mainfrom
Conversation
Signed-off-by: Kenneth Yang <kenneth.yang@coinbase.com>
Signed-off-by: Kenneth Yang <kenneth.yang@coinbase.com>
7fe70e2 to
c2a8440
Compare
|
@Hayden-IO Just removing the check for the certificate chain here seems a bit too permissive. This could potential have effects for clients using a PGI-like deployment (such as GitHub) which operates under the same semantics. However, I still don't think this would work as IIRC chain building ignores what's in the bundle, it only relies on the intermediates from the bundle: sigstore-go/pkg/root/certificate_authority.go Lines 47 to 50 in 3f2ee9e |
|
+1 to @kommendorkapten, I agree this is too permissive. I'd be open to some sort of a policy flag that allows this check to be bypassed when set explicitly by the calling library, though off the top of my head I'm not sure the best way to cleanly do this. |
Signed-off-by: Kenneth Yang <kenneth.yang@coinbase.com>
@Hayden-IO and @kommendorkapten pushed an update to support passing verification options through the bundle. If we want this to be opt-in, we’d need a corresponding change in cosign to add a flag through cosign for verification (e.g. cosign verify \
--insecure-ignore-tlog \
--insecure-ignore-sct \
--check-claims=true \
--certificate-identity example.com \
--certificate-oidc-issuer-regexp ".*" \
--trusted-root trusted-roots.json \
--new-bundle-format \
--use-signed-timestamps \
--experimental-oci11 \
--allow-certificate-chain \
{OCI IMAGE} |
|
Sorry for a late response but having an explicit parameter |
|
LGTM to this approach as well. I've asked @yangkenneth to file an issue on sigstore/sigstore-conformance to start the discussion with other clients about whether or not we want this standardized across clients. |
There was a problem hiding this comment.
Can you add a test as well?
There was a problem hiding this comment.
@Hayden-IO added tests to validation the options as well as creating an issue within sigstore/sigstore-conformance#342. Let me know if you need anything else in the meantime 🙏
Signed-off-by: Kenneth Yang <kenneth.yang@coinbase.com>
woodruffw
left a comment
There was a problem hiding this comment.
I'm not a maintainer of sigstore-go so my opinion isn't binding here, but IMO this would be a problematic addition: it effectively punches a hole in the v2/v3 bundle distinction for a use case that is best solved by using the v2 bundle format directly (since it isn't deprecated or obsolete, and is intended for this kind of X.509 topology).
(xref sigstore/sigstore-conformance#342 (comment) for related)
Appreciate the insight @woodruffw; the blocker that I originally ran into was because the current release for cosign does not allow bundle versions under v0.3. This seems to leave us with a few potential paths forward:
Would appreciate hearing both your and @Hayden-IO's opinions here on what the best path forward is. |
|
Yeah, I think option 1 probably makes the most sense.
This would effectively be a significant semantic change, which IMO would mean it would need to be v4 instead of v3. The protobuf-specs themselves also don't proscribe things like opt-in flags, so I think this would be a bit of a mismatch. |
|
I'm going to move the conversation back over to conformance to make sure we can get some of the other clients to chime in as well, we'll hold off on making changes to sigstore-go until we have some consensus. |
Summary
cosign verify \ --insecure-ignore-tlog \ --insecure-ignore-sct \ --check-claims=true \ --certificate-identity example.com \ --certificate-oidc-issuer-regexp ".*" \ --trusted-root trusted-roots.json \ --new-bundle-format \ --use-signed-timestamps \ --experimental-oci11 \ {OCI IMAGE} WARNING: Skipping tlog verification is an insecure practice that lacks transparency and auditability verification for the signature. Error: no signatures found error during command execution: no signatures foundRelease Note
Documentation