Commit Graph
82 Commits
Author SHA1 Message Date
Martin HoffmannandGitHub 4a76408530 Code improvements suggested by Clippy 1.87. (#1278)
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.
2025-06-04 14:51:40 +02:00
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
Martin HoffmannandGitHub 9a9598ea67 Rename crate::daemon to crate::server. (#1263)
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).
2025-03-31 12:17:41 +02:00
Martin HoffmannandGitHub 4acdd84ab9 Refactoring and reorganizing. (#1258)
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.
2025-03-21 15:20:36 +01:00
Martin HoffmannandGitHub 6d253c22da Refactor cli to use clap’s derive. (#1228)
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.
2024-08-20 14:05:06 +02:00
Tim Bruijnzeels ae90c4f88c Update dependencies and code to allow using rpki-rs 0.18.0 (#1166)
* Update rpki-rs, backoff, tokio_rustls, and include rustls_pemfile
* Clean up extern crate statements
2023-12-06 09:55:57 +01:00
Tim Bruijnzeels 1d7c424f74 Remove library that is no longer used. 2023-10-17 15:31:11 +02:00
Tim Bruijnzeels c046a95422 Ta timing config #1097 2023-10-17 15:31:11 +02:00
Tim BruijnzeelsandGitHub 1c5c7ed82f Combine RRDP deltas if configured to do so (#693) 2022-10-13 17:05:28 +02:00
Tim BruijnzeelsandGitHub 77facbb320 Remove dependency on bcder (#822) 2022-07-18 17:19:21 +02:00
330da84de5 Migrate 8181 8183 6942 support to rpki rs (#820)
* 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>
2022-05-12 15:24:50 +02:00
ffb7d6ecdd V0.9.5 rc7 prep (#803)
* 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>
2022-03-28 16:01:51 +02:00
61e7fc01e4 Add random jitter to ca publish next update times (#692)
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2021-10-20 10:34:27 +02:00
Tim BruijnzeelsandGitHub 3b139e4a9f Clippy and spelling fixes (#471)
* Fix clippy warnings.
* Fix spelling - as agreed use american spelling in code (like RFCs do as well).
2021-04-15 14:42:32 +02:00
a715c82f7f Remove embedded repo/ca choices (#461)
* 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>
2021-04-01 17:18:28 +02:00
Ximon Eighteen dd7d3f41b2 FIX: Avoid stack overflow triggered by addition of new Actor::auth_error field by flattening out chained async API handler invocation. This avoids deep recursive .or_else() macro expansion of calls that pass the large Request value (of which Actor is part) resulting in stack overflow. This fix also removes the need for the boosted recursion_limit compiler setting. 2020-12-31 15:57:02 +01:00
Ximon Eighteen 472a0e4751 Merge multi-user branch. Uses Lagosta master branch commit a7e73cba which includes multi-user support. 2020-12-07 16:55:40 +01:00
Tim Bruijnzeels b5b0b03d0f Remove lazy_static! (#349) 2020-11-17 17:15:43 +01:00
Tim Bruijnzeels a054f76ba8 Remove derive_more to reduce dependency tree. 2020-11-10 16:11:28 +01:00
Tim Bruijnzeels d10f65535f Update dependency versions. 2020-10-27 14:33:00 +01:00
Tim Bruijnzeels 0318c512cc Remove unused dependency. 2020-10-15 09:12:28 +02:00
Tim Bruijnzeels ef7274bd73 Remove async_trait (#314) 2020-09-07 16:54:57 +02:00
Tim Bruijnzeels 3f07b6dd4f Merge branch 'master' into 0.8.0-RC-dev 2020-09-02 15:40:26 +02:00
Tim Bruijnzeels f89976c747 Raise the type_length_limit for test code as well. (#310) 2020-08-31 13:15:09 +02:00
Tim Bruijnzeels 9b46f5ab60 Use tokio::sync::RwLocks everywhere. Fix the message queue consumption. Use async in traits.. 2020-08-19 17:30:54 +02:00
Tim Bruijnzeels ee5b6d9f08 Use a lazily initialised configuration static for easier access to config. (#268) 2020-07-10 13:08:24 +02:00
Tim Bruijnzeels b4b6c200a1 Analyse ROA vs Announcements (still needs scoping). #233 2020-05-19 17:06:23 +02:00
Tim Bruijnzeels cc8905f5ab Parse RIS Dump files. #232 2020-05-14 15:02:35 +02:00
Tim BruijnzeelsandGitHub f7dcc5b0c0 Show paginated command history (Fixes #112) 2020-04-22 16:12:52 +02:00
Tim Bruijnzeels e755f0ab65 Merge test modules - cleanup. 2020-03-16 14:55:21 -03:00
Tim Bruijnzeels bd5cd74adf Posting new publisher to API (includes enforcing limit on submitted json) (#189) 2020-03-10 15:09:49 +01:00
Tim Bruijnzeels e34d28debb Add SSL support to the hyper server. 2020-03-06 16:47:57 +01:00
Tim Bruijnzeels fdfad1dcd4 Add TLS support to the hyper server. 2020-03-02 09:09:51 +01:00
Tim Bruijnzeels 75d4da9000 Clean up dependencies. 2020-02-25 16:09:55 +01:00
Tim Bruijnzeels 8543cb9639 Remove actix-web dependencies, add hyper. (work in progress) 2020-02-25 15:54:35 +01:00
Tim Bruijnzeels bf9ba749b8 Serve lagosta files in Krill (closes: #204) 2020-02-14 15:54:05 +01:00
Tim Bruijnzeels f52ae43e91 Remove logins and cookies as they are not required by Lagosta. 2019-12-18 11:23:54 +01:00
Tim Bruijnzeels 33e51d1b6b Publish at remote server (#60 - still needs testing), and always do a full sync when publishing (implements: #42, fixes: #116) 2019-11-01 17:08:24 +01:00
Tim Bruijnzeels f08d9a359f Allow remote publishers (#107) and remove publishers (#113). 2019-10-31 14:43:16 +01:00
Alexandre Hamada 9cf10a98f8 Updated KRILL_SERVER_APP 2019-10-21 11:29:24 -03:00
Alexandre Hamada 33e8641485 Adjustments
According https://github.com/NLnetLabs/krill/pull/120

* Move constants to lib.rs

* Removed '&'

* Print server version before "Starting krill using service..." info
2019-10-21 08:10:43 -03:00
Tim Bruijnzeels d8ef1404ba Remove CMS client for publishing a local dir. Closes #103 2019-10-11 17:25:43 +02:00
Tim Bruijnzeels 1d232e2659 Stop using work space. 2019-09-12 21:46:46 -07:00
Tim Bruijnzeels 0bbfebfbb6 Use workspaces in project. 2019-04-11 16:36:33 +02:00
Tim Bruijnzeels f7005d2490 Support listing RFC8181 clients 2019-04-05 15:02:54 +02:00
Tim Bruijnzeels 63a76dc370 Moving publisher API definitions to krill-commons, and use updated module names. 2019-03-13 15:26:36 +01:00
Tim Bruijnzeels a1e7b0c69f Taking out all of the CMS Proxy code. This will be moved into a separate project. Fixes issue: #34 2019-03-12 15:38:10 +01:00
Tim Bruijnzeels 8b4db0bfcb Re-architecting the application to use event sourcing (fixes: #35) 2019-02-15 15:24:50 +01:00
Tim Bruijnzeels 6248f0baf0 Introducing api client (issue #34). Still things to do, see below.
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.
2019-01-23 16:48:14 +01:00
Tim Bruijnzeels 0ffcd18e74 Moving shared API data (between server and client) into its own module. 2019-01-23 16:48:14 +01:00