Commit graph

3274 commits

Author SHA1 Message Date
Santiago Torres
036ac692a6 fixed references to the repository tool in comments. 2014-04-01 14:45:56 -04:00
Santiago Torres
ae3b3a01d6 Removed commented lines and fixed minor comments
Some unused methods were commented for testing, they shouldn't appear in
upstream
2014-04-01 13:49:41 -04:00
Santiago Torres
5495331d81 Updaated the module name in the comments, fixed comment references 2014-04-01 13:40:40 -04:00
Santiago Torres
ff9fdd833b The _check_if_partial_loaded method was renamed
The repository tool now provides a method called
"_metadata_is_partially_loaded" to provide the same functionality, the
return type changed so the flow of this module had to adapt to the new
function:

_check_if_partial_loaded() -> updated the roleinfo data as an effect

_metadata_is_partially_loaded -> returns a boolean and forces us to
update the roleinfo data.
2014-04-01 12:51:33 -04:00
Santiago Torres
c90709263a Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-04-01 12:43:32 -04:00
Vladimir Diaz
ee2ff3e415 Re-add comment about disabling password confirmation in repository_tool.py. 2014-04-01 09:04:14 -04:00
Vladimir Diaz
004909c216 Merge branch 'develop' of https://github.com/theupdateframework/tuf into refactor_test_arbitrary_package_attacks 2014-04-01 08:41:00 -04:00
Vladimir Diaz
b7047f7ea2 Edit comments and minor code cleanup.
Edit test_arbitrary_package_attack.py
2014-04-01 08:33:23 -04:00
Vladimir Diaz
8d1ef5bbfc Merge branch 'add_test_cases_to_test_util' of https://github.com/vladimir-v-diaz/tuf into add_test_cases_to_test_util 2014-04-01 07:42:07 -04:00
Vladimir Diaz
c0181d1217 Merge branch 'develop' of https://github.com/theupdateframework/tuf into add_test_cases_to_test_util 2014-04-01 07:41:15 -04:00
Vladimir Diaz
e0b5412eb0 Merge branch 'develop' of https://github.com/theupdateframework/tuf into develop 2014-04-01 07:35:28 -04:00
Trishank Karthik Kuppusamy
10a2e9098e Merge pull request #193 from vladimir-v-diaz/review_fixes
Fix repository_tool.py issues reported.
2014-03-31 21:06:41 -04:00
vladdd
3d6e0f67f8 Fix repository_tool.py issues reported.
Reported Issues:
1. Fix 'files_directory' variable name typo in comment.  Convert get_filepaths_in_directory() to a static method.

2. add_targets() declares 'absolute_list_of_targets' but only appends files to it.  Get rid of this variable.

3. The roleinfo dict of delegated roles was not fully set by load_repository().  Writing new metadata after it had been tried to access a non-existent 'partial_loaded' dict key.  Non-public function that decided whether a metadata file was partially loaded renamed to _metadata_is_partially_loaded(), and now returns a Boolean.

Minor edits to comments related to the fixes above.
2014-03-31 20:58:11 -04:00
Santiago Torres
0c6918b702 Updated the load project method to include the Targets inherittance
The load_project contained statements that called the previously
included "targets" instance, since we now inherit Targets, we don't
require them, the statements were updated the following way:

self._targets

to a plain:

self
2014-03-31 20:44:53 -04:00
Santiago Torres
cace6820de Added soft wrappers for the add_verification_key method
The add verification key method now prohibits the ability to have more
than one key in the Project role, however, delegations do support
having more.

This is the suggested behavior as of this version, removing these two
wapper functions would prevent to have this limitation but would require
the extension of the write_project_configuration function
2014-03-31 19:10:02 -04:00
Santiago Torres
a6525ee985 Updated the developer tool to inherit the Targets object
The motivation behind this change is code reutilization and quick
updating. Most of the methods called in the old version of the developer
tool immediate to the targets counterpart. The calling convention now
resembles more objective intended without losing any functionality and
with automatic updates from any changes in the repository_tool.

The project object used to have a Targets object contained. This did
make more sense in a conceptual way (a project could have had more roles
than only targets). However, after reviewing the functionality of the
tool, it seems clear that the best way to adopt the changes
automatically is to inherit the targets object.

Soft wrappers are still to be made, we need to override the
add_verification_key method to in order to avoid having more than one
key on the project.
2014-03-31 18:47:56 -04:00
vladdd
55941d7551 Refactor test_arbitrary_package_attack.
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools.  Fix for issue #111.
2014-03-31 18:28:54 -04:00
SantiagoTorres
a34dfb0bb9 Update README-developer-tools.md
Updated part of the documentation, Added a sketch for the delegate method and finished the managing keys section
2014-03-31 18:17:48 -04:00
vladdd
68d3b5c1e1 Move repository data to 'tuf/tests/repository_data' 2014-03-31 17:29:53 -04:00
Santiago Torres
0b72d27599 changed the prefix argument in create project to location_in_repository
This is intended to make the function more user-friendly by having a
more self-explanatory argument name.
2014-03-24 13:41:30 -04:00
Santiago Torres
c3a9d7d025 Added first draft of the developer tools readme 2014-03-24 13:37:48 -04:00
vladdd
dfa19b221e Add missing test cases to test_util.py.
Add missing test cases for the following functions:
get_target_hash()
find_delegated_role()
paths_are_consistent_with_hash_prefixes()
ensure_all_targets_allowed()

Add test condition to test_B6_load_json_string().
2014-03-22 14:47:24 -04:00
vladdd
d28311b8ec Remove obsolete helper functions.
Minor edits to comments.
2014-03-18 20:59:36 -04:00
vladdd
ef9922ebe9 Finish refactor of test_updater.py.
test_updater.py now uses repository_tool.py to update the remote repository as needed, and no longer depends on mocking and repository_setup.py.
2014-03-18 12:59:03 -04:00
Santiago Torres
4f5f2c68b0 Renamed devtools to the appropriate name 2014-03-16 15:36:42 -04:00
Santiago Torres
553d100f8c Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-03-16 15:29:28 -04:00
vladdd
9109589f34 Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop 2014-03-15 14:10:41 -04:00
Vladimir Diaz
eaee52e14e [WIP] Refactor test_updater.py
Continue refactoring the test cases of test_updater.py.
Fix issue where repository_tool.py was not writing new compressed metadata.
Minor edits to TUF modules.
2014-03-13 12:31:36 -04:00
JustinCappos
846fd7c4d1 Update README.md 2014-03-11 16:33:02 -04:00
JustinCappos
57343e51d4 Update README.md 2014-03-11 16:31:57 -04:00
Vladimir Diaz
5e7713a93f [WIP] Refactor test_updater.py and repository_setup.py.
Add generate.py script and pre-generated repository files used by Unit tests (replacing repository_setup.py).
Refactor test_updater.py (10 test cases remaining).
2014-03-11 09:08:53 -04:00
Vladimir Diaz
c356a9469b Merge pull request #186 from vladimir-v-diaz/develop
Address Issues #175, #176, and the installation of TUF.
Reviewed by Trishank.
2014-03-11 08:09:06 -04:00
Vladimir Diaz
4e09fe29f8 Update comments following Trishank's review of the #186 pull request. 2014-03-11 08:07:18 -04:00
Vladimir Diaz
c21801f971 Merge branch 'develop', remote-tracking branch 'origin' into develop 2014-03-11 07:24:37 -04:00
vladdd
c1cdb2e8ff Merge remote-tracking branch 'upstream/develop' into develop 2014-03-08 17:56:57 -05:00
vladdd
845b98fda1 Modify installation setup.
Support the following installation setup:
# Minimal install intended for clients (pure Python, only ed25519 signatures).
pip install tuf

# Optional installation required by the TUF repository tools (RSA keys and rsassa-pss
# signatures, faster ed25519 cryptographic computations, general-purpose cryptography, etc.)
pip install tuf[tools]

Re-implement the fix for issue #167.

Update comments and docstrings related to the fixes above.
2014-03-08 17:56:40 -05:00
Vladimir Diaz
69d9f4e0e7 Update README.md
Fix broken repository tool diagram link.
2014-03-08 13:15:46 -05:00
vladdd
e3f067d673 Add note to requirements file. 2014-03-07 23:44:39 -05:00
vladdd
9249f8639b Address issues #175 and #176. Update installation modules.
Add setuptools' find_packages() to avoid repeated updates to the list of packages.
Add setup() arguments, such as classifiers (Trove classifiers used for project classification and searching), keywords, and extra requirements.
Add pip requirements installation file.
Update supported tuf installation options:
Installing from pip and installing an extras requirement (pip install tuf[fast_ed25519]).
2014-03-07 23:36:32 -05:00
vladdd
2d015797ef Update affected ed25519 modules.
Update modules affected by the changes made to the latest versions of pyca-ed25519 and pyca-pynacl:
Do not use the unsafe key and signature generation functions of pure python ed25519, but do support the signature verification routine.  Developers must use the faster and secure pynacl+libsodium to generate ed25519 keys and signatures.

Temporarily suppress pynacl's import warning error.

Minor edits to comments and code.
2014-03-07 23:21:54 -05:00
vladdd
406f5b0187 Address issues #175 and #176. Update pyca-ed25519.
Update the vendor'd pyca-ed25519 to the latest version: https://github.com/pyca/ed25519
2014-03-07 22:55:53 -05:00
Vladimir Diaz
b05080d365 Merge pull request #185 from vladimir-v-diaz/develop
Remove find-code.sh
Note: We are replacing find-code.sh because git-grep does the same, and more. Also, a development script unrelated to TUF should probably not be included in the source. Developers who may modify the source are likely to have their preferred way of doing things.
2014-03-06 10:21:11 -05:00
Vladimir Diaz
7cb555d2b8 Remove find-code.sh
git-grep:
http://git-scm.com/docs/git-grep
http://travisjeffery.com/b/2012/02/search-a-git-repo-like-a-ninja/
2014-03-06 08:13:51 -05:00
Vladimir Diaz
a479a48c2a Merge pull request #170 from theupdateframework/repository-tools
Thanks given to Trishank, Santiago, Justin, Zane, Monzur, Lai, Dennis, and the appsec students for reviewing & testing the changes made in this pull request.
2014-03-05 20:35:19 -05:00
vladdd
e9da58328b Update repository_tool-diagram.png and comments.
Minor updates to comments of the previous repository_tool.py commit.
Update repository_tool-diagram.png to list disable_console_log_messages().
Rename disable_console_messages().
2014-03-05 19:40:05 -05:00
Vladimir Diaz
d92b78b971 Update tuf-spec.txt
Update section on supported cryptographic signatures.
Add some whitespace to improve readability.
2014-03-05 12:20:44 -05:00
Vladimir Diaz
c1f9c86ad7 Log warning messages when sharing keys.
repository_tool.py methods that add keys to roles should also log a warning if it detects a shared key.
Add a console handler, and a function to disable it, to repository_tool.py.
Update _delete_obsolete_metatadata() docstring and comments in repository_tool.py.
2014-03-05 11:38:23 -05:00
vladdd
b30e43c98b Merge branch 'repository-tools' of https://github.com/theupdateframework/tuf into repository-tools 2014-03-03 14:55:08 -05:00
vladdd
1a17ac9db2 Update repository_tool.py and util.py.
Rename the unused 'json_object' variable in util.py.

Roles are allowed to share verification keys.  Update repository_tool.py so that the targets role can successfully load an already recognized key when loading a repository.  Reported by Santiago.
2014-03-03 14:53:21 -05:00
Vladimir Diaz
416d39bfc8 Update tuf-spec.txt
Address issue #179
Lines 800, 803: (root|timestamp).digest.json -> digest.(root|timestamp).json
2014-02-26 09:33:09 -05:00