mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-08-17 21:25:53 +02:00
Initially, this PR was intended to more clearly separate code between Krill “business logic” – now bundled in a KrillManager –, and the HTTP server code that serves the API. The former now lives in the server module, the latter in the daemon module together with all the code to spin up a Krill daemon driving the HTTP server. However, along the way it turned into a complete redesign of how the HTTP server code works. Request handling has been split into three stages that forces implementers to check for permissions (or actively choose to not check), and read the body (or check that there isn’t one). Dispatching of the request has been restructured which should make it easier to follow what goes on where. This PR increases the minimum Rust version to 1.81.
1.8 KiB
1.8 KiB
- command details history output has changed. Check and document.
- Krill internally always stores ROA payload with an explicit max length. Enforce this through a special type. (Make sure to be lenient when deserializing, though.)
- Move object name creation to daemon::ca.
BgpAnalysisEntrycontains a clonedConfiguredRoa. Maybe it can contain a ref or a cow? Also, this should probably be switched into an enum to avoidconfigured_roa? andannouncement` to panic.- Fix
impl Hash for crate::commons::api::admin::RepositoryContact. (This will require a few changes incrate::deamon::ca.) commons::api::ca::ParentStatuses::sync_candidatescan re-use the vec passed in and doesn’t need to allocate.- Redesign
commons::api::roa::TypedPrefixandAsNumber. commons::api::rrdpuses a lot of on-the-fly hashing.commons::api::rrdp::RrdpFileRandomshouldn’t wrap a `String``.- Re-factor commons::error::Error and KrillResult.
- Change the store to use an FnOnce in execute so we don’t need to clone commands.
- Store no-op commands for auditing reasons.
- Remove event listeners.
- Shift httpclient to a stored reqwest::Client.
- Applying events can panic if events are inconsistent. Given that we are working on stored data which can be manipulated outside of our control, we should probably deal with that more gracefully.
- Split a TA Manager off the CA Manager.
- Use Cows in API structs to avoid cloning on the server side. This will also allow removing quite a few temporary vecs and replace them with iterators.
- /metrics and /stats are completely open. That sounds a bit dangerous.
- Change HTTP responses so we can stream a file, then change the /rrdp endpoint to stream the file.
Notes
- I think we should apply API calls that create multiple commands atomically.
Tests
- Check the cache headers on RRDP responses.