Commit graph

367 commits

Author SHA1 Message Date
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
Joshua Lock
96c00f319a Add tag pushing to RELEASE.md
Ensure someone following the release process pushes the tag they create
and include a tag message matching the common form, rather than requiring
somebody following the steps to figure out what to enter into their editor

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 15:11:21 +01:00
Joshua Lock
32ba3bbcad Fix CHANGELOG formatting
For some reason the first level 3 heading 'Added' was not rendering
correctly. The level 2 heading for 'Fixed' should be level 3.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 15:10:03 +01:00
Joshua Lock
2dc4651136 docs/CHANGELOG.md: update for v0.13.0
Categorise changes by type, per the recommendations at keepachangelog.com

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 11:47:47 +01:00
Joshua Lock
0714632edc docs/RELEASE.md: link to guidance on changelogs
https://keepachangelog.com provides good advice on curating a changelog

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 09:49:12 +01:00
Joshua Lock
ea958bc568 Prepare 0.13.0 release
Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 09:31:16 +01:00
Joshua Lock
506ae5552d Document release process steps
Write down the expected steps for a maintainer to follow when making a
release of tuf

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-08-04 09:31:16 +01:00
Trishank Karthik Kuppusamy
6a7c60485c
Delete ADOPTERS.md
Use a single source of truth on the .io website

Signed-off-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>
2020-07-21 12:14:14 -04:00
Jussi Kukkonen
dc78d89f4f Update Tutorial on dependency installation
* Remove reference to deprecated settings
* Mention that the tutorial expects the dependencies and link to
  instructions

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2020-06-23 11:02:31 +03:00
Jussi Kukkonen
179892c1e9 Update Tutorial on cryptographic keys
Lot of changes in 7 lines:
* PyCrypto is no longer an option: remove mention of it
* RSA-PSS wiki page now redirects to a fairly useless stub: replace it
  with the RFC (it's not light reading but better than nothing)
* Mention ECDSA
* Remove mention of json for RSA keys: that does not seem to be true

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2020-06-17 18:01:45 +03:00
Jesús Castro
9badf8a51e
Add python 3 use case
This indication can be found on other documents.

Signed-off-by: Jesús Castro <x51v4n@gmail.com>
2020-06-10 06:30:23 -05:00
Joshua Lock
165cdfb3ee Update MAINTAINERS
Add Joshua's PGP fingerprint

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-05-05 21:30:28 +01:00
Teodora Sechkova
a71b3c2b67
Update TUTORIAL and test_tutorial
Improve the coding style in TUTORIAL in the case
where absolute path to a file is needed to perform file system
access and at the same time is rejected by Targets methods.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2020-04-08 18:58:27 +03:00
Teodora Sechkova
ead737d4b0
Remove get_filepaths_in_directory() from tutorial
Replace the absolute paths returned by get_filepaths_in_directory()
in the tutorial with a hard-coded list of relaive filepaths since
add_target(s) and delegate() methods raise excception on absolute
paths.

Remove an obsolete warning about path pattern's location.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2020-04-08 18:58:26 +03:00
Lukas Puehringer
6f94aa1653 Remove link to outdated client docs in tutorial
Remove link to incomplete and severely outdated
client_setup_and_repository_example.md in client section of
TUTORIAL.md.

Instead we should link (or move the entire client tutorial part) to
tuf/client/README.md, which is more comprehensive and less outdated
than above document (see #808).

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-03-16 10:31:14 +01:00
Joshua Lock
ca953c3335 Update MAINTAINERS
Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-11 14:58:51 +00:00
Joshua Lock
8dfee1a106 Update docs/METADATA.md to reflect recent spec change
The specification was updated in PR #40 to remove root.json from
snapshot.json

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-11 11:35:37 +00:00
Lukas Puehringer
c490a8daee Quickfix critical tutorial typo
In tutorial code snippet fix a call to repository.mark_dirty that
passes a non-existing bin role name raising:
"tuf.exceptions.UnknownRoleError: Role name does not exist: 90-7"

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-03-06 10:47:52 +01:00
Joshua Lock
eaefbd9fda Add securesystemslib[color] to packages installed in the tutorial
colorama is now an optional dependency for securesystemslib, and so isn't
installed by default. However, the repo script uses colorama and doesn't
handle its absence - add securesystemslib[colors] to ensure colorama is
installed.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-02-18 15:05:13 +00:00
Lukas Puehringer
15d1e933a0 Restructure requirements files
* Use suffixed instead of prefixed sub-requirements files to group
  them alphabetically in the file tree.
* Layer requirements files akin to the in-toto project
  (see in-toto/in-toto#294). The hierarchy is:

  - *requirements.in*
    tuf runtime requirements, including optional requirements
    (pynacl and cyrptography)

  - *requirements-pinned.txt*
    pinned tuf runtime requirements, including optional
    and transitive (1 level deep) requirements and their hashes.

    The file is generated semi-automatically using pip-compile
    and a bash script (see document header), based off of
    requirements.in, combining requirements from all supported
    Python versions.

    This file should be auto-updated, by e.g. dependabot, and be used
    for ci/cd tests, to catch issues with new dependencies.

  - *requirements-test.txt*
    additional test runtime requirements

  - *requirements-tox.txt*
    combines requirements.txt, requirements-test.txt and additional
    test tools (for linting and coverage), i.e. everything that is
    needed in each tox environment to run the tests.

  - *requirements-dev.txt*
    lists tox for local development and testing, and also
    requirements-tox.txt and tuf in editable mode to run
    the test suite or individual tests directly.

  - *requirements.txt*
    requirements-pinned.txt with the hashes of the dependencies
    as reported by pip at the time of creating the file.
    NOTE: this is not used for testing or  dev-install because pip
    doesn't allow mixed (with and without hashes) installations.

    This file should also be auto-updated, by e.g. dependabot.

* Removes an obsolete version constraint on coverage

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-02-06 17:35:51 +01:00
Santiago Torres
bea6496dc2
release: 0.12.2
Signed-off-by: Santiago Torres <santiago@archlinux.org>
2020-01-10 15:43:44 -05:00
Domenico Andreoli
feaf88e33b Fix typo in section "Release Verification"
Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
2019-12-20 10:06:44 +01:00
Lukas Puehringer
da26e9adcd doc: Revert accidental space deletion in tutorial
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-12-16 15:16:24 +01:00
Lukas Puehringer
7e8b7e5db1 doc: Explicitly mark roles dirty in tutorial
TUF does not reliably mark roles as dirty whose metadata needs
to be re-generated.

Only roles that have changed are marked as dirty, but sometimes
roles metadata needs to be updated, although the role wasn't
changed directly (see #958).

Furthermore, the tutorial assumes at one point that the reader
leaves and re-enter the interpreter session, being forced to reload the
signing keys, roles that later need to be re-written, are marked as
dirty. If the reader does not leave the interpreter, the roles are
not marked as dirty (see #964).

To not confuse the reader with flawed state-keeping, and to never
write an inconsistent repository to disk, the tutorial lets the
reader explicitly mark all roles that need to be re-written as
"dirty".

This can be changed once above issues are fixed.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-12-16 15:16:24 +01:00
Lukas Puehringer
fc23496e38 doc: Update "Delegate to Hashed Bins" in tutorial
Explain and show output of delegate_hashed_bins() function call in
tutorial snippet.

Also update the subsequent comment for better continuity.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-12-16 15:16:24 +01:00