Commit graph

3274 commits

Author SHA1 Message Date
dachshund
936b3de106 Merge branch 'master' into path_hash_prefix 2013-08-08 10:51:58 -04:00
dachshund
4f70b37002 Merge branch 'master' into path_hash_prefix 2013-08-08 10:51:58 -04:00
vladdd
4a7c5fe27f Preliminary update preceding the major path_hash_prefix changes
This update addresses issue #86.  It begins by removing the wholesale downloading of all targets metadata and only downloads & verifies the metadata for the roles it only needs; the "lazy walk" scheme.
2013-08-07 19:30:22 -04:00
vladdd
adb5ea003e Preliminary update preceding the major path_hash_prefix changes
This update addresses issue #86.  It begins by removing the wholesale downloading of all targets metadata and only downloads & verifies the metadata for the roles it only needs; the "lazy walk" scheme.
2013-08-07 19:30:22 -04:00
vladdd
5f4b5c9249 Update updater.py to retrieve compressed versions of Targets metadata
This change addresses issue #85.  The previous implementation only recognized compressed versions of "release.txt".
2013-08-07 15:38:16 -04:00
vladdd
1cd9b1251e Update updater.py to retrieve compressed versions of Targets metadata
This change addresses issue #85.  The previous implementation only recognized compressed versions of "release.txt".
2013-08-07 15:38:16 -04:00
vladdd
4d60cf3b71 Add repository & integration example to assist in the path_hash_prefix implementation 2013-08-07 12:31:39 -04:00
vladdd
da025768c3 Remove list.sort() and cleanup try-except blocks in signercli.py
Previously, _make_delegated_metadata() attempted to minimize the number of target directories in the "paths" field
of delegations by calculating common root-most directories.  This bahavior was found to be unsafe and removed, and as a result,
the sort of delegated targets is no longer needed.
2013-08-07 10:45:25 -04:00
vladdd
dd44dba7cc Remove list.sort() and cleanup try-except blocks in signercli.py
Previously, _make_delegated_metadata() attempted to minimize the number of target directories in the "paths" field
of delegations by calculating common root-most directories.  This bahavior was found to be unsafe and removed, and as a result,
the sort of delegated targets is no longer needed.
2013-08-07 10:45:25 -04:00
dachshund
6555f9285b Bugfix. 2013-08-07 05:42:10 -04:00
dachshund
891e0399cc Bugfix. 2013-08-07 05:42:10 -04:00
dachshund
c7fe1cd69f Improved checking of the "paths" and "path_hash_prefix" attributes.
Removed checking whether "path_hash_prefix" is consistent with the
delegated paths in the delegator, because now the delegated paths may
list directories instead of simply files.
2013-08-07 02:42:06 -04:00
dachshund
43db37c2ab Improved checking of the "paths" and "path_hash_prefix" attributes.
Removed checking whether "path_hash_prefix" is consistent with the
delegated paths in the delegator, because now the delegated paths may
list directories instead of simply files.
2013-08-07 02:42:06 -04:00
dachshund
233c942595 Merge branch 'master' into path_hash_prefix 2013-08-07 00:43:54 -04:00
dachshund
3e757eda2b Merge branch 'master' into path_hash_prefix 2013-08-07 00:43:54 -04:00
vladdd
fa88d6e9b6 Remove test print statements 2013-08-06 14:36:16 -04:00
vladdd
1b626d20ac Remove test print statements 2013-08-06 14:36:16 -04:00
dachshund
8edf2fc3f5 Removed an unsafe edge case, but updater unit tests need to be fixed.
Specifically, we do not intentionally set any file metadata to be None
and then download the file unsafely.

Some of the tuf.client.updater unit tests fail because it was previously
possible to unsafely download metadata for any role. We need to fix
this.
2013-08-06 14:31:21 -04:00
vladdd
c2eec3e42f Minor changes following review 2013-08-06 13:42:44 -04:00
vladdd
dd0e9cf2c1 Minor changes following review 2013-08-06 13:42:44 -04:00
dachshund
3c18b58b71 Adapt Zheng Yuyu's changes. 2013-08-06 13:40:24 -04:00
vladdd
b5fcaaecdb Update following Trishank's initial code review 2013-08-06 12:38:28 -04:00
vladdd
ba03f13180 Implement proof-of-concept of minimum chain of trust updates 2013-08-05 08:36:37 -04:00
dachshund
cb3c30e13b Update specification and code to recognize the new 'path_hash_prefix' attribute. 2013-08-05 01:36:38 -04:00
zhengyuyu
0c83799c85 Fix the endless data attack issue
modification of updater.py for download.py

modification of conf.py for fix

modification of test_download.py for download.py

modification of test_updater.py for download.py

add a new test of endless data attack to metadata timestamp.txt

more readable and fix the endless data attack issue.
2013-08-02 16:32:55 -04:00
zanefisher
61e94847af Tests no longer run automatically when imported.
aggregate_tests now loads all the unit tests into one suite and runs them together,
so that any failures and errors show up together in a concise report.
2013-07-31 19:02:06 -04:00
zanefisher
2b8d654ceb Tests no longer run automatically when imported.
aggregate_tests now loads all the unit tests into one suite and runs them together,
so that any failures and errors show up together in a concise report.
2013-07-31 19:02:06 -04:00
ttgump
1f5a1e53ea endless_attack_test_fix 2013-07-31 12:02:37 -04:00
ttgump
c5be2cd69e endless_attack_test_fix 2013-07-31 12:00:36 -04:00
vladdd
0eb0b50022 Update tuf/tests/system_tests modules affected by metadata changes 2013-07-30 14:50:40 -04:00
zanefisher
4fd9975015 Fixed various tests. 2013-07-30 14:41:27 -04:00
zanefisher
04d96e62f1 Fixed various tests. 2013-07-30 14:41:27 -04:00
ttgump
a2a8ba0217 modified update.py 2013-07-30 14:31:28 -04:00
vladdd
ef7a5512d4 Continue design changes to address issues #57, #39, #48
A directory listed under the "paths" field of a parent metadata delegation is understood to mean all
subdirectories and files the delegated role is trusted to update.  The delegated role has the option
of specifying multiple, arbitrary, and explicit file paths & directories.  The previous implementation
allowed explicit file paths in the "paths" field of the parent role metadata.  This commit modified
this behaviour to allow directories (replicating wildcards) to minimize the size of parent metadata.
2013-07-29 15:35:12 -04:00
syrttgump@gmail.com
d245678148 Endless attack test fix 2013-07-26 17:00:40 -04:00
syrttgump@gmail.com
b7dc3fccea Endless attack test fix 2013-07-26 15:46:43 -04:00
vladdd
061370c06f Merge master and resolve conflicts 2013-07-26 14:18:59 -04:00
vladdd
26925ea18f Modify default expiration times set in quickstart.py
Modify the default expirations times for the targets, release, and timestamp roles; 3 months, 1 week, and 1 day, respectively.
2013-07-25 13:09:04 -04:00
vladdd
7bac198fb8 Add comments to test_updater.py and fix bug in signercli.py
Add comments to make it clearer how the self.Repository.refresh() call in test_5_all_targets() successfully returns the metadata for all the roles.  _mock_download_url_to_tempfileobj() is set up to allow mock downloads of the "all_role_paths" files in order.Relative filepaths were incorrectly calculated when
directories were specified as target paths in the --makedelegation command-line option for signercli.py.
2013-07-25 12:43:45 -04:00
zanefisher
13b418a008 Revert "Print, and log, messages in command-line utilities." 2013-07-23 15:10:34 -04:00
zanefisher
3557d594b6 Revert "Print, and log, messages in command-line utilities." 2013-07-23 15:10:34 -04:00
zanefisher
f6ffdaaa68 Merge remote-tracking branch 'origin/master' into log-to-console 2013-07-22 17:28:36 -04:00
zanefisher
c70dbbeeef Merge remote-tracking branch 'origin/master' into log-to-console 2013-07-22 17:28:36 -04:00
zanefisher
29d522eb19 Merge branch 'master', remote-tracking branch 'upstream/master' 2013-07-22 17:22:44 -04:00
zanefisher
fb7ec7c9ab Revert "Remove logging to stdout."
This reverts commit 5c222797d7.
2013-07-22 17:15:30 -04:00
dachshund
6c2251c0bd Merge code from @zhengyuyu which makes a function more readable.
His code splits tuf.download.download_url_to_tempfileobj into two major
pieces. The first piece opens a connection to a URL, and computes
the required and reported lengths for downloading data from that given
URL. The second piece downloads data from the given URL in such a way
that we can defend against endless data and slow retrieval attacks.
2013-07-22 14:23:29 -04:00
zhengyuyu
20551a7989 Splits the real download procedure from the download_url_to_tempfileobj and put it into a new function. this makes the download_url_to_tempfileobj clearer and more modular 2013-07-22 00:20:12 -04:00
dachshund
a559727398 Fast test for breach of delegation. 2013-07-08 09:11:25 +08:00
dachshund
471df8287b Merge branch 'master' of github.com:theupdateframework/tuf 2013-07-06 21:21:59 +08:00
dachshund
0074aebfc7 Comment about Unicode filenames; #61. 2013-07-06 21:21:33 +08:00