Skip to content

Commit

Permalink
Document fast-forward attack recovery
Browse files Browse the repository at this point in the history
Document why deleting the timestamp and snapshot files
is not needed to recover from a fast-forward attack.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
  • Loading branch information
sechkova authored and Jussi Kukkonen committed Jun 22, 2021
1 parent 20e849d commit 85f2219
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tuf/ngclient/_internal/metadata_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ def root_update_finished(self):
if self.root.signed.is_expired(self.reference_time):
raise exceptions.ExpiredMetadataError("New root.json is expired")

# No need to recover from fast-forward attack here since
# timestamp and snapshot are not loaded at this point and
# when loaded later will be verified with the new rotated
# keys.

self._root_update_finished = True
logger.debug("Verified final root.json")

Expand Down

0 comments on commit 85f2219

Please sign in to comment.