at the very top of the README.
and:
- note that this implementation is intended to conform to version
1.0 of the TUF specification
- draw some distinctions between the TUF design and this ref impl.
- turn the older blurb about TUF into an About-TUF section
- expand that blurb with a link to both an introduction in the repo
and the TUF website
- make the documentation links a bit more explicit
- shuffle some graphical elements for better appeal
- minor changes like extending some link text
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Update astroid from 2.0.4 to 2.2.5
Update cffi from 1.11.5 to 1.12.2
Update cffi from 1.11.5 to 1.12.2
Update configparser from 3.5.0 to 3.7.4
Update cryptography from 2.4.2 to 2.6.1
Update cryptography from 2.4.2 to 2.6.1
Update isort from 4.3.4 to 4.3.16
Update pbr from 5.1.1 to 5.1.3
Update pluggy from 0.8.0 to 0.9.0
Update py from 1.7.0 to 1.8.0
Update pylint from 2.1.1 to 2.3.1
Update pyyaml from 4.2b1 to 5.1
Update stevedore from 1.30.0 to 1.30.1
Update tox from 3.5.3 to 3.8.6
Update virtualenv from 16.1.0 to 16.4.3
Update wrapt from 1.10.11 to 1.11.1
Update certifi from 2018.11.29 to 2019.3.9
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
- correctly frame the CLI's current state as a tutorial toy.
- provide a friendlier quickstart that puts what it's doing into
perspective and guides you to next steps.
- provide a better sense of what each tutorial/quickstart doc is
for.
- make the getting started page slightly more friendly.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Raise an error if it's not a schema.Object instance (not just
if it's not a schema.Schema instance).
Also adds a test for this.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
May the Python gods forgive me for having three different
names with the same names and different casing on one line....
Perhaps I should address the import module as....
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
- Expand on the arguments/kwargs
- Note that the function is particular to schema.Object objects.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
in tuf.formats.build_dict_conforming_to_schema
Populate _type with the expected value for the given schema, and
populate spec_version with tuf.SPECIFICATION_VERSION. Do this only
when the values are not provided, and support overriding them.
Also adds testing for the above and takes advantage of the above
in repository_lib's _generate metadata functions.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Make a copy of the provided fields so that the caller's provided values
do not change when the returned values are changed.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
tuf.formats.make_role_metadata concerned itself with exclusivity checks
for paths and path_hash_prefixes, but no code actually used it for
relevant data. It's yet another custom metadata writer replaced by
build_dict_conforming_to_schema.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
It was excluded from the Timestamp schema definition in error.
In the process of making metadata writing use the Timestamp schema
strictly, this bug was discovered. Metadata previously written
included specification version, but the schema check did not.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Add a tuf-level variable in tuf/__init__.py indicating the version
of the TUF specification that the code in this repository is
intended and expected to conform to.
This will be used when writing metadata.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Kills classes MetaFile, RootFile, TargetsFile, MirrorsFile,
SnapshotFile, and TimestampFile. They each had an unused
from_ method and a used make_ method. They were all additional,
unnecessary representations of the same metadata, and it is
very important that metadata formats be defined once in the
reference implementation, in the schemas that are already used
more broadly, in foramts.py.
Replaces the classes, their methods, and some associated variables
with a single short function called build_dict_conforming_to_schema
that takes keyword arguments and builds a dictionary, then checks
to make sure that the result conforms to the given schema.
This commit shifts repository_lib from use of the old classes to
the new function.
In later commits, we should use this function more broadly, since it
can be of use in all schema construction.
There are several TODOs added to the code, mostly for post-#660
tasks.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Specification version now only lives in tuf/__init__.py, and will only be
derived from there.
Specification version info is no longer in tuf.formats, where it was
previously moved from tuf.updater, since this was redundant.
Also finally corrects spec version testing in test_updater.py.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
and generate more friendly errors. Prior to this, a test in
test_updater.py was written in such a way to not actually be
testing whether or not specification version checking was
working correctly -- the error updater.py raised if a specification
version number was not supported was the same as would be raised
if a role version was not the expected version, and, amusingly,
the test could not distinguish between these two scenarios and
was providing the wrong role version......
Specification version mismatch now raises a particular error:
UnsupportedSpecificationError.
The specification version supported by this code is now also all
in one place, tuf.formats rather than tuf.updater.
Related error messages and testing were improved (with some
edge cases closed).
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Python3 does not support exception subscripting:
e.g. except ... as e:
e[1] # does not work in Python3
This line of code was presumably not covered by testing,
allowing it to persist.
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
Add note to make clear what was implicit: that once a delegated role is created,
it can be accessed (for the same purposes as you'd access the Targets role
using `repository.targets`) as: `repository.targets("<delegated rolename>")`.
Also add that specific note to the add_targets section of the tutorial.
Note that the `repo.py --init` call also sets up a client directory.
A student recently ran into some confusion on this point, and it's not properly documented here.
- refer to the authoritative sources for the latest releases
- include new packager information
- add tasks for upcoming releases
- generalize release schedule
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>