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
Update verification instructions for bundle (#397)
Mostly just renames the bundle example to be a JSON file. Also updated
some text regarding the contents of the bundle being more than just a
signature and certificate.
Signed-off-by: Hayden <8418760+haydentherapper@users.noreply.github.com>
Signed-off-by: Hayden <haydentherapper@users.noreply.github.com>
Co-authored-by: Hayden <8418760+haydentherapper@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/en/cosign/signing/signing_with_blobs.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,15 @@ You can use Cosign for signing and verifying standard files and blobs (or binary
12
12
Cosign supports identity-based signing, associating an ephemeral signing key with an identity from an OpenID Connect provider. We refer to this process as "keyless signing". You use `cosign sign-blob` to sign standard files as well as blobs. You can store signature and certificate information either as separate file, or in a bundled text file, but using a bundle is the recommended way of signing a blob, as users can specify just the bundle name instead of separate files for the signature and certificate. Use the `cosign` command to sign:
The bundle is output as a `base64` encoded string that contains the certificate and signature. In addition, signatures are output as `base64` encoded strings to stdout by default.
17
+
The bundle contains verification metadata, including an artifact's signature, certificate and proof of transparency log inclusion.
18
18
19
-
When using `cosign sign-blob` in keyless mode, you need to store the bundle for verification. If you don't want to use the bundle, you can direct the output of the certificate by using the `--output-certificate` and `--output-signature` flags. The result from using the output flags:
19
+
When using `cosign sign-blob` in keyless mode, you need to store the bundle for verification. If you don't want to use the bundle, you can direct the output of the certificate by using the `--output-certificate` and `--output-signature` flags. Note that this will be removed in future versions of Cosign, as the
20
+
bundle format is standardized across Sigstore clients. The result from using the output flags:
20
21
21
22
```shell
22
-
$ cosign sign-blob README.md --output-certificate cert.pem --output-signature sig
23
+
$ cosign sign-blob README.md --new-bundle-format=false --output-certificate cert.pem --output-signature sig
23
24
Using payload from: README.md
24
25
Generating ephemeral keys...
25
26
Retrieving signed certificate...
@@ -56,7 +57,7 @@ Certificate wrote in the file cert.pem
56
57
While keyless signing is recommended, you may specify your own keys for signing. You will need the password for the private key to sign:
In situations where automated signing is required, such as within CI/CD pipelines, the `--yes` flag becomes essential. This flag, when used with signing commands, bypasses any confirmation prompts, enabling a smooth, uninterrupted signing process. This is particularly crucial in automated environments where manual input isn't feasible. The `--yes` flag ensures that your signing operations can proceed without manual intervention, maintaining the efficiency and speed of your automated workflows.
The oidc-issuer for Google is https://accounts.google.com, Microsoft is https://login.microsoftonline.com, GitHub is https://github.com/login/oauth, and GitLab is https://gitlab.com.
30
30
31
-
The following example verifies the signature on file.txt from user name@example.com issued by accounts@example.com. It uses a provided bundle cosign.bundle that contains the certificate and signature.
31
+
The following example verifies the signature on file.txt from user name@example.com issued by accounts@example.com. It uses a provided bundle `artifact.sigstore.json` that contains the certificate and signature.
With container images, the signature and certificate are attached to the container. For blobs, the signature and certificate can be stored in a bundle file that is created at the time of signing. Either the bundle must be specified, or the individual signature and certificate must be specified.
The bundle contains signing metadata, including the signatureand certificate.
33
+
The bundle contains signing metadata, including the signature, certificate, timestamp and proof of transparency log inclusion.
34
34
35
-
The Cosign command requests a certificate from the Sigstore certificate authority, Fulcio. Fulcio checks your identity by using an authentication protocol (OpenID Connect) to confirm your email address. If your identity is correct, Fulcio grants a short-lived, time-stamped certificate. The certificate is bound to the public key to attest to your identity. This activity is logged using the Sigstore transparency and timestamping log, Rekor.
35
+
The Cosign command requests a certificate from the Sigstore certificate authority, Fulcio. Fulcio checks your identity by using an authentication protocol (OpenID Connect) to confirm your email address. If your identity is correct, Fulcio grants a short-lived, time-stamped certificate. The certificate is bound to the public key to attest to your identity. This activity is logged using the Sigstore signature transparency log, Rekor.
36
36
37
37
Note that you don’t need to use a key to sign. Currently, you can authenticate with Google, GitHub, or Microsoft, which will associate your identity with a short-lived signing key.
38
38
@@ -46,20 +46,21 @@ cosign sign-blob --help
46
46
47
47
To verify a signed blob, you need to provide three pieces of information:
48
48
49
-
- The certificate
50
-
- The signature
49
+
- The artifact blob
50
+
- The verification bundle, containing the signature, certificate, and proof of log inclusion
51
51
- The identity used in signing
52
52
53
-
You may be provided with a bundle that includes the certificate and signature. The blob maintainer should provide the trusted identity.
54
-
55
-
The following example verifies the signature on `file.txt` from user `name@example.com` issued by `accounts@example.com`. It uses a provided bundle `cosign.bundle` that contains the certificate and signature.
53
+
The following example verifies the signature on `file.txt` from user `name@example.com` issued by `accounts@example.com`. It uses a provided bundle `artifact.sigstore.json` that contains the certificate and signature.
To verify, Cosign queries the transparency log (Rekor) to compare the public key bound to the certificate, and checks the timestamp on the signature against the artifact’s entry in the transparency log. The signature is valid if its timestamp falls within the small window of time that the key pair and certificate issued by the certificate authority were valid.
60
+
Cosign verifies the signed timestamp in the bundle, and uses the timestamp when verifying the short-lived code signing certificate containing the ephemeral public key.
61
+
A signature is valid if the timestamp falls within the small time window of certificate issuance.
62
+
Cosign then uses the certificate's public key to verify the artifact signature. Cosign also verifies the proof of transparency log inclusion
0 commit comments