Skip to content

Remove root from snapshot  #933

Closed
Closed

Description

@lukpueh

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:

Activity

  1. trishankatdatadog commented on Oct 14, 2019

    @trishankatdatadog
    Contributor

    Thanks for noting this @lukpueh

  2. ChamanAgrawal commented on Oct 23, 2019

    @ChamanAgrawal

    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!!

  3. lukpueh commented on Oct 24, 2019

    @lukpueh
    MemberAuthor

    Thanks for picking up the issue, @ChamanAgrawal! :)

    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.

  4. added a commit that references this issue on Feb 18, 2020
    8b7b02d
  5. joshuagl commented on Mar 11, 2020

    @joshuagl
    Member

    Root was removed from snapshot in #988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions