Commit graph

391 commits

Author SHA1 Message Date
Joshua Lock
4f8da50424 Add Teodora to maintainers
Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-08-31 09:57:52 +01:00
Joshua Lock
3877e24346
ADR-0009: document purpose of ref implementation (#1547)
Capture discussion around the purpose of the reference implementation.
That we prioritise being an exemplary implementation over being a
pedagogical implementation.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-08-30 13:27:45 -04:00
Jussi Kukkonen
2dd88d987b
Adding my GPG fingerprint to MAINTAINERS.txt (#1548)
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-29 12:20:19 -04:00
Teodora Sechkova
21ff4920ab
docs: Improve formating
Remove/add new lines at the end of file.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-08-25 17:06:36 +03:00
Teodora Sechkova
e5de36f4e0
docs: Add links to the specification
Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-08-25 17:06:11 +03:00
Jussi Kukkonen
657aa3dfd5
docs: Improve ngclient docs
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-25 17:05:07 +03:00
Jussi Kukkonen
1a714f7dc8
docs: Improve tuf.api docs
Write a bit more about the two modules, hide the actual TOC to not
repeat (and not have sphinx complain about missing items in TOC)

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-25 17:05:06 +03:00
Jussi Kukkonen
4f71f98008
docs: Move the sphinx root to docs/
This allows using existing documentation in the published documentation
without
* moving the existing docs (which would break external links)
* tricks like symlinks that create issues with relative links

Put the api reference files into a subdirectory to avoid polluting the
main docs/ directory.

Include "Installation" and "Instructions for Contributors" in the
published documentation.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-25 17:05:06 +03:00
Jussi Kukkonen
3ee6a3e786
docs: Tweak INSTALLATION.rst
* Remove link to outdated roadmap
* Link to maintainers file in the same way as two lines earlier
* Fix formatting issues with code blocks

These fixes allow the installation rst to be used from sphinx sources
and from docs root.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-25 17:05:05 +03:00
Jussi Kukkonen
b3869186f0
docs: API Reference tweaks
* Improve content
* Make ngclient Updater __init__() visible in docs
* Remove "legacy implementation" (except for the note on API stability)

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-08-25 17:05:05 +03:00
Teodora Sechkova
e32beb5845
Add sphinx docs source files
Add .rst source files for building documentation with
'sphinx'. The two mandatory files are conf.py containing
the build configuration and the master doc file index.rst.

Sphinx uses 'autodoc' to automatically include docstrings.
'autodoc' imports the modules and needs TUF installed in
the environment.

The following command will generate the documentation from the
source files in an html format:

`sphinx-build -b html docs/sphinx/source docs/sphinx/build/html`

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-08-23 18:25:03 +03:00
hosseinsia
01e2308428
Update CLI.md (#1508)
* Update CLI.md

Update the suggested command template for "trust keys", to make it consistent with other examples.

Signed-off-by: hosseinsia <hossein.siadati@datadoghq.com>

* Update docs/CLI.md

Remove the + to avoid confusion.

Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>
Signed-off-by: hosseinsia <hossein.siadati@datadoghq.com>

Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>
2021-07-27 20:32:36 -04:00
samuelgregorovic
112575d987 updated docs and comments
Updated/removed documented commands and comments which were referencing Python2. Also updated links to documentation referencing Python2 docs (unchanged where needed)

Signed-off-by: Samuel Gregorovic <samuelgregorovic@gmail.com>
Signed-off-by: samuelgregorovic <samuelgregorovic@gmail.com>
2021-07-14 10:37:08 +03:00
Joshua Lock
885fcacd0b
Merge pull request #1270 from lukpueh/adr0006
ADR0006: Where to implement model serialization
2021-07-08 09:06:03 +01:00
Philippe Coval
f496c83e78 docs: Remove academics files
Duplication is not needed since files are hosted in website project:

https://github.com/theupdateframework/theupdateframework.io/tree/master/static/papers

Those generated files are not explicitly under Apache-2.0 licence
and AFAIK they can not be regenerated from missing (latex?) sources.

To avoid licence mixup.
It would help to have those files published elsewhere.
Meanwhile online (Github) links are used.

Debian had to repack the source package to make tarball compliant with DFSG
despite debian tools are known to be trustworthy,
this extra step would add weakess in the chain of trust

Cleanup done upstream would make distribution safer.

Bug: https://github.com/theupdateframework/tuf/issues/1161
Bug-Debian: https://salsa.debian.org/python-team/packages/tuf/-/merge_requests/11
Relate-to: https://github.com/theupdateframework/tuf/issues/263#issuecomment-835239415
Forwarded: https://github.com/theupdateframework/tuf/pull/1380
Relate-to: https://github.com/theupdateframework/specification/pull/160
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2021-05-28 17:07:14 -04:00
Martin Vrachev
f695bfd24e
Add ADR8 to the ADR's index file
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-04-16 12:26:42 +03:00
Jussi Kukkonen
ed3d00eb99
Merge pull request #1343 from MVrachev/adr8
Document ADR 0008 about unrecognized fields
2021-04-16 11:36:22 +03:00
Martin Vrachev
d0fa8fc8ca Document ADR 0008 about unrecognized fields
Even though, this ADR documents something already implied in the TUF
spec in [document formats](https://theupdateframework.github.io/specification/latest/#document-formats)
it seems better to document this decision clearly so that it could be
referenced and give an explanation why someone can load a metadata file
with additional unrecognized fields.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-04-14 13:51:55 +03:00
maoyangLiu
420937a96d fix the outdate url
Signed-off-by: maoyangLiu <liumaoyang@inspur.com>
2021-04-08 10:27:17 +08:00
Lukas Puehringer
164074dbd3 ADR0006: Where to implement model serialization
Add decision record about the design of de/serialization between
TUF metadata class model and wire line metadata formats.

Chosen option: Serialization and class model are decoupled, but the
class model provides conversion helper methods.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-03-18 10:57:27 +01:00
Lukas Puehringer
f9bf52f8cd Add contributor instructions for auto-formatters
Add cli snippet to run black and isort on the command line and
pointers to editor and pre-commit configuration to
docs/CONTRIBUTORS.rst.

Also add .pre-commit-config.yaml to .gitignore for independent
pre-commit configuration.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-03-17 14:13:43 +01:00
Lukas Puehringer
38ef45f542 Revert "Add basic pre-commit config..."
This reverts commit "Add basic pre-commit configuration for
tuf/api/*" (44aea45fd3) in order to
reduce maintenance burdern:

- pre-commit really is a package manager, thus the packages (git
hooks) pulled in via pre-commit would need to be kept up-to-date
and securely so (sic!).

- pre-commit requires contributors to opt-in via "pre-commit
install" regardless, so we might as well ask contributors to add
and tend to the corresponding configuration file on their own.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-03-17 12:19:57 +01:00
Lukas Puehringer
44aea45fd3 Add basic pre-commit configuration for tuf/api/*
Add optional pre-commit configuration to install and run
auto-formatters when committing new code to tuf/api/*.
Auto-formatters include:
- trailing-whitespace
- end-of-file-fixer
- black
- isort

This commit also adds pre-commit to the dev dependencies
and updates the contributor instructions accordingly.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-03-12 18:41:24 +01:00
Lukas Puehringer
5a626ca4b4 Require black and isort in tuf/api/* via tox
Configure lint build in tox.ini to check if code in tuf/api/* is
formatted according to black and isort style rules:
https://black.readthedocs.io/en/stable/the_black_code_style.html
https://pycqa.github.io/isort/

In addition to our new style guide (#1128) and corresponding linter
configuration, requiring auto-formatting should help to further
reduce reviewing effort. The auto-formatter black was chosen for
the following reasons:
- It seems to be the most popular formatter in the Python ecosystem
- It is well documented including integration instructions with
  most of the tools we use (git, GitHub Actions, pylint, a range of
  editors, pyproject.toml #1161)
- It checks that the reformatted code produces a valid AST that is
  equivalent to the original
- It has almost no ways of customization, which means no
  customization effort required, and more (cross-project) style
  uniformity, lowering contribution barriers
- It converts single to double quotes, where reasonable, which is
  exactly what we recommend
- The style choices it makes seem generally reasonable and don't
 conflict with our style guide, except for favoring hanging over
 aligned indentation, which is the opposite of what we recommend.
 But we are willing to update the adapt our style guide.

Auto-format pre-commit configuration will be added in a subsequent
commit.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-03-12 18:41:13 +01:00
Joshua Lock
76c0a54e75 Prepare v0.17.0 release
Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-02-25 10:49:12 +00:00
Martin Vrachev
9ad55bdd84 Docs: change the editable venv installation order
If you follow the instructions we provide for our contributors in
docs/CONTRIBUTORS.rst your sys.path (used to search for imports)
will put securesystemlib project directory first and tuf directory
second.
This creates a problem with imports from tuf modules because we can
import the wrong file or on relative imports (as currently we
use in the tests when we import utils), the imports cannot be resolved.

If we change the installation order, then tuf directory will be the
first in the import resolution path and those problems will be fixed.

PS: I want to express my gratitude towards Jussi who helped me find
this problem.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-02-02 15:10:42 +02:00
Jussi Kukkonen
9e34c5fd9b MAINTAINERS: Add myself
I'd like to apply for this position, let me know if you need a CV :)

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-01-18 12:30:56 +02:00
Lukas Puehringer
9ec845cbc1 Adopt CI change in TUF docs
Replace mentions of travis/appveyor with GitHub Actions in
governance (contribution) and readme (badges) documents.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-12-17 10:28:38 +01:00
Lukas Puehringer
2385ebe7b0 Add style guide usage instructions to ADR0005
Similar instructions are in the style guide preamble, but we repeat
it here for emphasis.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-12-04 10:50:36 +01:00
Lukas Puehringer
b5252fed65 ADR0005: Decide on python code style guide
Use Google style guide with refinements, because the Google style
guide is a comprehensive, well-established style guide that is
mostly based on PEP-8 and was accepted by everyone on the TUF team.

There is no need to replicate these recommendations. However, we do
provide a very slim document with additional refinements, in order
to emphasize on items the we consider especially important, want to
be handled differently, or in one specific way, where the Google
guide would allow multiple.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
Co-authored-by: Joshua Lock <jlock@vmware.com>
2020-12-04 10:39:24 +01:00
Lukas Puehringer
229e9df630 ADR0004: Justify extent of OOP in metadata model
Add MADR that justifies why we want to add custom classes for
complex tuf metadata attributes.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-11-30 14:59:56 +01:00
Teodora Sechkova
3370005e7d
ADR003: Add pros and cons of the options
Describe pros of developing TUF 1.0.0 in a subdirectory
of the current implementation against the rest of the options.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2020-11-27 12:26:52 +02:00
Teodora Sechkova
1e24977677
ADR003: describe transition to stand-alone TUF
Describe the steps for transitioning from TUF 1.0.0
in a subdirectory to stand-alone TUF 1.0.0

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2020-11-27 12:26:52 +02:00
Teodora Sechkova
3a1ec87d52
ADR0003: where to develop TUF 1.0.0
Document the outcome of #1126 to develop TUF 1.0.0
in a subdirectory of the current TUF implementation.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2020-11-27 12:26:48 +02:00
Joshua Lock
7ff26717a1 Prepare 0.16.0 release
Update docs/CHANGELOG.md and bump version number for a 0.16.0 release

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-11-26 13:15:14 +00:00
Joshua Lock
35177fbe9c ADR0002: document deprecation strategy post 1.0
Per the discussion in #1127 opt to support the old release on a best-effort
basis.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-11-24 15:26:51 +00:00
Lukas Puehringer
d46ebd016e Update Travis CI build badge/docs after migration
Update badge URL in readme after migrating from travis-ci.org to
travis-ci.com, due to brownout on the former.

Migration was performed via Travis Web UI:
https://docs.travis-ci.com/user/migrate/open-source-repository-migration

NOTE: This is a quick fix to speed up Travis builds until we switch
to GitHub Actions (#1195)

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-11-12 10:07:53 +01:00
Lukas Puehringer
ff8819577b Adopt sslib keygen interface encryption changes
secure-systems-lab/securesystemslib#288 changes the key generation
interface functions in such a way that it is clear if a call opens
a blocking prompt, or writes the key unencrypted. To do this two
functions are added per key type:
 - `generate_and_write_*_keypair_with_prompt`
 - `generate_and_write_unencrypted_*_keypair`

The default `generate_and_write_*_keypair` function now only allows
encrypted keys and only using a passed password. This respects the
principle of secure defaults and least surprise.

sslib#288 furthermore adds a protected
`_generate_and_write_*_keypair`, which is not exposed publicly
because it does not encrypt by default, but is more flexible and
thus convenient e.g. to consume all arguments from a key generation
command line tool such as 'repo.py'.

This commit adds the new public functions to the tuf namespace and
adopts their usage accordingly.

NOTE regarding repo.py:
This commit does not fix any problematic password behavior of
'repo.py' like default passwords, etc. (see #881). It only adopts
the sslib#288 changes to maintain the current behvior, plus
removing one glaringly obsolete password prompt.

NOTE regarding key import:
The securesystemslib private key import functions were also changed
to no longer auto-prompt for decryption passwords , TUF, however,
only exposes custom wrappers (see repository_lib) that do
auto-prompt. sslib#288 changes to the prompt texts are nevertheless
propagated to tuf and reflected in this commit.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-11-11 10:27:56 +01:00
Joshua Lock
1b3f580dc9 ADR0001: clarify when/where Python 3.6+ is expected
Provide additional context to clarify where we expect Python 3.6+ to be used
exclusively (new modules) and link to other discussions around the future of
Python 2.7 supporting code.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-27 11:25:42 +00:00
Joshua Lock
71de3f64ef ADR: only use Python 3.6+
Document the decision drop support for EOL Python versions, most notable
Python 2.7

Fixes #1125

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-26 16:26:52 +00:00
Joshua Lock
e3d84391b4 docs/adr: start to keep ADRs in MADR format
In order to make decisions about the code and the design explicit and easier
to reference in future we want to record significant architectural decisions.

This commit introduces docs/adr with a template Architectural Decision Record
and index using the [MADR](https://adr.github.io/madr/) format.

It also adds ADR 0000 to document the decisions to use MADR.

Fixes #1141

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-26 16:26:52 +00:00
Lukas Puehringer
10b9db1e40 Prepare 0.15.0 release (II)
Update docs/CHANGELOG.md to include missing items.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-10-22 15:27:46 +02:00
Joshua Lock
33ac374184 Bump securesystemslib from 0.16.0 to 0.17.0
We just released securesystemslib 0.17.0 and it would be better if tuf did
not pin the prior version.

https://pypi.org/project/securesystemslib/0.17.0/
https://github.com/secure-systems-lab/securesystemslib/releases/tag/v0.17.0

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-21 18:39:25 +01:00
Joshua Lock
8169b00745 Prepare 0.15.0 release
Update docs/CHANGELOG.md and bump version number for a 0.15.0 release

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-21 11:42:21 +01:00
Joshua Lock
f4520317b1
Merge pull request #1163 from joshuagl/joshuagl/nits
Update release process and mark unit tests as executable
2020-10-15 10:38:26 +01:00
Joshua Lock
0db58df8aa Update release docs
* Strongly encourage the reader to use Python 3 for creating release
  artefacts
* Recommend cleaning the tuf directory before creating the release

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-10-05 11:22:08 +01:00
Martin Vrachev
cce6b7bb59 Add doc for the possible cmd args while testing
This information could be useful for newcomers
to better understand how to debug TUF.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2020-10-01 15:20:59 +03:00
Jussi Kukkonen
1e0a2a3103 docs: Mention how to run individual tests
Fixes #1076.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2020-09-15 22:34:12 +03:00
Joshua Lock
3e68b3a07e Prepare 0.14.0 release
Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-09-09 11:11:48 +01:00
Joshua Lock
fcc6841247 More consistent formatting in RELEASE.md
Consistently enclose filenames referred to througout the release process in
backticks to ensure they are rendered in the code style.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-09-09 11:07:25 +01:00