mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
In the top-level metadata classes, there are complex attributes such as "meta" in Targets and Snapshot, "key" and "roles" in Root etc. We want to represent those complex attributes with a class to allow easier verification and support for metadata with unrecognized fields. For more context read ADR 0004 and ADR 0008 in the docs/adr folder. As written in the spec "targets" in "targets.json" has defined the "custom" field serving the same purpose as "unrecognized_fields" in the implementation. That's why to conform against the spec and support "custom" and allow "unrecognized_fields" everywhere where it's not sensitive we can define custom as property which actually access data stored in unrecognized_fields. For context read ADR 8 in tuf/docs/adr. Additionally, after adding the TargetFile class, when we create a Targets an object we are now calling from dict twice - one for the main Targets class and one for each of the complex attributes TargetFile.from_dict() and Delegations.from_dict(). Given that the "from_dict" methods have the side effect of destroying the given dictionary, we would need to start using deepcopy() for our tests. Signed-off-by: Martin Vrachev <mvrachev@vmware.com> |
||
|---|---|---|
| .. | ||
| repository_data | ||
| ssl_certs | ||
| .coveragerc | ||
| __init__.py | ||
| aggregate_tests.py | ||
| fast_server_exit.py | ||
| simple_https_server.py | ||
| simple_server.py | ||
| slow_retrieval_server.py | ||
| test_api.py | ||
| test_arbitrary_package_attack.py | ||
| test_developer_tool.py | ||
| test_download.py | ||
| test_endless_data_attack.py | ||
| test_extraneous_dependencies_attack.py | ||
| test_fetcher.py | ||
| test_formats.py | ||
| test_indefinite_freeze_attack.py | ||
| test_key_revocation_integration.py | ||
| test_keydb.py | ||
| test_log.py | ||
| test_mirrors.py | ||
| test_mix_and_match_attack.py | ||
| test_multiple_repositories_integration.py | ||
| test_replay_attack.py | ||
| test_repository_lib.py | ||
| test_repository_tool.py | ||
| test_roledb.py | ||
| test_root_versioning_integration.py | ||
| test_sig.py | ||
| test_slow_retrieval_attack.py | ||
| test_tutorial.py | ||
| test_unittest_toolbox.py | ||
| test_updater.py | ||
| test_updater_root_rotation_integration.py | ||
| test_utils.py | ||
| utils.py | ||