Commit 1731ad0c authored by Mark Lodato's avatar Mark Lodato
Browse files

Split out survey, update README

parent 3da08942
......@@ -11,12 +11,31 @@ NOTE: This is still a work in progress.
metadata.
* [Policies](policy.md): Conventions for how to express security policies
based on attestations.
* [Survey](survey.md): Survey of existing and in-development controls that
relate to the framework.
## Project Scope and Organization
## Project Goals
We recommend a cohesive set of formats, conventions, and tools to provide
end-to-end software supply chain integrity guarantees. Currently, there are
various projects in this space with overlapping missions and often incompatible
interfaces. No one project solves all problems and it is confusing to understand
how the pieces fit together. The well-lit path we define will make it easier for
users to achieve the guarantees they desire.
(1) Build an ecosystem around software attestations and policies, applicable to
use cases beyond SLSA and supply chain integrity:
* Establish clear and consistent terminology and data models.
* Define simple interfaces between layers/components, to allow
compatibility between implementations and to encourage discrete,
composable technologies.
* Recommend a cohesive suite of formats, conventions, and tools that are
known to work well together.
Currently, there are various projects in this space with overlapping missions
and incompatible interfaces. No one project solves all problems and it is
confusing to understand how the pieces fit together. Our goal is to define a
"well-lit path" to make it easier for users to achieve the guarantees they
desire.
(2) Provide recipes for achieving SLSA, built on the ecosystem above:
* Identify base technologies that meet the SLSA requirements, which serves as
guidance to system implementers on how to build SLSA-compl8iant services.
Example: "CI/CD systems should produce provenance attestations in format X."
* Recommend simple end-to-end solutions for end users (software developers) to
achieve SLSA. Example: "Configure GitHub this way to reach SLSA 3."
# Software Attestations
Author: lodato@google.com \
Date: March 9, 2021 \
Date: March 2021 \
Status: IN REVIEW
## Objective
......@@ -130,147 +130,10 @@ Summary: Generate [in-toto](https://in-toto.io) attestations.
* Docker/OCI Registry:
**[sigstore/cosign](https://github.com/sigstore/cosign)**
## Survey of Known Formats
See [survey](survey.md) for other options.
The following list shows how existing formats map to our model, along with
various properties we think may be valuable.
## Appendix: Naming
### Envelope Layer (not specific to Attestations)
[signing-spec]: https://github.com/secure-systems-lab/signing-spec/
[OpenPGP]: https://tools.ietf.org/html/rfc4880
[JWS]: https://tools.ietf.org/html/rfc7515
[JWT]: https://tools.ietf.org/html/rfc7519
[in-toto v1]: https://github.com/in-toto/docs/blob/master/in-toto-spec.md
[PASETO]: https://paseto.io
[JSS]: https://jsonenc.info/jss/1.0/
Property | [signing-spec] | [OpenPGP] | [JWS]/[JWT] | [PASETO] | [in-toto v1] | [JSS]
----------------------- | -------------- | --------- | ----------- | -------- | ------------ | -----
Authenticated Purpose | ✓ | ✗ | ✓ | ✗ | ✓ | ✗
Arbitrary Message Type | ✓ | ✓ | ✗ | ✗ | ✗ | ✗
Simple | ✓ | ✗ | ✗ | ✓ | ✓ | ✓
Avoids Canonicalization | ✓ | ✓ | ✓ | ✓ | ✗ | ✓
Pluggable Crypto | ✓ | ✗ | ✓ | ✗ | ✓ | ✓
Efficient Encoding | ✓ | ✗ | ✗ | ✗ | ✓ | ✗
Widely Adopted | ✗ (not yet!) | ✓ | ✓ | ✗ | ✗ | ✗
Properties:
- **Authenticated Purpose:** Does the envelope authenticate how the verifier
should interpret the message in order to prevent confusion attacks?
- ✓ signing-spec: `payloadType`, JWS: `typ`, JWT: `aud`, in-toto v1:
`_type`
- **Arbitrary Message Type:** Does the envelope support arbitrary message
types / encodings?
- ✗ PASETO, JWS/JWT, in-toto v1, JSS: only supports JSON messages
- **Simple:** Is the standard simple, easy to understand, and unlikely to be
implemented incorrectly?
- ✗ PGP: Enformous RFC.
- ✗ JWS/JWT: Enormous RFC, many vulnerabilities in the past.
- **Avoids Canonicalization:** Does the protocol avoid relying on
canonicalization for security, in order to reduce attack surface?
- ✗ in-toto v1: Relies on Canonical JSON
- **Pluggable Crypto:** If desired, can the cryptographic algorithm and key
management be swapped out if desired? (Not always desirable.)
- ✗ OpenPGP: Uses PGP
- ✗ PASETO: Mandates very specific algorithms, e.g. ed25519
- **Efficient Encoding:** Does the standard avoid base64, or can the envelope
be re-encoded in a more efficient format, such as protobuf or CBOR, without
invalidating the signature?
- **Widely Adopted:** Is the standard widely adopted?
- ✗ signing-spec: Not yet used, though in-toto and TUF plan to.
- ✗ PASETO: Not common.
- ✗ in-toto v1: Only by in-toto and TUF.
- ✗ JSS: Abandoned, never used.
### Statement Layer
[in-toto v2]: https://github.com/in-toto/attestations
[Simple Signing]: https://github.com/containers/image/blob/master/docs/containers-signature.5.md
[Notary v2]: https://github.com/notaryproject/nv2
[SPDX]: https://github.com/spdx/spdx-spec
Property | [in-toto v2] | [in-toto v1] | [Simple Signing] | [Notary v2] | Raw Signing
--------------------- | ------------ | ------------ | ---------------- | ----------- | -----------
Recommended Envelope | signing-spec | in-toto v1 | OpenPGP | JWT | (various)
Subject: Clear | ✓ | ✗ | ✓ | ✓ | ✓
Subject: Any Type | ✓ | ✓ | ✗ | ✓ | (depends)
Subject: Multi-Digest | ✓ | ✓ | ✗ | ✗ | (depends)
Predicate: Supported | ✓ | ✓ | ✓ | ✗ | ✗
Predicate: Flexible | ✓ | ✗ (*) | ✓ | (n/a) | (n/a)
Predicate: Typed | ✓ | ✗ | ✗ | (n/a) | (n/a)
Materials: Supported | ✓ | ✓ | ✗ | ✗ | ✗
Layered | ✓ | ✗ | ✓ | (n/a) | (n/a)
Evolvable | ✓ | ✓ | ✗ | ✓ | ✗
Properties:
- **Recommended Envelope:** Which envelope is recommended (or possibly
required)?
- **Subject: Clear:** Is the Attestation clearly about a particular
attestation?
- ✗ in-toto v1: Subject is ambiguous between `materials` and `products`.
- **Subject: Any Type:** Does Subject support arbitrary Artifact types?
- ✗ Simple Signing: `critical.image` only supports Docker/OCI image
manifests (and because it's `critical`, that field is required.) Also,
`critical.identity` is required but not applicable to all use cases
(e.g. build provenance, where the identity is not yet known).
- **Subject: Multi-Digest:** Does Subject support specifying multiple digest
algorithms for crypto agility?
- ✗ Only one digest supported. (The `multihash` algorithm mentioned in the
OCI image-spec is not defined or implemented anywhere.)
- **Predicate: Supported:** Can a predicate be supplied?
- ✗ Notary v2: Does not officially support a predicate. Undefined what
happens if extra predicate fields are added to the JWT.
- **Predicate: Flexible:** Can a user-defined predicate be used?
- ✗ in-toto v1: Several fixed, required predicate fields. Technically
arbitrary data can be added to `environment` but that is not well
documented or standardized.
- ✓ Simple Signing: Can use `optional` field.
- **Predicate: Typed:** Is there a well-established convention of indicating
the meaning of the Attestation and/or the schema of the user-defined
predicate unambiguous?
- **Materials: Supported:** Are Materials standardized in the Statement layer?
- **Layered:** Does the schema clearly match the layers of our
[model](#model-and-terminology)?
- ✗ in-toto v1: Statement and Predicate fields are mixed together.
- **Evolvable:** Can the spec be modified to support required features?
- ✗ Simple Signing: The `critical` field can effectively never change
because the producer and consumer must agree in lock step.
### Bundle + Storage/Lookup
- Local filesystem
- (none yet)
- OCI/Docker Registry:
- [sigstore/cosign](https://github.com/sigstore/cosign) **(recommended)**
- [Notary v2]
### Raw artifact signing
For reference, we list examples of raw artifact signing, where the statement
only contains the subject.
- [Node.js](https://github.com/nodejs/node#verifying-binaries)
([example](https://nodejs.org/dist/v14.16.0/SHASUMS256.txt.asc))
- Envelope: PGP Signed Message.
- Statement: List of (sha256, filename) pairs.
## TODO
Show how the following are related:
- [Binary Authorization](https://cloud.google.com/sdk/gcloud/reference/beta/container/binauthz/create-signature-payload)
- Secure Boot - Also uses the term "attestation", possibly with a different
meaning. Need to make sure it's compatible. Ask
[kmoy](https://moma.corp.google.com/person/kmoy) and
[arimed](https://moma.corp.google.com/person/arimed).
- Cosign / SigStore
- Drydock
- Docker Content Trust
- Notary v1
- "attached" signatures. RPMs, Maven artifacts, Windows drivers, OSX app store
apps
- Android APK signatures
- (Public) transparency ledger?
TODO(lodato) Provide a survey of possible names we considered, along with
pros/cons: Attestation, Testimony, Testament, Claim, Voucher, Statement,
Predicate, Message, Finding.
# Attestation-based Policies
Author: lodato@google.com \
Date: March 9, 2021 \
Date: March 2021 \
Status: EARLY DRAFT
## Objective
......
# Survey of Known Technologies
Author: lodato@google.com \
Date: March 2021 \
Status: IN REVIEW
## Objective
Document all known technologies that relate to SLSA, how they map to our model,
and a (hopefully not too biased) assessment of various properties of each.
See [Attestations](attestations.md) and [Policy](policy.md) for the
corresponding models and terminology.
## Overview
The following table provides an overview of how various technologies map to our
model. Subsequent sections analyze each layer.
[Binary Authorization]: https://cloud.google.com/binary-authorization
[JSS]: https://jsonenc.info/jss/1.0/
[JWS]: https://tools.ietf.org/html/rfc7515
[JWT]: https://tools.ietf.org/html/rfc7519
[Notary v2]: https://github.com/notaryproject/nv2
[OpenPGP]: https://tools.ietf.org/html/rfc4880
[PASETO]: https://paseto.io
[SPDX]: https://github.com/spdx/spdx-spec
[Simple Signing]: https://github.com/containers/image/blob/master/docs/containers-signature.5.md
[in-toto v1]: https://github.com/in-toto/docs/blob/master/in-toto-spec.md
[in-toto v2]: https://github.com/in-toto/attestations
[signing-spec]: https://github.com/secure-systems-lab/signing-spec/
Project | Envelope | Statement | Predicate | Storage | Generation | Policy | Status
---------------------- | -------- | --------- | --------- | ------- | ---------- | ------ | ------
Raw signing | ✓ | ✓ | ✗ | | | | (varies)
[JSS] | ✓ | | | | | | Abandoned
[JWS] | ✓ | | | | | | IETF Standard
[JWT] | ✓ | | | | | | IETF Standard
[OpenPGP] | ✓ | | | | | | IETF Standard
[PASETO] | ✓ | | | | | | Stable
[signing-spec] | ✓ | | | | | | In development
[in-toto v1] | ✓ | ✓ | ✓ | | ✓ | ✓ | Stable
[Notary v2] | ~ | ✓ | ✗ | ✓ | | ✓ | In development
[Simple Signing] | ~ | ✓ | | | | | Stable
[in-toto v2] | ~ | ✓ | | | | | In development
[SPDX] | | | ✓ | | | | Stable
[Binary Authorization] | ~ | ~ | ✗ | ~ | | ✓ | Stable
Legend:
* ✓ Defines this layer
* ✗ Does not support this layer
* ~ Imposes requirements on this layer
* (blank) No opinion on this layer
Columns:
* Envelope: Defines the envelope layer of the attestation.
* Statement: Defines the statement layer of the attestation.
* Predicate: Defines the predicate layer of the attestation.
* Storage: Provides a mechanism for attestation storage and retrieval.
* Generation: Provides a mechanism for generating attestations.
* Policy: Provides a mechanism for consuming attestations and rendering policy
decisions.
* Status: Is it available now?
## Envelope Layer (not specific to Attestations)
Property | [signing-spec] | [OpenPGP] | [JWS]/[JWT] | [PASETO] | [in-toto v1] | [JSS]
----------------------- | -------------- | --------- | ----------- | -------- | ------------ | -----
Authenticated Purpose | ✓ | ✗ | ✓ | ✗ | ✓ | ✗
Arbitrary Message Type | ✓ | ✓ | ✗ | ✗ | ✗ | ✗
Simple | ✓ | ✗ | ✗ | ✓ | ✓ | ✓
Avoids Canonicalization | ✓ | ✓ | ✓ | ✓ | ✗ | ✓
Pluggable Crypto | ✓ | ✗ | ✓ | ✗ | ✓ | ✓
Efficient Encoding | ✓ | ✗ | ✗ | ✗ | ✓ | ✗
Widely Adopted | ✗ (not yet!) | ✓ | ✓ | ✗ | ✗ | ✗
Properties:
- **Authenticated Purpose:** Does the envelope authenticate how the verifier
should interpret the message in order to prevent confusion attacks?
- ✓ signing-spec: `payloadType`, JWS: `typ`, JWT: `aud`, in-toto v1:
`_type`
- **Arbitrary Message Type:** Does the envelope support arbitrary message
types / encodings?
- ✗ PASETO, JWS/JWT, in-toto v1, JSS: only supports JSON messages
- **Simple:** Is the standard simple, easy to understand, and unlikely to be
implemented incorrectly?
- ✗ PGP: Enformous RFC.
- ✗ JWS/JWT: Enormous RFC, many vulnerabilities in the past.
- **Avoids Canonicalization:** Does the protocol avoid relying on
canonicalization for security, in order to reduce attack surface?
- ✗ in-toto v1: Relies on Canonical JSON
- **Pluggable Crypto:** If desired, can the cryptographic algorithm and key
management be swapped out if desired? (Not always desirable.)
- ✗ OpenPGP: Uses PGP
- ✗ PASETO: Mandates very specific algorithms, e.g. ed25519
- **Efficient Encoding:** Does the standard avoid base64, or can the envelope
be re-encoded in a more efficient format, such as protobuf or CBOR, without
invalidating the signature?
- **Widely Adopted:** Is the standard widely adopted?
- ✗ signing-spec: Not yet used, though in-toto and TUF plan to.
- ✗ PASETO: Not common.
- ✗ in-toto v1: Only by in-toto and TUF.
- ✗ JSS: Abandoned, never used.
## Statement Layer
Property | [in-toto v2] | [in-toto v1] | [Simple Signing] | [Notary v2] | Raw Signing
--------------------- | ------------ | ------------ | ---------------- | ----------- | -----------
Recommended Envelope | signing-spec | in-toto v1 | OpenPGP | JWT | (various)
Subject: Clear | ✓ | ✗ | ✓ | ✓ | ✓
Subject: Any Type | ✓ | ✓ | ✗ | ✓ | (depends)
Subject: Multi-Digest | ✓ | ✓ | ✗ | ✗ | (depends)
Predicate: Supported | ✓ | ✓ | ✓ | ✗ | ✗
Predicate: Flexible | ✓ | ✗ (*) | ✓ | (n/a) | (n/a)
Predicate: Typed | ✓ | ✗ | ✗ | (n/a) | (n/a)
Materials: Supported | ✓ | ✓ | ✗ | ✗ | ✗
Layered | ✓ | ✗ | ✓ | (n/a) | (n/a)
Evolvable | ✓ | ✓ | ✗ | ✓ | ✗
Properties:
- **Recommended Envelope:** Which envelope is recommended (or possibly
required)?
- **Subject: Clear:** Is the Attestation clearly about a particular
attestation?
- ✗ in-toto v1: Subject is ambiguous between `materials` and `products`.
- **Subject: Any Type:** Does Subject support arbitrary Artifact types?
- ✗ Simple Signing: `critical.image` only supports Docker/OCI image
manifests (and because it's `critical`, that field is required.) Also,
`critical.identity` is required but not applicable to all use cases
(e.g. build provenance, where the identity is not yet known).
- **Subject: Multi-Digest:** Does Subject support specifying multiple digest
algorithms for crypto agility?
- ✗ Only one digest supported. (The `multihash` algorithm mentioned in the
OCI image-spec is not defined or implemented anywhere.)
- **Predicate: Supported:** Can a predicate be supplied?
- ✗ Notary v2: Does not officially support a predicate. Undefined what
happens if extra predicate fields are added to the JWT.
- **Predicate: Flexible:** Can a user-defined predicate be used?
- ✗ in-toto v1: Several fixed, required predicate fields. Technically
arbitrary data can be added to `environment` but that is not well
documented or standardized.
- ✓ Simple Signing: Can use `optional` field.
- **Predicate: Typed:** Is there a well-established convention of indicating
the meaning of the Attestation and/or the schema of the user-defined
predicate unambiguous?
- **Materials: Supported:** Are Materials standardized in the Statement layer?
- **Layered:** Does the schema clearly match the layers of our
[model](#model-and-terminology)?
- ✗ in-toto v1: Statement and Predicate fields are mixed together.
- **Evolvable:** Can the spec be modified to support required features?
- ✗ Simple Signing: The `critical` field can effectively never change
because the producer and consumer must agree in lock step.
## Bundle + Storage/Lookup
- Local filesystem
- (none yet)
- OCI/Docker Registry:
- [sigstore/cosign](https://github.com/sigstore/cosign) **(recommended)**
- [Notary v2]
## Raw artifact signing
For reference, we list examples of raw artifact signing, where the statement
only contains the subject.
- [Node.js](https://github.com/nodejs/node#verifying-binaries)
([example](https://nodejs.org/dist/v14.16.0/SHASUMS256.txt.asc))
- Envelope: PGP Signed Message.
- Statement: List of (sha256, filename) pairs.
## TODO
Show how the following are related:
- Cosign / SigStore
- Kritis
- Grafeas / Container Analysis
- Docker Content Trust
- Notary v1
- "attached" signatures. RPMs, Maven artifacts, Windows drivers, OSX app store
apps
- Android APK signatures
- (Public) transparency ledger?
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment