NLnetLabs / routinator

An RPKI Validator and RTR server written in Rust
https://nlnetlabs.nl/projects/routing/routinator/
BSD 3-Clause "New" or "Revised" License
470 stars 71 forks source link

Ensure that RRDP delta hashes don’t changes between updates. #951

Closed partim closed 7 months ago

partim commented 7 months ago

This PR ensures that the hash of an RRDP delta with a given serial doesn’t change between updates. It stores the list of delta serials and hashes with the RRDP repository state in its archive and checks that hashes for serial numbers present both in the repository state and a new notification are equal. Otherwise falls back to a snapshot update.

This PR implements the draft-ietf-sidrops-rrdp-desynchronization-00. The draft suggests to limit the number of deltas stored. We are not yet doing that. Instead this should be part of limiting the number of deltas taken out of the notification file when parsing in a follow up PR in rpki-rs.

This PR changes the format of the repository state and thus increases its version to 1. Strictly speaking, we never released version 0, but it’s been in main from quite some time, so an increase feels prudent.