Files
NLnetLabs-krill/TODO.md
Martin HoffmannandGitHub 35cd5d0bb2 Redesign the HTTP service. (#1264)
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.
2025-04-14 11:17:08 +02:00

1.8 KiB
Raw Permalink Blame History

  • 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.
  • BgpAnalysisEntry contains a cloned ConfiguredRoa. Maybe it can contain a ref or a cow? Also, this should probably be switched into an enum to avoid configured_roa? and announcement` to panic.
  • Fix impl Hash for crate::commons::api::admin::RepositoryContact. (This will require a few changes in crate::deamon::ca.)
  • commons::api::ca::ParentStatuses::sync_candidates can re-use the vec passed in and doesnt need to allocate.
  • Redesign commons::api::roa::TypedPrefix and AsNumber.
  • commons::api::rrdp uses a lot of on-the-fly hashing.
  • commons::api::rrdp::RrdpFileRandom shouldnt wrap a `String``.
  • Re-factor commons::error::Error and KrillResult.
  • Change the store to use an FnOnce in execute so we dont 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.