If we have a goal of making metadata that can just be served to clients,
then these (and the parent metadata) should have versioned filenames.
Change the file names of the delegated files in the
hashed_bin_delegation.py to versioned.
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Add a basic example script showing all features of the succinct hash bin
delegations and the available API calls of SuccinctRoles.
The explanations are used to promote the usage of succinct hash bin
delegations by explaining it well enough so our users can understand
the API limitations and how to use them and at the same time I tried not
going into too many details of the SuccinctRoles math as its
implementation is inside tuf/api/metadata.py and there there are
explanations about that.
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Following parallel merges of #1700 (added new test method),
and #1710 (started running mypy on tests), ci/cd fails in the
develop branch. This is fixed in this patch.
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
Logging configuration is part from each test file begging from commit
03b15fb4be
We should that as well for tests/test_examples.py
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
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>
Adds new test module that executes the basic repo example
Python script and checks that it created certain (metadata)
files.
The test module is tailored for testing similar example scripts.
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>