Commit graph

519 commits

Author SHA1 Message Date
Martin Vrachev
28b6917739 Root and Targets key API changes
Here is the list of all breaking API changes:
1) The "role" and "key" arguments in "Root.add_key()" are in reverse
order - "key" becomes first and "role" second.
2) "Root.remove_key()" has been renamed to "Root.revoke_key()".
3) The "role" and "keyid" arguments in "Root.revoke_key()" are in
reverse order - "keyid" becomes first and "role" second.
4) The "role" and "key" arguments in "Targets.add_key()" are in reverse
order - "key" becomes first and "role" second.
5) "Targets.remove_key()" has been renamed to "Targets.revoke_key()".
6) The "role" and "keyid" arguments in "Targets.revoke_key()" are in
reverse order - "keyid" becomes first and "role" second.
7) In both methods "Targets.add_key()" and "Targets.revoke_key()" the
"role" argument becomes an optional with a default value of None.

Those changes are made in an effort to make those methods logical
for both cases when standard roles and succinct_roles are used.
The "Root" API change was done in order to preserve naming and argument
order consistency with "Targets" API.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-06-17 13:33:01 +03:00
Jussi Kukkonen
95bbc2506d docs: Rename blog post
Jekyll apparently considers posts without a date as drafts: rename the
latest post.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-06-15 13:43:09 +03:00
Jussi Kukkonen
251a22aaa0
Merge pull request #1941 from ivanayov/tricky_test_case_blog_post
Add tricky test case blog post
2022-06-15 11:43:22 +03:00
Ivana Atanasova
bd6dedfd94 Add tricky test case blog post
This blog post explains details around the use of respository
simulator, `--dump` option and test cases with expired metadata

Fixes #1885

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-06-01 12:42:49 +03:00
Abhisman Sarkar
4a2fdabc2d Fixes #1916
The class docstring for FetcherInterface needed to clearly state that
only _fetch() had to be implemented in it's implementation. This is
because the public API of the interface is implemented already.

Signed-off-by: Abhisman Sarkar <abhisman.sarkar@gmail.com>
2022-05-17 09:40:16 +05:30
Jussi Kukkonen
ac96114309 blog: Update post date, update sloccount
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-05-04 09:53:46 +03:00
Jussi Kukkonen
7b593f3fdb docs: Add doc links to ngclient blog post
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-05-04 09:50:56 +03:00
Jussi Kukkonen
2d52473dd3 docs: Add a blog post about ngclient design
Try to explain some decisions made in ngclient.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-05-04 09:50:56 +03:00
Jussi Kukkonen
8941748edb python-tuf 1.1.0
* Update Changelog
* bump version

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-04-27 16:03:07 +03:00
Jussi Kukkonen
7e5b9b5580
Merge pull request #1979 from lukpueh/verify_release-sign
Add option to sign release artifacts with verify_release
2022-04-27 14:32:07 +03:00
Lukas Pühringer
a3d5a37e43 build: minor style/wording fixes in verify_release
Co-authored-by: Joshua Lock <jlock@vmware.com>
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-04-27 13:09:48 +02:00
Lukas Puehringer
8167889944 doc: describe signatures creation in RELEASE.md
Mention how to use verify_release with the recently added --sign
option to create signatures for a verified release.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-04-27 12:47:21 +02:00
Lukas Puehringer
13e64bcd8a Adopt recent ci/cd changes in release docs
Since #1971 ci and cd workflows run independently of each other,
each of them also calling the test workflow.

This patch updates RELEASE.md to match the new setup.

It also fixes a (twice) broken link.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-04-26 11:47:40 +02:00
Lukas Puehringer
674eb9d096 doc: describe repo setup in RELEASE.md + typos fix
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-04-20 16:02:18 +02:00
Lukas Puehringer
37cb272a43 doc: describe auto release workflow in RELEASE.md
Change RELEASE.md to include instructions to trigger and review
auto release workflow (CI/CD).

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-04-07 12:16:00 +02:00
Jussi Kukkonen
53bacdf7e3 build: Add verify-release script
verify-release
* Builds a release from current commit
* Notifies if git describe does not match built version
* Notifies if built version is not the latest GitHub or PyPI version
* Asserts that the GitHub and PyPI release artifacts match the built
  release artifacts

This should be useful after release as any developer (or a CI job) can
easily verify that the release matches the sources in git.

Note that the last checks currently fail as the 1.0 build was not
reproducible. They should succeed after next release.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-03-22 14:47:17 +02:00
Jussi Kukkonen
bf511ec0c6 docs: Update release docs
* version number is single sourced now
* Mention that using pip against test.pypi.org is unsafe
* Fix some filenames in the examples

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-03-03 16:04:08 +02:00
Jussi Kukkonen
45e8898d4a docs: Clean up blog header
Minima theme by default adds all files in blog root (docs/) as links in
the header. This looks ridiculous in our case: let's just have a link to
blog front page.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-28 12:01:06 +02:00
Jussi Kukkonen
5ee575ef33 docs: Add a new 200px icon
Also rename the existing icon so differences are obvious.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-25 10:54:08 +02:00
Jussi Kukkonen
e78ffc18f9 docs: Add a blog post
This is https://ssl.engineering.nyu.edu/blog/2022-02-21-tuf-1_0_0
only slightly modified (the logo would break the excerpts in the index
page so I moved it a bit).

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-24 16:12:34 +02:00
Jussi Kukkonen
92c7721d02 docs: Add blog configuration
Add config for GitHub Pages so that we can use it as a project blog.
* _config.yml is jekyll configuration
* index.md contains description and title for the blog main page.
* Any files matching "_posts/YYYY-MM-DD-TITLE.md" are considered posts

The Github Pages configuration only allows "/" or "/docs/" as the Jekyll
root directory: The clutter in docs/ is annoying but otherwise this is a
very easy setup.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-24 16:07:18 +02:00
Jussi Kukkonen
46f5bb7470 python-tuf version 1.0.0 \o/
* Update Changelog
* Update version numbers

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-18 15:24:33 +02:00
Lukas Puehringer
b678de8c8b doc: reword announcement about upcoming 1.0.0
Change docs in preparation of close v1.0.0 release.

- Remove important notice about upcoming 1.0.0 release from README
- Reword 1.0.0-ANNOUNCEMENT.md to not sound outdated after release

Co-authored-by: Joshua Lock <jlock@vmware.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-18 15:23:37 +02:00
Lukas Puehringer
5845c8992c doc: update acknowledgements and rm AUHTORS.txt
Update README.md#Acknowledgements
- Reword to acknowledge maintainer contributions as well
- Remove names that are mentioned in maintainers document
- Remove duplicate Konstantin Andrianov
  Santiago Torres-Arias, Sebastien Awwad, Trishank Kuppusamy,
  Vladimir Diaz)
- Add new significant contributors
  (Ivana Atanasova, Kairo de Araujo, Martin Vrachev)

Remove unmaintained AUTHORS.txt, which lists many individuals and
organisations that are/were not affiliated with 'python-tuf', but
other projects in the TUF ecosystem (Thandy, Notary, etc.) and
thus is not suited for this repository.
-> theupdateframework.io#38

Caveats:
- Significant contributors means  top ~20 committers sorted by
  commit count (`git shortlog -s`).
- The Acknowledgements section might miss significant contributors,
  if they contributed by other means than git commits in this repo.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-16 11:01:18 +01:00
Lukas Puehringer
7a13933af6 doc: remove note about unstable API in RTD docs
The API is no longer unstable.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-15 13:46:19 +01:00
Jussi Kukkonen
899b762119
Merge pull request #1853 from lukpueh/update-install-docs
doc: update installation documentation
2022-02-14 14:10:37 +02:00
Lukas Puehringer
16e6f739a5 doc: add emeritus section to maintainers file
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-11 09:49:33 +01:00
Lukas Puehringer
b94ef08b30 doc: Remove inactive maintainers from MAINTAINERS
As discussed in detail in #1793, maintainer-level (GitHub)
permissions should be granted to those who need them, i.e. who
actively maintain the project at the moment.
The MAINTAINERS.txt file should reflect that state.

It will be reviewed regularly (#1803), and can be changed (e.g.
reverted to a prior state) at any time as need arises.

To express our appreciation for past efforts, we might use the
Acknowledgement section of the README, and also update it
regularly.

In the case of this update: Big kudos to @awwad, @SantiagoTorres
and @sechkova for all their valuable contributions to python-tuf!

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-10 13:11:21 +01:00
Lukas Puehringer
cd70e47d14 doc: cross-doc absolute link hack
This is an ugly hack to also resolve the link when the document is
rendered in GitHub, where it is likely to be browsed, because it is
the community standard location for a GitHub repo's contributing
docs.

Coordinate with #1849 to better separate RTD docs with GitHub docs
in the future.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-10 10:10:20 +01:00
Lukas Puehringer
02167403f2 doc: move verify section in install docs
Move release signature verification instructions to bottom of
install docs. The doc is short, so the section is still prominent
enough for promoting verification, but does not break the reading
flow as much anymore.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-10 10:07:13 +01:00
Jussi Kukkonen
99059a5661
Merge pull request #1848 from lukpueh/rm-docs-images
doc: remove obsolete docs/images dir
2022-02-10 10:20:15 +02:00
Lukas Puehringer
c40bb3092b doc: fix link to tox docs
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 17:56:35 +01:00
Lukas Puehringer
0b2b1bbe0e doc: minor title changes for rtd navbar
Make contributing document header sentence case for consistency
with other docs and shorten menu name in side navbar to stand out
less.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 17:56:35 +01:00
Lukas Puehringer
43439316b8 doc: update install section in contributing doc
Replace custom installation section in contribution docs with
pointer to updated installation documentation.

Also configure sphinx autosectionlabel for cross-document refs.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 17:56:35 +01:00
Lukas Puehringer
5ec4c95538 doc: update installation documentation
Update severely outdated installation documentation.

- Simplify "Simple Installation" section
- Update "Release Verification" section to actually verify a tuf
  release and with a key of an active maintainer
- Update and simplify section about non-python dependencies
  (just point to installation instructions for underlying crypto
  backends, they are up-to-date and have become a lot easier)
- Add "Development installation" section

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 17:55:23 +01:00
Lukas Puehringer
4d1fad233a doc: rename contribution instructions
Rename CONTRIBUTORS.rst -> CONTRIBUTING.rst. The new name is what
GitHub expects and will make the document more discoverable, e.g.
on https://github.com/theupdateframework/python-tuf/contribute.

More details under:
https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors

Note: I searched all repositories in theupdateframework GitHub
organization for references (there were none) and will update the
links in the CII Best Practice badge app for tuf.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 15:08:45 +01:00
Lukas Puehringer
365f17bc28 doc: remove obsolete docs/images dir
Remove obsolete docs/images directory which contains unused
variants of the logo. The canonical location of TUF logos is
theupdateframework/artwork, which has high-resolution formats (png
and svg) for all variants of the logo.

Also see https://github.com/theupdateframework/artwork/pull/3.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-09 14:25:55 +01:00
Lukas Puehringer
cf9af047a5 doc: render tuf logo and favicon on rtd
Configure docs to display
- tuf icon as favicon
- tuf horizontal logo (white) in navbar

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-07 12:47:44 +01:00
lukpueh
31fd8d4f03
Merge pull request #1790 from lukpueh/rm-all
Rm all legacy
2022-02-04 14:01:53 +01:00
Lukas Puehringer
d498bc01c1 doc: drop documentation for legacy tools
Remove documentation for legacy client, repository/developer tool
and command line tools, which will be removed in subsequent
commits.

See #1797 and #1798 for replacing ATTACKS.md and QUICKSTART.md.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-01-26 14:44:44 +01:00
Kairo de Araujo
c87ff3e874 Fixed broken link on RTD
Fix the RTD link using the absolute link.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2022-01-25 14:01:06 +01:00
Kairo de Araujo
cd61b149d5 fixed links, RST formatting and text
Fixed some links, RST formatting and made some texts more clear
understanding.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2022-01-25 14:01:06 +01:00
Kairo de Araujo
00b773b8d0 docs: contributors enhancements
This commit simplifies the contributor's doc.
It adds the reference to the Secure Systems Lab Development Guidelines,
gives more evidence to the tox usage, shares information about the tests,
linting, and coverage, and creates a session about submitting
the contributions highlighted by the DCO.

Fixes #1709

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2022-01-25 14:01:06 +01:00
Kairo de Araujo
23534790cd docs: add examples to the RTD
This commit adds to the RTD the links references to source code
examples.
The examples are added to TUF ngclient Updater, Metadata and API
reference.
includes a seed for examples/README.md

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2022-01-18 13:14:02 +01:00
Lukas Puehringer
798383f88f doc: remove spec "forwarder" docs
Remove old doc/tuf-spec* documents, which are merely pointers to
the theupdateframework/specification repo (created in late 2017).

They were likely kept in place to avoid 404s of old links, but the
up-to-date TUF specification location should be discoverable enough
to get rid of the pointers.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-01-14 13:10:32 +01:00
lukpueh
059bfda391
Merge pull request #1771 from kairoaraujo/remove_white_trailing_spaces_docs
doc: Remove trailing whitespaces from docs files
2022-01-14 10:14:10 +01:00
lukpueh
4f6e617bc6
Merge pull request #1769 from lukpueh/rm-duplicate-docs
doc: remove duplicate outdated docs
2022-01-14 10:10:41 +01:00
Kairo de Araujo
e6492112d8 doc: Remove trailing whitespaces from docs files
This commit is a simple trailing whitespaces cleanup from the files
inside the docs folder.
The files on docs sub-directories are not part of this commit.
The docs/SECURITY.md will be removed on PR #1769

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2022-01-14 07:40:17 +01:00
Lukas Puehringer
3533d8aa98 doc: remove duplicate outdated docs
These documents are also hosted on our website and in a better
shape too (kudos to @jhdalek55!). There is no need to maintain
outdated duplicates.

This patch removes the documents and updates references as needed.

Note, the full history of these docs can be tracked in the old
archived website repo and in the new one (filenames may vary in
case and extension):
old: https://github.com/theupdateframework/theupdateframework.github.io
new: https://github.com/theupdateframework/theupdateframework.io/tree/master/content

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-01-13 17:02:53 +01:00
Lukas Puehringer
4cc0b9c2f0 Remove deprecated tuf/server client docs
These documents describe TUF server (mostly key management) and
client (mostly targets delegation) operations referring to a long
outdated TUF specification and suggesting the use of long gone
python-tuf tooling.

A deprecation disclaimer was added to the document headers already
in 2014 (see b84225f3e7).

I think it is safe to remove them.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-01-13 16:00:40 +01:00
Joshua Lock
537a0198b4
Merge pull request #1743 from lukpueh/rm-metadata-api-bump_expiration
Metadata API: Remove Signed.bump_expiration() method
2022-01-05 12:08:24 +00:00
Lukas Puehringer
d3ef746f7c doc: fix broken links in 1.0.0-ANNOUNCEMENT.md
The recent move of 1.0.0-ANNOUNCEMENT.md (#1732) broke the
relative links in the document.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-22 12:28:25 +01:00
Lukas Puehringer
b754c37533 doc: display inherited members on RTD
Update sphinx/rtd conf to display inherited members. This is
enabled specifically for the newly added `expires` property,
which has a useful code snippet in the docstring.

We don't display
- them on the tuf.api automodule overview page (avoid duplicates)
- members inherited from the built-in Exception class

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-22 11:40:46 +01:00
Kairo de Araujo
7dc5940827 update CONTRIBUTORS.rst related to tox
The mention of testing using multiple Python versions by default was
removed.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
2021-12-16 10:04:58 +01:00
Lukas Puehringer
97d5395e79 Prepare v0.20.0
This will be the final release of python-tuf that includes the
legacy implementation code. Please see the [*1.0.0
announcement*](1.0.0-ANNOUNCEMENT.md) page for more details about
the next release and the deprecation of the legacy implementation,
including migration instructions.

Co-authored-by: Jussi Kukkonen <jkukkonen@vmware.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-12-15 16:36:50 +02:00
Jussi Kukkonen
89b532db79 Move 1.0.0 announcement to docs
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-12-15 15:54:45 +02:00
Martin Vrachev
22fe1e69e4 Rename old test files by adding old suffix
Rename test files testing the old code by adding an "old" suffix.
This is done, so we can easily exclude them from linting.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-09 16:44:25 +02:00
lukpueh
b2d8572598
Merge pull request #1693 from jku/add-repo-lib-design-adr
ADR: Add New repository library design
2021-12-08 10:28:11 +01:00
Jussi Kukkonen
f6ede42eae Fix issues from review
In addition to multiple smaller review fixes:
* Explain how the proposed library is minimal: more specific
  functionality may be added as we get more experience
* Explain what a concrete Repository implementation must implement
  (details are obviously subject to change but this is what the
  current prototype requires)

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-12-07 14:01:25 +02:00
Martin Vrachev
ed8a06bcb3 Move part of isort options in pyproject.toml
We are using 4 linters: black, isort, pylint and mypy.
It's good if we use one file as a source for truth for all linter
configurations.

I tried multiple ways to use the src_path option,
so we can just call isort without pointing out the target folders, but I was not
successful.
I tried running isort with "isort --settings-path=pyproject.toml"
I got the error:
"Error: arguments passed in without any paths or content."

Additionally, I saw one project with source configuration https://github.com/Pylons/pyramid/blob/master/pyproject.toml,
but they had to give explicit folders too 8061fce297/tox.ini (L26)
and 8061fce297/tox.ini (L66)

It was a similar situation with "check" and "diff".
In the documentation it's said that for both check and diff are not
supported in configuration files.
See:
- https://pycqa.github.io/isort/docs/configuration/options.html#check
- https://pycqa.github.io/isort/docs/configuration/options.html#show-diff

Additionally, in two issues it was confirmed that in integration tests
we should use --check and --diff the way we did until now.

As a result, I moved part of the configuration options for isort inside
pyproject.toml without the actual directories that need to be linted
and "check" and "diff" options.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-01 16:28:15 +02:00
Martin Vrachev
4597761adb Move black configuration in pyproject.toml
We are using 4 linters: black, isort, pylint and mypy.
It's good if we use one file as a source for truth for all linter
configurations.

As a first step move black options in pyproject.toml.
I tried multiple ways to use the include option,
so we can just call black --config=pyproject.toml, but I was not
successful. Then I found this comment https://github.com/psf/black/issues/861#issuecomment-680411125
explaining that the path argument is mandatory.
As a result, I will move all configuration options for black inside
pyproject.toml without the actual directories that need to be linted.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-01 16:28:13 +02:00
Jussi Kukkonen
bcab2e96b0 Include the design doc in repo
* Also add some new diagrams in the design doc
* Fix some issues in ADR

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-12-01 10:32:46 +02:00
Jussi Kukkonen
0a453e2fcc docs: Remove ROADMAP
This file is out of date to the point of being obsolete. An updated
ROADMAP document would be warmly welcome but an out of date roadmap
is worse than nothing.

Fixes #1525

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-11-30 10:22:17 +02:00
Jussi Kukkonen
845f3070d0 ADR: Add New repository library design
Document the decision to build a repository library on top of Metadata
API.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-11-24 10:57:16 +02:00
Joshua Lock
ac0ea24ca9 Remove references to setup.py
We now use a static setup.cfg instead, update __init__.py and
docs/RELEASE.md to point there.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:30:46 +01:00
Joshua Lock
9e113d6135 docs/RELEASE: use build for building dists
This is the PyPA recommend tool for building Python packages:
https://packaging.python.org/guides/distributing-packages-using-setuptools/

Furthermore, direct invocation of setup.py is long ago deprecated:
https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:28:07 +01:00
Jussi Kukkonen
f2f7f9df53 Release 0.19.0
For users of legacy client (tuf/client/) this is purely a security fix
release with no API or functionality changes. For ngclient and Metadata
API, some API changes are included.

All users are advised to upgrade.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-10-19 17:17:49 +03:00
Jussi Kukkonen
a77c0831e7 docs: rename "helpers" to "supporting classes"
Also add a summary to the page -- unfortunately getting a standard
TOC would require creating a rst page for each class.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-23 17:52:55 +03:00
Jussi Kukkonen
424cc3282b docs: Include the Serialization interfaces
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-23 17:52:55 +03:00
Jussi Kukkonen
21ce5e2915 Hide to_dict()/from_dict()
These are helpers for serialization implementers, not useful for
Metadata API users.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-23 17:52:55 +03:00
Jussi Kukkonen
217bd9dbc7 Separate API documentation pages
This makes the individual pages easier to read.

Use some autodoc configuration so we can have less config
in the automodule/autoclass declarations.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-23 17:52:52 +03:00
Jussi Kukkonen
868afda420 docs: Change object attribute doc style
Situation before
* constructor args are not documented
* object attributes are documented
* sphinx cannot show object attribute type annotations
* attribute docs take a lot of vertical space

Now:
* constructor args are documented
* sphinx can show annotated types of constructor args
* class docstring now explains the attributes are the same as
  constructor args (and attributes are not explicitly documented)

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-23 17:51:46 +03:00
Jussi Kukkonen
5714885df9
Merge pull request #1486 from MVrachev/change-adr8
ADR 8: change "Decision outcome"
2021-09-08 13:05:14 +03:00
Joshua Lock
3a87b2bcd1 Prepare v0.18.1
The v0.18.0 release was made with the changes from #1566, resulting in
a release with sources which don't match the git tag. Rectify this with
a brown bag point release.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-09-06 13:55:54 +01:00
Joshua Lock
60925f0c0a Update release docs not to mention Python 2
Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-09-06 13:29:51 +01:00
Jussi Kukkonen
0ec8d3ce86 Release preparations for 0.18
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-09-06 14:37:25 +03:00
Joshua Lock
3dc5594242 Update links to account for repository rename
We have renamed the repository from tuf->python-tuf

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-09-01 11:15:33 +01:00
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
Martin Vrachev
1ba812581b ADR 8: change "Decision outcome"
After a discussion with Jussi, we realized that there are a couple of
places where we don't want to allow unrecognized fields because the
they are sensitive dictionaries and the specification requires an items
of certain types inside them.
The places where we don't want to allow unrecognized fields are
"keys", "roles", "meta", "hashes" or "targets".

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-07-07 15:37:36 +03: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