Commit graph

248 commits

Author SHA1 Message Date
vladdd
609bbe084e Update tuf-spec.txt and implement "lazy bin walk"
tuf-spec.txt was updated to include the latest metadata changes, such as version numbers, and the "lazy bin walk" scheme was implemented in updater.py.
2013-08-09 08:29:57 -04:00
vladdd
74120cc507 Update updater.py to also check for compressed versions of targets.txt
Also added a comment to make it obvious that referenced_metadata should always be release for delegated roles.
2013-08-08 12:23:40 -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
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
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
vladdd
1b626d20ac Remove test print statements 2013-08-06 14:36:16 -04:00
vladdd
dd0e9cf2c1 Minor changes following review 2013-08-06 13:42:44 -04:00
vladdd
b5fcaaecdb Update following Trishank's initial code review 2013-08-06 12:38:28 -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
vladdd
0eb0b50022 Update tuf/tests/system_tests modules affected by metadata changes 2013-07-30 14:50:40 -04:00
zanefisher
04d96e62f1 Fixed various tests. 2013-07-30 14:41:27 -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
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
3557d594b6 Revert "Print, and log, messages in command-line utilities." 2013-07-23 15:10:34 -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
dachshund
f22a80808f Comment about Unicode filenames. 2013-07-06 21:19:32 +08:00
dachshund
a106c2ebf0 Comment about Unicode filenames. 2013-07-06 21:17:53 +08:00
dachshund
a3d924c9a1 Abstraction for walking over files in a directory. 2013-07-06 01:33:15 +08:00
dachshund
4910e7a065 Test conservation of delegated targets. 2013-07-03 00:33:26 +08:00
dachshund
6582cce39a Merge branch 'master' into ordered-delegations 2013-07-02 22:22:45 +08:00
dachshund
db8481f989 Test that delegation of targets works in order of appearance of roles. 2013-07-02 22:19:20 +08:00
dachshund
0b8337c01f Conditionally deconfigure TUF interposition for system tests. 2013-07-02 20:26:01 +08:00
dachshund
57bd1df14e Test that delegated targets roles cannot breach delegated paths. 2013-07-01 16:07:43 +08:00
dachshund
f90873572a Deconfigure interposition on test repository cleanup. 2013-07-01 16:07:15 +08:00
dachshund
e76454b4ed Allow deconfiguration of interposition. 2013-07-01 15:59:15 +08:00
dachshund
e74689345e Test that initial update works with target delegations. 2013-07-01 12:44:20 +08:00
dachshund
b40191ba1f Restructing of delegations integration test. 2013-06-30 12:19:44 +08:00
Trishank Karthik Kuppusamy
a6eb575fea Merge pull request #69 from johnward2/master
Fix several naming and scope errors.
2013-06-25 23:05:03 -07:00
johnward2
a0179a5109 Fix several naming and scope errors.
- "quickstart.py:292: No global (EEXIST) found"
 - "basic_client.py:194: No global (option_parser) found"
 - "rsa_key.py:108: No global (EnvelopeError) found"
 - "rsa_key.py:108: No global (KeygenError) found"
 - "util.py:56: No global (temp_dir) found"
2013-06-25 18:44:34 -04:00
dachshund
c138b67828 Ensure that we explore only delegated roles trusted with the desired target. 2013-06-24 18:35:17 +08:00
dachshund
cb1f552703 Neutral refactoring of schema. 2013-06-24 18:09:36 +08:00
dachshund
aa11987b11 First cut at adapting Konstantin's delegations test. 2013-06-24 09:50:58 +08:00
dachshund
42e9dffd24 Patch mock signercli.make_delegation prompts. 2013-06-23 13:08:26 +08:00
dachshund
47abec8cde Find target in order of trust. 2013-06-23 10:36:21 +08:00
dachshund
688b0e21ca WIP on adjusting tuf.client.updater to use list of roles. 2013-06-22 16:23:52 +08:00
dachshund
e00a3549ce Adjust tests.test_signercli to use list of roles. 2013-06-21 12:32:51 +08:00
dachshund
1edd6b611e Ensure uniqueness of names in making delegations. 2013-06-21 00:54:29 +08:00
dachshund
a8380e4768 Export tuf.tests; mock recursive walk in signercli.py. 2013-06-20 21:32:49 +08:00
dachshund
4ab7d12998 Update tuf.formats.TARGET_SCHEMA and adjust tests.test_formats.py. 2013-06-20 20:43:24 +08:00
dachshund
03348f2dbb Introduce name property for tuf.formats.ROLE_SCHEMA. 2013-06-20 19:56:34 +08:00
dachshund
99ae000645 Clarify priority tags. 2013-06-19 01:35:35 +08:00