Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs move keyless info to overview #156

Merged
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d3d9f95
Update overview.md
jonvnadelberg Apr 25, 2023
63d773f
Update keyless.md
jonvnadelberg Apr 25, 2023
c3e0d71
Update overview.md
jonvnadelberg Apr 25, 2023
adb4898
Update overview.md
jonvnadelberg Apr 25, 2023
692e90e
Update keyless.md
jonvnadelberg Apr 25, 2023
17f26b6
Update overview.md
jonvnadelberg Apr 25, 2023
b95a8cd
Update overview.md
jonvnadelberg Apr 25, 2023
39413a8
Update overview.md
jonvnadelberg Apr 25, 2023
d1b5b6c
Update keyless.md
jonvnadelberg Apr 25, 2023
6f9cac5
Update overview.md
jonvnadelberg Apr 25, 2023
a5a075a
Update keyless.md
jonvnadelberg Apr 25, 2023
65c1572
Update overview.md
jonvnadelberg Apr 25, 2023
14d9ac9
Update overview.md
jonvnadelberg Apr 25, 2023
ab06411
Update overview.md
jonvnadelberg Apr 25, 2023
7526fdb
Update overview.md
jonvnadelberg Apr 25, 2023
825e974
Update overview.md
jonvnadelberg Apr 25, 2023
03f344f
Update overview.md
jonvnadelberg Apr 25, 2023
b9c04a9
Update overview.md
jonvnadelberg Apr 25, 2023
7640526
Update keyless.md
jonvnadelberg Apr 25, 2023
c1d15ae
Update overview.md
jonvnadelberg Apr 27, 2023
77fb568
Update verify.md
jonvnadelberg Apr 27, 2023
0a3ab7a
Update overview.md
jonvnadelberg Apr 27, 2023
bf6d70a
Create public_deployment.md
jonvnadelberg Apr 27, 2023
dfffcbd
Update public_deployment.md
jonvnadelberg Apr 27, 2023
9d6c9c0
Delete keyless.md
jonvnadelberg Apr 27, 2023
fe15590
Create timestamps.md
jonvnadelberg Apr 27, 2023
6d70491
Update timestamps.md
jonvnadelberg Apr 27, 2023
5242a9c
Update overview.md
jonvnadelberg Apr 27, 2023
007d235
Update overview.md
jonvnadelberg Apr 27, 2023
ae236b0
Merge branch 'sigstore:main' into docs_move_keyless_info_to_overview
jonvnadelberg Apr 27, 2023
aebc8a8
Update timestamps.md
jonvnadelberg Apr 27, 2023
c699196
Update overview.md
jonvnadelberg Apr 27, 2023
4bad277
Update timestamps.md
jonvnadelberg Apr 27, 2023
448b20b
Update timestamps.md
jonvnadelberg Apr 27, 2023
e8187dd
Update overview.md
jonvnadelberg Apr 27, 2023
43efd53
Update openid_signing.md
jonvnadelberg Apr 27, 2023
d1d9a1a
Update overview.md
jonvnadelberg Apr 27, 2023
775a070
Update overview.md
jonvnadelberg Apr 27, 2023
d28e7c0
Update verify.md
jonvnadelberg Apr 27, 2023
fea6dfa
Update public_deployment.md
jonvnadelberg Apr 27, 2023
a70c05f
Update timestamps.md
jonvnadelberg Apr 27, 2023
65d408d
Update overview.md
jonvnadelberg Apr 27, 2023
f109065
Update overview.md
jonvnadelberg Apr 27, 2023
240c14c
Update content/en/cosign/overview.md
jonvnadelberg May 1, 2023
be54ac5
Update content/en/cosign/overview.md
jonvnadelberg May 1, 2023
bf6d409
Update content/en/cosign/overview.md
jonvnadelberg May 1, 2023
934e1dd
Update content/en/cosign/public_deployment.md
jonvnadelberg May 1, 2023
fca18d1
Update content/en/cosign/public_deployment.md
jonvnadelberg May 1, 2023
b3057e1
Update content/en/cosign/overview.md
jonvnadelberg May 1, 2023
3c38e82
Update content/en/cosign/timestamps.md
jonvnadelberg May 1, 2023
5e871a2
Update content/en/cosign/verify.md
jonvnadelberg May 1, 2023
23d1341
Update overview.md
jonvnadelberg May 1, 2023
bbe7314
Merge branch 'sigstore:main' into docs_move_keyless_info_to_overview
jonvnadelberg May 1, 2023
bbd724d
Update content/en/cosign/public_deployment.md
jonvnadelberg May 1, 2023
730fcdb
Update public_deployment.md
jonvnadelberg May 1, 2023
1d55d4a
Update public_deployment.md
jonvnadelberg May 3, 2023
e564f57
Update public_deployment.md
jonvnadelberg May 3, 2023
aebdcce
Update public_deployment.md
jonvnadelberg May 3, 2023
bc0d384
Update public_deployment.md
jonvnadelberg May 3, 2023
aae8c53
Update public_deployment.md
jonvnadelberg May 3, 2023
b70c8a9
Update public_deployment.md
jonvnadelberg May 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 0 additions & 168 deletions content/en/cosign/keyless.md
jonvnadelberg marked this conversation as resolved.
Outdated
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reviewers, this file was deleted because its content was either moved or duplicated.

Quickstart went to the overview doc

OAuth Flows/Identity were duplicated from openid_signing.md

Timestamping moved to its own doc

Public Staging Deployment moved to its own doc

Custom components moved to verify

This file was deleted.

4 changes: 0 additions & 4 deletions content/en/cosign/openid_signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ In order to impersonate an IAM service account, your account must have the `role
3. Set the `GOOGLE_SERVICE_ACCOUNT_NAME` environment variable to the name of the target account in your cloudbuild.yaml
4. Sign images in GCB, without keys!

### Timestamps

Signature timestamps are checked in the [rekor](https://github.com/sigstore/rekor) transparency log. Rekor's `IntegratedTime` is signed as part of its `signedEntryTimestamp`. Cosign verifies the signature over the timestamp and checks that the signature was created while the certificate was valid.

## Upcoming work

* Root CA hardening: We should use intermediate certs rather than the root, and support chained verification.
Expand Down
50 changes: 35 additions & 15 deletions content/en/cosign/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The bundle contains signing metadata, including the signature and certificate.

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.

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. For more information, read [Keyless Signatures](/cosign/keyless/).
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.

For more information about Cosign's additional options and features, run the command:

Expand All @@ -63,24 +63,44 @@ $ cosign verify-blob <file> --bundle cosign.bundle --certificate-identity=name@e

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.

### Working with containers
## Example: Working with containers

Signing and verifying a container is similar to working with blobs. The Cosign command to sign a container image is:
> NOTE: In this example, we will create a container using [ttl.sh](https://ttl.sh/). It offers free, short-lived (as in minutes or hours), anonymous container image hosting so you can try out signing and verifying commands in a sample workflow

To use `ttl.sh` and [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) to prepare the image to sign, run the following:

```
$ cosign sign <image URI>
$ SRC_IMAGE=busybox
$ SRC_DIGEST=$(crane digest busybox)
$ IMAGE_URI=ttl.sh/$(uuidgen | head -c 8 | tr 'A-Z' 'a-z')
$ crane cp $SRC_IMAGE@$SRC_DIGEST $IMAGE_URI:1h
$ IMAGE_URI_DIGEST=$IMAGE_URI@$SRC_DIGEST
```

This works the same as signing a blob, but the signature and certificate are attached as container metadata.
### Keyless signing of a container

To verify a signed container image, use the following command:
The following code signs the created container image. The command to sign container images is `cosign sign <image URI>`. For our example, `<image URI>` is `$IMAGE_URI_DIGEST`. Note that for containers, there is no bundle as there is with blobs, as the signature and certificate are attached directly to the container:

```
$ cosign sign $IMAGE_URI_DIGEST
jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved
```

### Keyless verifying of a container

This works similarly to verifying a blob, but there is no need to place the certificate and signature on the `cosign verify` command. To verify a signed container image, use the following command:

```
$ cosign verify <image URI> --certificate-identity=name@example.com
jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved
--certificate-oidc-issuer=https://accounts.example.com
```

### Signing with a generated key
> Note that for our example we use the `regexp` versions of the identity options:

```
cosign verify $IMAGE_URI_DIGEST --certificate-identity-regexp=.* --certificate-oidc-issuer-regexp=.*
```

## Signing with a generated key

It is recommended that you use keyless signing, as a main feature of Sigstore is to make signatures invisible infrastructure that do not require key management. However, Sigstore allows you to use an existing key or generate a key if you prefer.

Expand All @@ -97,19 +117,19 @@ $ cosign sign --key cosign.key user/demo
Enter password for private key:
Pushing signature to: index.docker.io/user/demo:sha256-87ef60f558bad79be4def8.sig
```
## SCM Integration

### Other Formats
Cosign integrates natively with source code management (SCM) systems like GitHub and GitLab. You can use the official [GitHub Actions Cosign installer](https://github.com/marketplace/actions/cosign-installer) or use Cosign to generate and work safely with [SCM secrets](/cosign/git_support/) with native API integration.

Cosign is useful not only for blobs, containers, and container-related artifacts; it can also be used for other file types.
## Attestations

To learn how to sign SBOMs, WASM modules, Tekton bundles and more, review [Signing Other Types](/cosign/other_types/). For more information about blobs, review [Working with Blobs](/cosign/working_with_blobs/).
In addition to signatures, Cosign can be used with [In-Toto Attestations](https://github.com/in-toto/attestation).

### SCM Integration
jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved
Attestations provide an additional semantic-layer on top of plain cryptographic signatures that can be used in policy systems. Learn more in the [Attestations](/cosign/attestation) documentation.

Cosign integrates natively with source code management (SCM) systems like GitHub and GitLab. You can use the official [GitHub Actions Cosign installer](https://github.com/marketplace/actions/cosign-installer) or use cosign to generate and work safely with [SCM secrets](/cosign/git_support/) with native API integration.
## Other Formats

### Attestations
Cosign is useful not only for blobs, containers, and container-related artifacts; it can also be used for other file types.

In addition to signatures, Cosign can be used with [In-Toto Attestations](https://github.com/in-toto/attestation).
To learn how to sign SBOMs, WASM modules, Tekton bundles and more, review [Signing Other Types](/cosign/other_types/). For more information about blobs, review [Signing Blobs](/cosign/signing_with_blobs/). For containers, see [Signing Containers](/cosign/signing_with_containers/).

Attestations provide an additional semantic-layer on top of plain cryptographic signatures that can be used in policy systems.
jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved
39 changes: 39 additions & 0 deletions content/en/cosign/public_deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "Public Deployment"
category: "Cosign"
position: 122
---

There is a public staging environment, or deployment, that is running Fulcio, Rekor and OIDC issuer.

**NOTE** The staging environment provides neither SLO guarantees nor the same protection of the root key material for TUF. This environment is meant for development and testing only. It is not appropriate to use for production purposes.

The endpoints are as follows:

* https://fulcio.sigstage.dev
* https://rekor.sigstage.dev
* https://oauth2.sigstage.dev/auth

These instances are operated and maintained in the same manner as the public production environment for Sigstore.

### Usage

To use this instance, follow the steps below:

1. `rm -r ~/.sigstore`
1. `curl -O https://raw.githubusercontent.com/sigstore/root-signing/main/staging/repository/1.root.json`
1. `cosign initialize --mirror=https://tuf-repo-cdn.sigstore.dev --root=1.root.json`
1. `COSIGN_EXPERIMENTAL=1 cosign sign --oidc-issuer "https://oauth2.sigstage.dev/auth" --fulcio-url "https://fulcio.sigstage.dev" --rekor-url "https://rekor.sigstage.dev" ${IMAGE_DIGEST}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can drop the experimental and need to add the --yes flag as well in the sign

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on dropping experimental. I'd not include "--yes" though, because we don't want the examples to be skipping through that prompt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

1. `COSIGN_EXPERIMENTAL=1 cosign verify --rekor-url "https://rekor.sigstage.dev" ${IMAGE}`
jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved

* Steps 1-4 configures your local environment to use the staging keys and certificates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Steps 1-4 configures your local environment to use the staging keys and certificates.
* Steps 1-4 configure your local environment to use the staging keys and certificates.

* Step 5 specifies the staging environment with flags needed for signing.
* Step 6 specifies the staging environment with flags needed for verifying.

#### Revert Back to Production

In order to revert, we need to clear the local TUF root data and re-initialize with the default production TUF root data.

1. `rm -r ~/.sigstore`
1. `cosign initialize`

9 changes: 9 additions & 0 deletions content/en/cosign/timestamps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Timestamps"
category: "Cosign"
position: 113
---

jonvnadelberg marked this conversation as resolved.
Show resolved Hide resolved
> Note: This document is a work in progress.

Signature timestamps are checked in the [Rekor](https://github.com/sigstore/rekor) transparency log. Rekor's `IntegratedTime` is signed as part of its `signedEntryTimestamp`. Cosign verifies the signature against the timestamp and checks that the signature was created while the certificate was valid.
11 changes: 11 additions & 0 deletions content/en/cosign/verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgrKKtyws86/APoULh/zXk4LONqII
AcxvLtLEgRjRI4TKnMAXtIGp8K4X4CTWPEXMqSYZZUa2I1YvHyLLY2bEzA==
-----END PUBLIC KEY-----
```
## Custom Components

For configuring Cosign to work with custom components, checkout the [Configuring Cosign with Custom Components](https://docs.sigstore.dev/cosign/custom_components/) docs to find out how to achieve this.

### Custom Root Cert

You can override the public good instance CA using the environment variable `SIGSTORE_ROOT_FILE` by running the following.

```
export SIGSTORE_ROOT_FILE="/home/jdoe/myrootCA.pem"
```

## Experimental Features

Expand Down