Commit graph

4926 commits

Author SHA1 Message Date
Jussi Kukkonen
d806b62e03 github: Update github-script to 6.0.0
The big change is runtime update from nodejs 12 to nodejs 16: does not
seem to affect us.

Dependabot got confused so this update is done manually to v6.0.0
release commit:
https://github.com/actions/github-script/releases/tag/v6.0.0

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-16 10:13:41 +02:00
Jussi Kukkonen
7dc057adab
Merge pull request #1865 from lukpueh/update-req-pinned
dep: update pinned requirements
2022-02-14 14:12:26 +02: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
8ec45dc9d4 dep: update pinned requirements
As described in #1249 requirements-pinned.txt is automatically
updated by Dependabot on version updates, but not if transitive
dependencies are added or removed.

This patch removes the no longer required transient dependency six,
following a run of pip-compile for all supported Python versions.

No other dependency changes were detected, nor were there different
dependencies in different Python versions, requiring env markers
in the requirements file.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2022-02-14 12:53:46 +01:00
Jussi Kukkonen
73ce299382
Merge pull request #1861 from MVrachev/metadata-unrecognized-fields 2022-02-14 13:36:40 +02:00
Lukas Pühringer
216c1eba51
Merge pull request #1856 from ivanayov/ngclient_docstrings_imprv
Ngclient docstrings improvement
2022-02-14 12:13:07 +01:00
Lukas Pühringer
66b3b46532
Merge pull request #1863 from theupdateframework/dependabot/pip/charset-normalizer-2.0.12
build(deps): bump charset-normalizer from 2.0.11 to 2.0.12
2022-02-14 11:42:01 +01:00
Martin Vrachev
922c5d28e5 Add support for unrecognized fields in Metadata
The Document formats section (chapter 4) of the
specification says the following:

"All of the formats described below include the ability to add more
attribute-value fields to objects for backward-compatible format
changes. Implementers who encounter undefined attribute-value pairs in
the format must include the data when calculating hashes or verifying
signatures and must preserve the data when re-serializing."

I initially thought it's applicable only to the SIGNED fields as
"undefined attribute-value pairs in the format must include the data
when calculating hashes or verifying signatures"
This doesn't mean that the sentence before that excludes "Metadata" as a
possible place for additional fields.
The other maintainers agreed with me and we are going to add support for
'unrecognized_fields" inside "Metadata".

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-14 12:12:54 +02:00
dependabot[bot]
2f59322cef
build(deps): bump charset-normalizer from 2.0.11 to 2.0.12
Bumps [charset-normalizer](https://github.com/ousret/charset_normalizer) from 2.0.11 to 2.0.12.
- [Release notes](https://github.com/ousret/charset_normalizer/releases)
- [Changelog](https://github.com/Ousret/charset_normalizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ousret/charset_normalizer/compare/2.0.11...2.0.12)

---
updated-dependencies:
- dependency-name: charset-normalizer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 10:08:35 +00:00
Ivana Atanasova
a0d31854bc Fix line lengths in ngclient docstrings
This change shortens line lengths that exceed the requiremets and
adds more clarification on methods where the short message is not
complete enough

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-11 15:33:48 +02:00
Ivana Atanasova
43080e1228 Unify wording of docstrings language in ngclient
This change unifies common wording in the docstrings library of
ngclient, like "Args" vs. "Arguments"

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-11 14:51:51 +02:00
Ivana Atanasova
d399ad5d1b Unify article in ngclient docstrings
This change updates the docstrings library of ngclient with no
article for all Args in order to be unified amongst all python-tuf
docstrings

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-11 14:51:51 +02:00
Ivana Atanasova
d8f60e1baf Unify quoting in ngclient docstrings
This change updates the docstrings library of ngclient with
unified double backtick quoting for better readability

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-11 14:51:28 +02:00
Lukas Pühringer
a347d034a2
Merge pull request #1809 from MVrachev/signatures-tests
Add Metadata.signatures serialization tests
2022-02-11 11:47:59 +01:00
Lukas Pühringer
3b135d71f1
Merge pull request #1855 from lukpueh/update-maintainers-txt
doc: Remove inactive maintainers from MAINTAINERS
2022-02-11 10:58:47 +01: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
Martin Vrachev
17503ebba3 Remove unnecessary copy operations
There is no need to copy "case_dict" inside serialization test
functions in test_metadata_serialization.py when we are testing
invalid arguments.
These dictionaries are not be used after calling "from_dict" and
it doesn't matter if they are empty afterward.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-10 17:30:35 +02:00
Martin Vrachev
cd34793b0a Move nonunique sigs test to serialization tests
Move the duplicating signatures tests from test_metadata_base function
in test_api.py into test_metadata_serialization.py.
This is a more logical place to store this test case as
test_metadata_base is actually focused on testing
Metadata.signed.is_expired.
That also is the reason why I renamed test_metadata_base to
test_metadata_signed_is_expired.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-10 17:30:35 +02:00
Martin Vrachev
d2a840f8e1 Add signatures serialization tests
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-10 17:30:35 +02:00
Martin Vrachev
bf5c6ee533 Update securesystemslib version to 0.22.0
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-10 17:30:35 +02: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 Pühringer
e879773264
Merge pull request #1850 from lukpueh/mv-contributors
doc: rename contribution instructions
2022-02-09 15:26:55 +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 Pühringer
d4dd652582
Merge pull request #1836 from MVrachev/verify-sig-serialization-error
verify_signature(): handle SerializationError
2022-02-08 14:52:35 +01:00
Lukas Pühringer
177976a890
Merge pull request #1840 from MVrachev/from-securesystemslib-key-sslib-error
Key.from_securesystemslib_key() raise ValueError
2022-02-08 12:49:47 +01:00
Lukas Pühringer
39ef75115e
Merge pull request #1839 from jku/requirements-remove-docutils-pinning
build: Remove docs build requirement version pin
2022-02-08 12:48:33 +01:00
Martin Vrachev
8b6566ab3b from_securesystemslib_key() raise ValueError
If a securesystemslib.FormatError is raised inside
Key.from_securesystemslib_key() then reraise ValueError.
This is done so that our users don't have to import securesystemslib
in order to handle the error and because the securesystemslib error
itself is securesystemslib implementation-specific.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-08 13:44:12 +02:00
Jussi Kukkonen
0537f12c6f build: Remove docs build requirement version pin
docutils is a sphinx-rtd-theme requirement: pinning was done
to workaround a bug that seems to now be fixed.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2022-02-08 13:18:27 +02:00
Lukas Pühringer
1e36ec68af
Merge pull request #1838 from MVrachev/verify-delegate-document-exceptions
verify_delegate() document ValueError and TypeError
2022-02-08 12:18:10 +01:00
Jussi Kukkonen
2cc3df57a8
Merge pull request #1834 from theupdateframework/dependabot/pip/pycparser-2.21
build(deps): bump pycparser from 2.20 to 2.21
2022-02-08 13:11:45 +02:00
Martin Vrachev
5f515791df verify_delegate() doc ValueError and TypeError
Add missing documentation for ValueError and TypeError inside
Metadata.verify_delegate().

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-08 13:10:46 +02:00
Jussi Kukkonen
b497180e6c
Merge pull request #1815 from ivanayov/metadata_docstrings_imprv
Improve docstrings language in Metadata API
2022-02-08 12:59:35 +02:00
Lukas Pühringer
f379e94817
Merge pull request #1837 from joshuagl/joshuagl/license
build: add license field to setup.cfg
2022-02-08 11:43:52 +01:00
Ivana Atanasova
9169fcb575 Update repetitive docstrings language in Metadata API
This change updates some obvious and unnecessary fields docs in the
Metadata API with more despriptive details

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-08 12:43:11 +02:00
Ivana Atanasova
acf3df67ff Improve docstrings language in Metadata API - article
This change unifies as mush as the context allows and improves the
use of definite vs. indefinite vs. no article across docs in the
Metadata API. It sticks to no article in most cases for simplisity
and readability, but leaves definite article where it's strictly
necessary

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-08 12:39:33 +02:00
Ivana Atanasova
40aef7ee23 Improve docstrings language in Metadata API - wording
This change unifies wording across docs in the Metadata API, like
Args vs. Arguments and same repetitive descriptions written
differently in different classes/methods

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-08 12:37:23 +02:00
Ivana Atanasova
0feec0c5f5 Improve docstrings language in Metadata API - quotes
This change unifies quotes to double backtick across docs in the
Metadata API in order to provide better visualisation

Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
2022-02-08 12:37:19 +02:00
Joshua Lock
d0846a9967 build: add license field to setup.cfg
List our licenses in the license field of setup.cfg

While the PyPA packaging documentation states that the license field is
optional[1] and that classifiers should be the main way to indicate
license, this field is used to populate the License printed by pip show.

1. https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#license

Fixes #1833

Signed-off-by: Joshua Lock <jlock@vmware.com>
2022-02-08 10:33:54 +00:00
Lukas Pühringer
9cda6e591f
Merge pull request #1796 from jku/accept-two-part-spec-version
Metadata API: Accept X.Y spec_version
2022-02-08 11:29:57 +01:00
Martin Vrachev
2f381aee9a verify_signature(): handle SerializationError
We should handle the possible SerializationError inside
Key.verify_signature(), because the user of this API is not interested
in SerializationError when he is trying to verify his signature.

Note that the SerializationError can be thrown when calling
signed_serializer.serialize() on the metadata signed part.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-08 12:18:55 +02:00
Lukas Pühringer
0b2f98585c
Merge pull request #1820 from MVrachev/constructors-documentation
Add exceptions docs for __init__ and from_dict()
2022-02-08 10:21:18 +01:00
dependabot[bot]
95987254e8
build(deps): bump pycparser from 2.20 to 2.21
Bumps [pycparser](https://github.com/eliben/pycparser) from 2.20 to 2.21.
- [Release notes](https://github.com/eliben/pycparser/releases)
- [Changelog](https://github.com/eliben/pycparser/blob/master/CHANGES)
- [Commits](https://github.com/eliben/pycparser/compare/release_v2.20...release_v2.21)

---
updated-dependencies:
- dependency-name: pycparser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-08 09:14:49 +00:00