This PR implements some of the suggestions made by Clippy 1.87.
Some of the suggestions have been ignored by way of allow attributes.
In particular, we allow the large size of commons::error::Error for now,
but this will need to be fixed in another PR.
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.
This PR renames the daemon module into the server module. This is in
preparation of separating the “business logic” from the actual daemon
driving it (which will then live in a new daemon module).
This PR refactors and reorganizes a lot of code. It attempts to organize
things in a way that allows to keep more things private. Conversely, it
made the fields of many data-only structs pub and removed the creator,
accessor, and unpack methods for those.
The PR deliberately avoid any functional code changes given that due to
its sheer size, it is essentially unreviewable.
This is also why it stopped short of re-organizing the structure of the
actual server, ie., the Krillserver and the daemon::http module which
currently have a rather blurry distinction. A follow-up PR will create a
more clear separation but this requires code changes.
This PR changes how the clients -- krillc, krillta, as well as the
integration tests -- work to better fit the derive model provided by clap.
This results in basically everything in the cli module and all the
integration tests being different now.
The PR slightly changes the options for both krillc and krillta. For krillc,
the --server, --token, --format, and --api options are now before the first
subcommand (since they affect all commands). For krillta, those options are
now after krillta proxy but before the next subcommand, while --format is
now after krillta signer.
This PR also removes client support and integration tests for RTA.
This is a breaking change.
* Use types which were ported into rpki-rs.
* Update dependency to rpki-rs 0.14.3-dev.
* IGNORE old_events test for now, see issue: #819
* Quick fix for compilation using --all-features. See issue #821
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
* Use PriorityQueue with time based Priority.
* Improve session sweep logging (make it less noisy)
* Update config file with new refresh settings - cap jitter at 50% of refresh
* Let api schedule repo sync tasks rather than execute it synchronously.
* Update version and readme for RC7
* Use the highest priority in case a task was already in the queue.
* Use consistent capitalization of Krill in config files.
* Update readme regarding ca-parent sync changes
* Update to Lagosta with updated dependencies
* Update developer documentation with new scheduler behaviour.
* Add hidden api end-point for scheduling suspend all - used in testing.
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
* Remove embedded repository contact option, migrate commands and events.
* Migrate old CA init events. Test upgrade from 0.6.0.
* Migrate embedded in CA history.
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
Done:
* api client introduced
* code can do a list and parse the json response
Todo:
* Token validation on API
* Synchronise directory
* Binary for api client
* Format output for client (text/json/none)
* Cleanup, most notably move http client code into util for re-use.