Skip to content

Commit

Permalink
Update Cosign verify command with identity
Browse files Browse the repository at this point in the history
Verification of the identity of the signer is a critical part of Sigstore verification. Otherwise, you are only verifying that there is some signature that is valid, instead of checking that the signature was generated by someone you trust.

For more information, sigstore/cosign#2056 contains some discussion around why we want to require these flags, and sigstore/cosign#1947 for why we require both of these flags.

An open question for you is if this specified identity (which came from the certificate) will change between releases. If so, how would you like users to know which identity signed a release?
  • Loading branch information
haydentherapper authored Dec 13, 2022
1 parent 07371c3 commit 4414a2e
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ done
Then verify the blob by using `cosign`:

```shell
cosign verify-blob "$BINARY" --signature "$BINARY".sig --certificate "$BINARY".cert
cosign verify-blob "$BINARY" --signature "$BINARY".sig --certificate "$BINARY".cert \
--certificate-identity [email protected] \
--certificate-oidc-issuer https://accounts.google.com
```

{{< note >}}
Expand All @@ -60,7 +62,9 @@ Let's pick one image from this list and verify its signature using
the `cosign verify` command:

```shell
COSIGN_EXPERIMENTAL=1 cosign verify registry.k8s.io/kube-apiserver-amd64:v{{< skew currentVersion >}}.0
COSIGN_EXPERIMENTAL=1 cosign verify registry.k8s.io/kube-apiserver-amd64:v{{< skew currentVersion >}}.0 \
--certificate-identity [email protected] \
--certificate-oidc-issuer https://accounts.google.com
```

{{< note >}}
Expand All @@ -78,7 +82,9 @@ curl -Ls https://sbom.k8s.io/$(curl -Ls https://dl.k8s.io/release/latest.txt)/re
input=images.txt
while IFS= read -r image
do
COSIGN_EXPERIMENTAL=1 cosign verify "$image"
COSIGN_EXPERIMENTAL=1 cosign verify "$image" \
--certificate-identity [email protected] \
--certificate-oidc-issuer https://accounts.google.com
done < "$input"
```

Expand Down

0 comments on commit 4414a2e

Please sign in to comment.