Skip to content

Commit ee16c68

Browse files
authored
Merge pull request #164 from marcelamelara/docs-updates
Some more docs cleanup
2 parents e1af168 + 25e4b65 commit ee16c68

File tree

4 files changed

+45
-45
lines changed

4 files changed

+45
-45
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
The in-toto Attestation Framework provides a specification for generating
44
verifiable claims about any aspect of how a piece of software is produced.
5-
Consumers or users of software can then validate the origins of the
6-
software, and establish trust in its supply chain, using in-toto attestations.
5+
Consumers or users of software can then validate the origins of the software,
6+
and establish trust in its supply chain, using in-toto attestations.
77

88
## Learning about in-toto attestations
99

@@ -21,6 +21,9 @@ defines the format for in-toto attestations and the metadata they contain.
2121
We also provide a set of [attestation predicates], which are metadata
2222
formats vetted by our maintainers to cover a number of common use cases.
2323

24+
For tooling integration, we provide [protobuf definitions] of the spec.
25+
We currently only provide a pre-generated library for Go.
26+
2427
## Is your use case not covered by existing predicate types?
2528

2629
Take a look at the open [issues] or [pull requests] to see if your usage has
@@ -55,5 +58,6 @@ the framework. In the meantime, please visit any of the language-specific
5558
[in-toto]: https://in-toto.io
5659
[in-toto implementations]: https://github.com/in-toto
5760
[issues]: https://github.com/in-toto/attestation/issues?q=is%3Aopen+is%3Aissue
61+
[protobuf definitions]: docs/protos.md
5862
[pull requests]: https://github.com/in-toto/attestation/pulls?q=is%3Aopen+is%3Apr
5963
[specification]: spec/

docs/protos.md

+23-16
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
1-
# Statement protobuf definitions
1+
# Spec protobuf definitions
22

3-
Protobuf definitions for the in-toto statement type and some predicates are provided in the
4-
spec/ directory. Pre-generated Go implementation of those protos are available in the go dir.
3+
Protobuf definitions for the in-toto spec and some predicates are
4+
provided in the spec/ directory. Pre-generated Go implementation of those
5+
protos are available in the go/ directory.
56

6-
go/example/main.go provides an example of how these protos can be used.
7+
## Pre-requisites
78

8-
To try it:
9+
On an Ubuntu-based system, install the following dependencies.
910

1011
```shell
11-
$ make run
12-
...
13-
Read statement with predicateType https://example.com/unknownPred2
14-
Predicate fields:{key:"foo" value:{struct_value:{fields:{key:"bar" value:{string_value:"baz"}}}}}
12+
sudo apt install protobuf-compiler golang
1513
```
1614

17-
Please consider providing a proto version of any new predicates proposed.
18-
1915
## Regenerating Go proto libraries
2016

2117
[It's typical to keep generated Go code in the repository itself](https://go.dev/doc/articles/go_command#:~:text=and%20then%20check%20those%20generated%20source%20files%20into%20your%20repository)
22-
since it makes users lives much easier.
18+
since it makes users' lives much easier.
2319

24-
Proto libraries should be regenerated & commited after any change to the proto files:
20+
Proto libraries should be regenerated & commited after any change to the
21+
proto files:
2522

2623
```shell
2724
$ make go_protos
28-
go get google.golang.org/protobuf/cmd/[email protected]
29-
protoc --go_out=go --go_opt=paths=source_relative ./spec/predicates/vsa.proto ./spec/v1.0/statement.proto
3025
$ git commit -asm "update protos"
31-
[statement_proto 5edb2c6] Update protos
3226
...
3327
```
28+
29+
## Run the Go example
30+
31+
go/example/main.go provides an example of how these protos can be used.
32+
33+
To try it:
34+
35+
```shell
36+
$ make run
37+
...
38+
Read statement with predicateType https://example.com/unknownPred2
39+
Predicate fields:{key:"foo" value:{struct_value:{fields:{key:"bar" value:{string_value:"baz"}}}}}
40+
```

spec/predicates/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ community! Please see our [New Predicate Guidelines].
1212
This directory contains predicate specification types that have gone through
1313
our [vetting process], and may be of general interest:
1414

15-
- [SLSA Provenance]: To describe the origins of a software artifact.
15+
- [SLSA Provenance]: Describes how an artifact or set of artifacts was
16+
produced.
1617
- [Link]: For migration from [in-toto 0.9].
1718
- [SCAI Report]: Evidence-based assertions about software artifact and
1819
supply chain attributes or behavior.
19-
- [Runtime Traces]: To capture runtime traces of software supply chain
20+
- [Runtime Traces]: Captures runtime traces of software supply chain
2021
operations.
22+
- [SLSA Verification Summary]: SLSA verification decision about a software
23+
artifact.
2124

2225
[Link]: link.md
2326
[New Predicate Guidelines]: ../../docs/new_predicate_guidelines.md
2427
[SCAI Report]: scai.md
2528
[SLSA Provenance]: https://slsa.dev/provenance
29+
[SLSA Verification Summary]: https://github.com/in-toto/attestation/blob/main/spec/predicates/vsa/vsa.md
2630
[in-toto 0.9]: https://github.com/in-toto/docs/blob/master/in-toto-spec.md#44-file-formats-namekeyid-prefixlink
2731
[vetting process]: ../../docs/new_predicate_guidelines.md#vetting-process
2832
[Runtime Traces]: runtime-trace.md

spec/v1.0/envelope.md

+10-25
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
11
# Envelope layer specification
22

3-
Version: v1.0
3+
Version: [DSSE v1.0]
44

55
The Envelope is the outermost layer of the attestation, handling
6-
authentication and serialization. The format and protocol are defined in
7-
[DSSE] and adopted by in-toto in [ITE-5].
6+
authentication and serialization.
87

98
## Schema
109

11-
```jsonc
12-
{
13-
"payloadType": "application/vnd.in-toto+json",
14-
"payload": "<Base64(Statement)>",
15-
"signatures": [{"sig": "<Base64(Signature)>"}]
16-
}
17-
```
10+
The format and protocol are defined per [DSSE v1.0].
1811

1912
## Fields
2013

21-
`payloadType` _string, required_
14+
The in-toto Attestation Framework has the following requirements for the
15+
standard DSSE fields.
2216

23-
> Identifier for the encoding of the payload. Always
24-
> `application/vnd.in-toto+json`, which indicates that it is a JSON object
25-
> with a `_type` field indicating its schema.
17+
- `payloadType` MUST be set to `application/vnd.in-toto+json`, which
18+
indicates that the Envelope contains a JSON object with a `_type` field
19+
specifying its schema.
20+
- `payload` MUST be a base64-encoded JSON [Statement].
2621

27-
`payload` _string, required_
28-
29-
> Base64-encoded JSON [Statement].
30-
31-
`signatures` _array of objects, required_
32-
33-
> One or more signatures over `payloadType` and `payload`, as defined in
34-
> [DSSE].
35-
36-
[DSSE]: https://github.com/secure-systems-lab/dsse
37-
[ITE-5]: https://github.com/in-toto/ITE/blob/master/ITE/5/README.adoc
22+
[DSSE v1.0]: https://github.com/secure-systems-lab/dsse/blob/v1.0.0/envelope.md
3823
[Statement]: statement.md

0 commit comments

Comments
 (0)