-
Notifications
You must be signed in to change notification settings - Fork 10
Fix repo update order (Director first) #179
Conversation
|
EDIT: the below is now all resolved The actual content of this PR has to be dug out of PR #171.... It's a movement from just calling |
d4c77d7 to
9ff20fd
Compare
lukpueh
left a comment
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.
The function name refactor and explicit update order looks good to me.
Just to make sure, changing the order in the metadata is only to not confuse the human reader, right? At least that's what the code and the PR description suggest. I am just asking, because the commit message in 6d91773ec08ce1e3ef3b73650902ebb9b9018356 reads differently, i.e. that it does make a difference to the update order.
Also, could it be that you missed tests/test_data/pinned.json?
My first take (when the commit message went in) was that the order was relevant, but it is not, so the change persists in order to prevent confusion, yes. I'll edit the commit history to remove the old comment.
Looks like. :) Fixing. |
9ff20fd to
c4ac50d
Compare
The director should be updated first, so this might be helpful to readers. Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
and also make the primary and secondary top-level metadata refresh procedure identical (for future modularization). This includes a rename in primary.py of refresh_toplevel_metadata_from_repositories to just refresh_toplevel_metadata, which is the same name the function has in secondary.py. While both names are accurate in a sense, the former could be misleading in secondary.py. Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
c4ac50d to
18c23b5
Compare
For both Uptane Standard conformance (Uptane Standard 5.4.4.2) and the resolution to the
Timeserver fast-forward attack (discussed in #173), it is important for clients to
update Director Repository metadata before Image Repository metadata.
This PR:
secondary.pyandprimary.py.pinned.json) in order to avoid any suggestion that the Director repository is updated after the Image Repositoryprimary.pyandsecondary.pytop-level metadata refreshprocedure identical, for future modularization. This includes a rename in primary.py of refresh_toplevel_metadata_from_repositories to just refresh_toplevel_metadata, which is the same name the function has in secondary.py. While both names are accurate in a sense, the former could be misleading in secondary.py.