commit | fb41e538219ebb713b5a4bb89f03991f2ad417a9 | [log] [tgz] |
---|---|---|
author | Radoslav Dimitrov <radoslav@stacklok.com> | Wed Oct 30 11:27:45 2024 +0100 |
committer | GitHub <noreply@github.com> | Wed Oct 30 12:27:45 2024 +0200 |
tree | 268fa05d80b14fdadfe32d31cf1d43d3424f2c60 | |
parent | 4eb06c8a15763e5eb357012b2fbe53a7ecc6b0c8 [diff] |
Move the repository package under examples/repository (#656) Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
The Update Framework (TUF) is a framework for secure content delivery and updates. It protects against various types of supply chain attacks and provides resilience to compromise.
The Update Framework (TUF) design helps developers maintain the security of a software update system, even against attackers that compromise the repository or signing keys. TUF provides a flexible specification defining functionality that developers can use in any software update system or re-implement to fit their needs.
TUF is hosted by the Linux Foundation as part of the Cloud Native Computing Foundation (CNCF) and its design is used in production by various tech companies and open-source organizations.
Please see TUF's website for more information about TUF!
The go-tuf v2 project provides a lightweight library with the following functionality:
root.Signed.UnrecognizedFields["some-unknown-field"]
, also used for verifying/signing (if included in the Signed portion of the metadata))There are several examples that can act as a guideline on how to use the library and its features. Some of which are:
To try it - run make example-repository
(the artifacts will be located at examples/repository/
).
To try it - run make example-client
(the artifacts will be located at examples/client/
)
To try it - run make example-tuf-client-cli
To try it - run make example-multirepo
metadata
packagemetadata
package provides access to a Metadata file abstraction that closely follows the TUF specification’s document formats. This API handles de/serialization to and from files and bytes. It also covers the process of creating and verifying metadata signatures and makes it easier to access and modify metadata content. It is purely focused on individual pieces of Metadata and provides no concepts like “repository” or “update workflow”.trustedmetadata
packageTrustedMetadata
instance ensures that the collection of metadata in it is valid and trusted through the whole client update workflow. It provides easy ways to update the metadata with the caller making decisions on what is updated.config
packageconfig
package stores configuration for an Updater
instance.fetcher
packagefetcher
package defines an interface for abstract network download.updater
packageupdater
package provides an implementation of the TUF client workflow. It provides ways to query and download target files securely while handling the TUF update workflow behind the scenes. It is implemented on top of the Metadata API and can be used to implement various TUF clients with relatively little effort.multirepo
packagemultirepo
package provides an implementation of TAP 4 - Multiple repository consensus on entrusted targets. It provides a secure search for particular targets across multiple repositories. It provides the functionality for how multiple repositories with separate roots of trust can be required to sign off on the same targets, effectively creating an AND relation and ensuring any files obtained can be trusted. It offers a way to initialize multiple repositories using a map.json
file and also mechanisms to query and download target files securely. It is implemented on top of the Updater API and can be used to implement various multi-repository TUF clients with relatively little effort.The legacy go-tuf (v0.7.0) codebase was difficult to maintain and prone to errors due to its initial design decisions. Now it is considered deprecated in favour of go-tuf v2 (originaly from rdimitrov/go-tuf-metadata) which started from the idea of providing a Go implementation of TUF that is heavily influenced by the design decisions made in python-tuf.
Questions, feedback, and suggestions are welcomed on the #tuf and/or #go-tuf channels on CNCF Slack.
We strive to make the specification easy to implement, so if you come across any inconsistencies or experience any difficulty, do let us know by sending an email, or by reporting an issue in the GitHub specification repo.