Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load correctly the delegated Targets objects hierarchy #1052

Merged
merged 7 commits into from
Jun 29, 2020

Commits on Jun 24, 2020

  1. Load correctly the delegated Targets objects hierarchy

    Update load_repository() function to load the delegations metadata
    starting from 'targets' and traversing downwards the delegated
    roles in order to load correctly the delegations hierarchy.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    e8d8e84 View commit details
    Browse the repository at this point in the history
  2. Update test_load_repository

    Add a tests case checking if delegated Targets() objects
    are loaded correctly.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    73bff87 View commit details
    Browse the repository at this point in the history
  3. Improve get_delegations_filenames performance and readability

    Remove unnecessary list keeping track of loaded file names and
    rewrite outdated comments.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    da09a22 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2020

  1. Improve delegated roles loading in load_repository()

    Replace the list used for the delegations graph traversal with
    a deque and use a set to store already loaded roles and avoid
    loops in case of cycles in the graph.
    Improve comments and readability.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    f1a6676 View commit details
    Browse the repository at this point in the history
  2. Reference loaded delegated targets objects by top-level targets

    Use the top-level targets object to reference already loaded
    delegated targets instead of storing them in an additional
    dictionary in load_repository().
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    97eff9e View commit details
    Browse the repository at this point in the history
  3. Rename get_*_metadata_filenames functions

    Rename repository_lib.get_metadata_filenames() and
    get_delegations_filenames() to better match their
    functionality and tuf terminology.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    a69208c View commit details
    Browse the repository at this point in the history
  4. Add TOP_LEVEL_ROLES as a global variable

    Add TOP_LEVEL_ROLES as a global variable in roledb.
    
    Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
    sechkova committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    6ae3ea6 View commit details
    Browse the repository at this point in the history