You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of issue or feature request: theupdateframework/specification#40 updates the specification to remove the "root.json" entry form the "meta" dictionary in "snapshot.json".
The reference implementation needs to be adopted accordingly and comprehensively, i.e. in code, test data, docs, etc.
Current behavior:
Code, test data, docs (etc.) list root.json in snapshot.json.
Expected behavior:
Update where necessary to reflect the spec's definition of snapshot.json.
Hints:
The commit message in af1a21b has some info about how to re-generate test metadata.
Hi!! I am new to TUF and want to contribute. For this issue, I started looking at the code base and I think, changes are required in SNAPSHOT_SCHEMA.
I was thinking of just filtering the root.json from snapshot.meta the same way as timestamp.json would have been in the existing code. So I started looking for code that generates the metadata files.
I found that snapshot metadata is constructed here and this function returns the complete metadata json(dictionary) corresponding to the given schema using the function build_dict_conforming_to_schema() (here).
But I am stuck here as I am not able to find where the function build_dict_conforming_to_schema() filters the timestamp.json for snapshot.meta
Can anyone please help me with this? Also, if my approach is incorrect, please let me know. Thanks!!
But I am stuck here as I am not able to find where the function build_dict_conforming_to_schema() filters the timestamp.json for snapshot.meta
Not sure I understand the question.
You have already found generate_snapshot_metadata (to me this seems like the harder part). Now you need to find the lines in that function that assemble the dictionary that will go into "meta" and remove the one line that adds the "root.json" entry.
Also, good thinking to change SNAPSHOT_SCHEMA, but if you look at it closer, it is flexible enough to accept a "meta" dictionary with or without "root.json" entry.
Activity
trishankatdatadog commentedon Oct 14, 2019
Thanks for noting this @lukpueh
ChamanAgrawal commentedon Oct 23, 2019
Hi!! I am new to TUF and want to contribute. For this issue, I started looking at the code base and I think, changes are required in SNAPSHOT_SCHEMA.
I was thinking of just filtering the root.json from snapshot.meta the same way as timestamp.json would have been in the existing code. So I started looking for code that generates the metadata files.
I found that snapshot metadata is constructed here and this function returns the complete metadata json(dictionary) corresponding to the given schema using the function
build_dict_conforming_to_schema()(here).But I am stuck here as I am not able to find where the function
build_dict_conforming_to_schema()filters the timestamp.json for snapshot.metaCan anyone please help me with this? Also, if my approach is incorrect, please let me know. Thanks!!
lukpueh commentedon Oct 24, 2019
Thanks for picking up the issue, @ChamanAgrawal! :)
Not sure I understand the question.
You have already found
generate_snapshot_metadata(to me this seems like the harder part). Now you need to find the lines in that function that assemble the dictionary that will go into"meta"and remove the one line that adds the"root.json"entry.Also, good thinking to change
SNAPSHOT_SCHEMA, but if you look at it closer, it is flexible enough to accept a"meta"dictionary with or without"root.json"entry.Remove root from snapshot
joshuagl commentedon Mar 11, 2020
Root was removed from snapshot in #988
fix: include `root.json` in snapshot metadata