Commit graph

3274 commits

Author SHA1 Message Date
Vladimir Diaz
761c83f717 Remove outdated module name from repository_tool.py diagram. 2014-01-24 07:26:57 -05:00
Vladimir Diaz
ffa4bbe4be Update README.md
Initial documentation of delegation to hashed bins and consistent snapshots.
2014-01-23 13:14:08 -05:00
Vladimir Diaz
570640898d Update repository tool diagram and README. 2014-01-23 12:34:59 -05:00
Vladimir Diaz
973d3a23a3 Address Issue #137 and update repository_tool.py.
Add the add_restricted_paths() method.
Rename libtuf.py
Update README.
Update delegate_hashed_bins() docstring.
More testing of hashed bins and consistent snapshots.
Remove old scripts from setup.py.
2014-01-23 12:03:31 -05:00
Santiago Torres
81f235de8a Added the base skeleton for the tuf developer tools file.
This version is not a working one, and breaks on the status() call. Some
dependencies are not met yet
2014-01-22 21:03:23 -05:00
Santiago Torres
eefc7f2054 Merge branch 'repository-tools' of github.com:theupdateframework/tuf into developer-tools 2014-01-22 17:17:35 -05:00
Vladimir Diaz
96f6152fbf Update issue #137.
Modify format of hash bin delegations.
Test implementation.
2014-01-22 12:52:55 -05:00
Santiago Torres
47ab2bef05 Merge branch 'repository-tools' of github.com:theupdateframework/tuf into repository-tools 2014-01-21 17:55:47 -05:00
Vladimir Diaz
5d1906a239 Update issues #151 and #137.
Update docstrings and comments and complete the initial implementation of issue 151.
Adjust logger level for tuf.download._check_downloaded_length().
Initial implementation of issue 137.
2014-01-21 14:42:28 -05:00
Vladimir Diaz
44231f249e Merge pull request #166 from dachshund/consistent-snapshots-specification
Consistent snapshots specification
2014-01-21 04:27:40 -08:00
vladdd
52fdb2ea5f Adjust logger level for compressed and uncompressed metadata. 2014-01-18 20:45:21 -05:00
vladdd
fbd7b147e8 Address Issues #151 and #156.
Adjust logger messages and levels.
Update use of tuf.conf variable so that it can be updated in code.
Update updater.py comments.
2014-01-18 18:37:27 -05:00
Vladimir Diaz
98cb21282e Update README.md
Update the libtuf README following the fix for Issue #167.
Add ed25519 examples and update comments.
2014-01-18 17:10:03 -05:00
vladdd
b2e220f598 Fix Issue #167. 2014-01-18 17:09:32 -05:00
dachshund
a0a51d6f5e Slightly change filename modification. 2014-01-17 15:31:42 -05:00
Vladimir Diaz
a9d90e7ce0 Finish initial implementation of Issue #151 and reading consistent snapshots.
Support multiple hash algorithms, where the generated digests of metadata and
target files is included in metadata (and filenames if 'consistent_snapshots'
is True).  Previously, only a single hash algorithm was supported, and it was
set by default to 'sha256' in code.  Repository maintainers may now choose any,
and/or multiple, hash algorithms from those supported by TUF.  By default,
'sha256' is used when generating digests.

Support the recent change to the TUF specification, where writing consistent
snapshots may include N versions of identical metadata and targets, if N hash
algorithms is used by the repository when generating metadata.

Update code affected by the recent changes to the specification, such as
targets that may include digests in their filename.

Support consistent snapshots of compressed metadata, including repositories
that provide multiple versions of metadata with different digests included
in their filenames.

The repository tools can now load repositories that include consistent snapshots
of metadata and targets, including those with multiple (i.e., multiple digests
prepended to filenames) consistent snapshots of files.

The client code may now read repositories with 'consistent_snapshots': true in
Root metadata, and properly request and update files with digests included.
2014-01-17 11:05:40 -05:00
dachshund
9dbb3a7815 A few clarifications to the spec on consistent snapshots. 2014-01-14 20:11:35 -05:00
Vladimir Diaz
85a120f0b7 Initial implementation of Issue #151.
Initial implementation of writing consistent snapshots

Update Root schema
Support writing metadata in rolename.ext and digest.rolename.ext formats.
Modify libtuf.py methods that walk and extract metadata to recognize the digest.rolename.ext format.
Write root.txt and timestamp.txt if consistent_snapshots is True.
Support automatic version increments of delegated metadata.
2014-01-14 10:01:17 -05:00
Vladimir Diaz
04221d3f0d Address issue #163.
Changed behavior:
Write metadata only if the uncompressed version has not been written, has changed, or if
compressed versions are missing (if requested).  Not only is re-saving unmodified metadata not ideal, it also forces a new version of the release file if compressed metadata is rewritten.  gzip attaches a timestamp to compressed files, which may cause compressed content to generate different digests if independently written.

Update libtuf.py comments.
Minor edit to docstrings of previous commit that addressed interposition issues.
2014-01-13 09:34:21 -05:00
Vladimir Diaz
08f894f741 Update README.md
Fix typos.
2014-01-09 17:29:42 -05:00
Vladimir Diaz
08c8f04fbb Merge branch 'repository-tools' of https://github.com/theupdateframework/tuf into repository-tools 2014-01-09 10:55:34 -05:00
Vladimir Diaz
cd60d6dfb6 Address issue #164.
Backup client and server spec pdfs
Add missing .sh code to tex document
Change code listing formatting
Fix minor issues
2014-01-09 10:55:05 -05:00
Vladimir Diaz
780480a21d Update README.md
Removed the outdated client and server specs linked.
2014-01-09 10:27:40 -05:00
Vladimir Diaz
1e69c9583a Remove linked+outdated client and server specs 2014-01-09 10:26:52 -05:00
Vladimir Diaz
32d4ae0339 Merge branch 'repository-tools' of https://github.com/theupdateframework/tuf into repository-tools 2014-01-09 10:11:02 -05:00
Vladimir Diaz
b73393c214 Resolve issues #149 and #155.
Move 'tuf.client.updater.Updater.refresh()' call in interposition to its updater's __init__().  The refresh() was previously executed on every target request.

Add tuf.interposition.refresh() for integrations that may require a manual refresh of top-level metadata (rare).
2014-01-09 09:48:37 -05:00
dachshund
e645ff69d7 Adjust spec to carefully rename downloaded files. 2014-01-08 16:06:31 -05:00
zanefisher
43eb5633c4 Modify test code following review from Vladimir 2014-01-07 14:20:20 -05:00
dachshund
3cee44ec6f First cut of specification for consistent snapshots. 2014-01-06 19:40:54 -05:00
dachshund
c546616c1a Merge branch 'develop' into consistent-snapshots-specification 2014-01-06 16:34:50 -05:00
dachshund
4e75ead4d4 Merge remote-tracking branch 'upstream/develop' into develop 2014-01-06 16:34:17 -05:00
dachshund
8d90f3ce43 Merge branch 'develop' into consistent-snapshots-specification 2014-01-06 16:32:47 -05:00
Vladimir Diaz
cbf85fb7b8 Update README.md
Give libtuf.py's documentation a title so that it can be referenced in other documents.
2014-01-06 12:58:24 -05:00
Vladimir Diaz
4d92ea644d Update README.md 2014-01-06 12:45:39 -05:00
Vladimir Diaz
0399e5ace8 Update tuf-spec.txt
Update specification following the changed behavior outlined in Issue #158.
2014-01-06 10:34:27 -05:00
dachshund
a6aba55605 WIP on spec. 2014-01-05 18:08:39 -05:00
dachshund
3fa84d7a58 WIP on spec. 2014-01-05 18:07:32 -05:00
Vladimir Diaz
bdef3756ef Update README.md
Update sections affected by Issue #100 changes.
2014-01-05 14:44:30 -05:00
vladdd
c39abf9e6c Update, test, and complete Issue #100 target methods.
Improve targets_of_role(rolename) behavior.  It now updates the minimum metadata needed for 'rolename'.
Ensure all_targets() adds targets in the expected order, where parent role targets come before children.
Minor updates to comments and docstrings.
2014-01-05 14:40:45 -05:00
vladdd
a2db039cf0 Update conf.py header and comments 2014-01-04 15:42:34 -05:00
vladdd
a9b27fc263 Merge branch 'repository-tools' of https://github.com/theupdateframework/tuf into repository-tools 2014-01-04 15:40:11 -05:00
vladdd
b5c640c128 Minor edits to previous commit.
Add docstring documentation for newly-added 'unsafely_update_root_if_necessary' argument.

Update comments.
2014-01-04 15:21:44 -05:00
Vladimir Diaz
5a7c8f3a47 Update README.md
Update documentation following Issue #165 changes.
2014-01-02 13:58:32 -05:00
vladdd
d5ca811eda Update libtuf-diagram.
Update the libtuf.py diagram following Issue #165 changes.
2014-01-02 13:57:52 -05:00
vladdd
f866da7cb8 Address Issues #165, #158, and #147.
Issue 147: Finalize conversion of all written metadata behavior.  This commit ensures that compressed and uncompressed metadata is also written as outlined in the issue.

Issue 158: As requested, updater.refresh() may now unsafely fetch (i.e., unknown file size and hash) Root metadata if valid top-level metadata cannot be downloaded successfully (e.g., top-level keys may have been revoked).  The repository must also sign the new Root file (at least until all clients have updated) with any revoked keys so that clients may successfully update.  After unsafely updating Root, the top-level metadata is updated again as normal (and only once to avoid an infinite loop).  By default, refresh() unsafely updates Root if only invalid top-level metadata can be downloaded, although this behavior may be overriden by the caller if they wish.  Changed default behavior: refresh(self, unsafely_update_root_if_necessary=True)

Issue 165: Delegated roles are no longer added as attributes of a Targets object by libtuf.py (e.g., repository.targets.delegated_role).  The previous bahavior restricted rolenames to Python identifiers (i.e., can only include letters, numbers, the underscore character, and must start with a nonnumeric character).  Now, delegated roles may be referenced as strings (e.g., repository.targets('recently-claimed')) and include characters other than '_'.  In addition, methods have been added to return all the delegated rolesnames of a target (e.g., repository.targets.get_delegated_rolenames()) and the immediate delegated Target objects of a role.  Previous behavior: repository.targets.unclaimed.django.version = 8
Current behavior: repository.targets('unclaimed')('django').version = 8.
2014-01-02 12:18:44 -05:00
Vladimir Diaz
0548eda896 Address Issue #147 in libtuf.py 2013-12-20 16:46:59 -05:00
Vladimir Diaz
2a61a80162 Update modules affected by the vendored ed25519 and update libtuf.py 2013-12-20 16:06:25 -05:00
Vladimir Diaz
4833898d27 Vendor ed25519 and address Issue #122
Fall back to the vendored version of ed25519 if 'pynacl' is not configured or not available.  If available, use pynacl to verify signatures on the client side.
2013-12-20 13:39:18 -05:00
Vladimir Diaz
8a805bdc3f Fix pycrypto_keys.py header block, libtuf.py doc update, and minor formats.py schemas edit 2013-12-20 12:47:27 -05:00
Vladimir Diaz
ba28237e42 Merge branch 'repository-tools' of https://github.com/theupdateframework/tuf into repository-tools 2013-12-19 14:10:25 -05:00