Commit graph

47 commits

Author SHA1 Message Date
Vladimir Diaz
009ddd9f37 Rename top-level role and functions of repository_tool.py. Update documentation and diagram.
add_key() -> add_verification_key()
remove_key() -> remove_verification_key()
release.json -> snapshot.json
Update repository_tool-diagram.png
Update README following the renamed functions and release role changes.
Minor edits, such as removing lint left over from a previous merge conflict.
2014-01-29 11:26:56 -05:00
vladdd
298f52ddb8 Modify format of paths in metadata and minor fixes.
Allow leading os.sep for target and restricted paths listed in metadata.  Previously, '{repository directory}/targets/file.txt' was listed as 'file.txt' and unsuccessfully compared against '/', or the root-most targets directory.  Now, '/file.txt' & '/' and similar examples may be compared and verified.

Fix issue where a hashed bin with empty targets was flagged as invalid because its targets did not produce a path hash prefix that matched any of those listed in the parent role.  Uncovered with _ensure_all_targets_allowed().

Minor edits to code that compared paths and and used path separators.
2014-01-25 16:40:53 -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
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
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
Vladimir Diaz
70afb5d4f3 Add comment to the open() call in tuf.interposition.updater.py
Add link and explain why 'rb' mode is used rather than 'r'.  Prevent newcomers, or future edits, from mistakenly/accidently opening files in text mode.
2013-12-12 10:06:37 -05:00
dachshund
4eeb8575de Fix #139. 2013-11-28 10:59:07 -05:00
JustinCappos
a6ca35622a Update README.md 2013-11-05 19:41:07 -05:00
dachshund
1efc1ee5b9 Remove console logging from the wrong place. 2013-09-09 16:05:51 -04:00
dachshund
02e5fa6206 Log to console when tuf.interposition is imported.
Reduce logging noise.
2013-08-14 13:22:34 -04:00
dachshund
3ec3b8bc05 Return interposition configurations. 2013-08-12 19:18:54 -04:00
dachshund
7936324dff Updaters now clean up after deconfiguration. 2013-08-12 17:29:57 -04:00
dachshund
3d61a05762 Correctly mock some HTTP headers. 2013-08-10 20:07:21 -04:00
dachshund
e76454b4ed Allow deconfiguration of interposition. 2013-07-01 15:59:15 +08:00
dachshund
7a38640964 Log interposition hits and misses. 2013-03-14 21:31:21 -04:00
dachshund
be1a52c159 Better error logging. 2013-03-14 20:42:31 -04:00
dachshund
5236efdbae Revert to previous logger. 2013-03-14 17:13:21 -04:00
Kon
efe2a8518b Added some more tests - work in progress. 2013-03-14 16:48:36 -04:00
dachshund
2828deb6f6 Do not intercept non-GET HTTP requests (#34); needs review. 2013-03-12 23:41:24 -04:00
dachshund
aea13d1d99 Following Seattle coding style. 2013-03-10 03:18:49 -04:00
dachshund
0ef7e04587 Following Seattle coding style. 2013-03-10 03:16:20 -04:00
dachshund
38a38efb5a Fix a bug caused by accidental indentation...
...ironically by trying to follow a coding style.
2013-03-09 17:44:39 -05:00
dachshund
2aea94c009 Follow Seattle coding style. 2013-03-08 21:02:45 -05:00
dachshund
0c072e47f2 Follow Seattle coding style. 2013-03-08 20:46:17 -05:00
dachshund
aab175d6a5 Update documentation about explicit interposition method. 2013-03-08 20:15:39 -05:00
dachshund
53a573648c More explicit method of interposing as the urllib modules; fixes issue #28. 2013-03-08 20:09:17 -05:00
dachshund
a1bfde4893 Follow Seattle coding style. 2013-03-08 18:29:20 -05:00
dachshund
3c70103174 Better modularization of Updater. 2013-03-07 17:53:48 -05:00
dachshund
2d0062f9e1 Modularization of configuration parser. 2013-03-06 23:19:18 -05:00
dachshund
56e30797cc Some documentation edits. 2013-03-06 21:39:09 -05:00
dachshund
e67f45a3a7 Describe SSL certificate verification. 2013-03-06 21:24:59 -05:00
dachshund
8ab6cf3c51 Better formatting. 2013-03-06 21:13:07 -05:00
dachshund
9ed32a1982 Discuss matching and transforming URL paths with regular expressions. 2013-03-06 21:08:08 -05:00
dachshund
c7255d1365 Applications. 2013-03-06 13:56:31 -05:00
dachshund
71acd670d1 A description of basic configuration of interposition. 2013-03-06 13:48:22 -05:00
dachshund
31b97634b4 Allow users to require SSL certificate verification during interposition. 2013-03-04 19:54:41 -05:00
dachshund
d03dd0f2ec Copy SSL certificate verification from pip. 2013-03-04 18:01:15 -05:00
dachshund
1cd22baab5 Import a (missed) class. 2013-03-04 13:05:34 -05:00
dachshund
033a573819 Paranoid checks of configurations in order to prevent interposition cycles. 2013-03-04 13:01:52 -05:00
dachshund
8281d3b9dc Double check network location during updates. 2013-03-04 10:51:36 -05:00
dachshund
c7bb17a035 Import a (missed) module. 2013-03-04 09:40:47 -05:00
dachshund
e5ba4385fd Documentation stub. 2013-03-04 01:42:15 -05:00
dachshund
7471d634c4 Example of a configuration JSON object. 2013-03-04 01:26:06 -05:00
dachshund
88c7ff2892 Add README. 2013-03-04 01:21:47 -05:00
dachshund
c034d33a2e Avoid interposition cycles with a simple restriction. 2013-03-04 01:04:25 -05:00
dachshund
7af60c51bb Add a better error message. 2013-03-04 00:56:50 -05:00
dachshund
b1cf9538ec Better modules for interposition. 2013-03-04 00:43:02 -05:00