Commit graph

6 commits

Author SHA1 Message Date
Lukas Puehringer
ef388daa3a doc: clarify math in hash bin delegation example
Tries to clarify the introductory text in the hash bin delegation
example.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-10 10:13:42 +01:00
Lukas Puehringer
b8cf1c0e37 doc: annotate types in hash bin delegation example
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-03 10:49:57 +01:00
Lukas Puehringer
e90acfe123 doc: basic hash bin delegation repo example + test
As 'repository_tool' and 'repository_lib' are being deprecated,
hash bin delegation interfaces are no longer available in this
implementation. The example code in this file demonstrates how to
easily implement those interfaces, and how to use them together
with the TUF metadata API, to perform hash bin delegation.

Note, the hash bin delegation logic in this example is largely
copied from repository_{lib, tool}, and modernized and simplified
for this purpose.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-03 10:33:24 +01:00
Lukas Puehringer
caffc415d1 doc: use sentence case in all repo example titles
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-03 10:33:24 +01:00
Martin Vrachev
1ae6a22b8e Start linting the examples folder
The examples folder currently contains a repository example and it's
good if we start linting its content and as a result add type
annotations.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-02 13:40:14 +02:00
Lukas Puehringer
190c21b65b doc: add repository example based on metadata API
As 'repository_tool' and 'repository_lib' are being deprecated,
repository metadata must to be created and maintained manually
using the low-level Metadata API. The added example code shall
serve as temporary replacement until a new repository tool is
available.

The sample code contains the following repo workflows:
 - creation of top-level metadata
 - target file handling
 - consistent snapshots
 - key management
 - top-level delegation and signing thresholds
 - target delegation
 - in-band and out-of-band metadata signing
 - writing and reading metadata files
 - root key rotation

Co-authored-by: Teodora Sechkova <tsechkova@vmware.com>
Co-authored-by: Joshua Lock <jlock@vmware.com>
Co-authored-by: Jussi Kukkonen <jku@goto.fi>

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-11-29 13:25:10 +01:00