-
Notifications
You must be signed in to change notification settings - Fork 6
Partial verification secondary #190
base: develop
Are you sure you want to change the base?
Partial verification secondary #190
Conversation
Now metadata distributed to the partial verification secondaries would be in the form of a archive with the structure almost similar to that of the distributed archive for full verification. Here only director repo would be present and it would only have the targets metadata. This is done so that the secondary could obtain, save and expand the metadata recieved from primary in a similar fashion as that of full verification. It would further help in simplifying the partial verification process
Now primary is sending archive for partial verification metadata as well.
Used various tuf low level functions to verify the targets metadata supplied by the director repository. It complies with the latest Uptane standard for design.
Earlier even if no target_info was provided the validated_targets_for_this_ecu would be emptied. Now if new target info is present, then the list validated_targets_for_this_ecu would be updated
Earlier the test data was stores in seperate lists like TEMP_CLIENT_DIRS, vins, ecu_serials and secondary_instances Now all the data corresponding to a particular secondary is stored in a dictionary and all the dictionaries are further stored in a list TEST_INSTANCES
Update the function get_partial_metadata_fname to get_partial_metadata_archive_fname
Earlier the partial metadata supplied by the primary was just director_targets file but now the primary provides a archive with the structure similar to that of full metadata
Modified metadata files to include a possible update for the newly included partial verifying secondary ECU.
…t the update This included fileinfo corresponds to the info of the update that the partial verifying ECU would donwnload as per the new metadata.
The tests for partial verification ECU are carried out in the similar fashion as that of the full verification ECU.
Due to some discrepency in json and der metadata the tests failed while working with der formats
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, @tanishqjasoria! This looks mostly good, judging from #48 and the corresponding parts in the Uptane Standard. I left requests for clarification, where I wasn't sure, and raised a few minor concerns here and there. Note that I did not review any metadata.
Please let me know when you think this is ready for another round of review.
tests/test_secondary.py
Outdated
'partial_verifying': True, | ||
'vin': '000', | ||
'ecu_serial': 'pv_00000', | ||
'instance': None}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: These test instances are often addressed by their index. For the sake of readability, would it make sense to make TEST_INSTANCES
a dictionary (ordered, if necessary), so each instance can be addressed by a descriptive name (if such a name is available)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can keep their name as that of their client_directory?
Earlier all the 6 test instances were stored as list. Now all the test instances are stored as a dictionaries indexed by their client directory names
Purpose of the PR:
Implement and demonstrate the partial verification Secondary.
Addressing the issue #48
Summary of Changes:
Further Requirements:
The Readme files needed to be updated