Commit Graph
303 Commits
Author SHA1 Message Date
Martin Hoffmann 7e44ba41e2 Remove listeners from event sourcing. 2025-12-08 19:08:20 +01:00
Martin HoffmannandGitHub dd5c7dcb1d Bring back the built-in RISwhois tree for BGP analysis. (#1329)
This PR brings back the built-in tree of downloaded RISwhois data rather
than using the Roto API. It does so using a memory-optimized tree
implementation and has a much smaller memory footprint than the previous
iteration. At the time of writing, the a full RISwhois dataset requires 55
megabytes of memory.

This PR also reverts the changes to the configuration. It removes the
bgp_api_enabled, bgp_api_uri, and bgp_api_cache_duration fields and adds
bgp_riswhois_enabled, bgp_riswhois_v4_uri, bgp_riswhois_v6_uri, and
bgp_riswhois_refresh_duration fields, all of which are optional.

Because of these config changes, the PR is a breaking change.
2025-11-17 17:54:27 +01:00
Koen van HoveandGitHub d174f2d7b4 Make TA messaging clearer (#1305)
This PR updates the message presented when the TA proxy creates an
empty TA signer request to better explain the reasons.
2025-07-31 15:03:16 +02:00
Martin HoffmannandGitHub 2210e6f84e Code improvements suggested by Clippy 1.88. (#1303) 2025-06-30 14:24:45 +02:00
Koen van HoveandGitHub 67cb544ab0 Add test to migrate from previous version (#1287)
This test will try to run Krill with old data, to ensure structs that were
used still work and do not crash Krill.
2025-06-12 16:13:58 +02:00
6e96db1352 Improve feedback given by krillta proxy signer show-request. (#1283)
This changes the feedback provided by krillta proxy signer show-request to
include information about certificate expiration and renewal time.

---------

Co-authored-by: Koen van Hove <koen@nlnetlabs.nl>
2025-06-10 14:09:31 +02:00
Koen van HoveandGitHub 4c32c73680 Add caching to BGP analyser (#1266)
This PR adds caching of responses received from the BGP API. The caching
duration can be set via the new config variable `bgp_api_cache_seconds`
which defaults to 1800, i.e., 30 minutes.
2025-06-05 15:29:11 +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
Koen van HoveandGitHub f2f94a251b Allow for the reissuance of TA certificates (including HSM support) (#1255)
This PR adds a new command to the TA signer that allows re-initializing it
with new settings.
2025-03-28 14:33:40 +01: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 fc104247ae Restructure authentication policies. (#1232)
This PR restructures how authentication policies are used in Krill. It
removes the use of Oso and its policy definition language and instead
switches to simple, straightforward mappings between permissions, roles,
and users.

The existing concept of roles is augmented to serve as the central
configuration option for limiting a user’s access to certain action and
resources. Roles are now user configurable via the new auth_roles
configuration directive. For each role, a set of permissions has to be
provided. Optionally, a list of resource handles (vulgo: CAs) can be given
in which case access is limited to these resources.

The authentication providers now assign one of these roles to each logged
in user.

The OpenID Connect provider now only determines claims for “id,” i.e., the
user name, and the “role.” Since we replaced the previous use of JMES
paths with custom functions with a more stringent model of matching and
substitution, the configuration had to change in a non-compatible way,
anyway, so we cleaned it up a bit and switched from a map to an array for
the claims.

For the config file provider, this was already possible by adding a “role”
attribute. This has now been changed into a “role” field of the user
details. In order to make upgrading seamless, the “role” attribute is
still accepted but a deprecation warning is logged. Since the auth_users
configuration is not used for the OpenID Connect provider any more, the
password_hash and salt fields of the user details are now mandatory.

Custom policies have been removed.

This is a breaking change.
2025-02-05 11:45:49 +01:00
Martin HoffmannandGitHub 5667312637 Clippy-suggested code improvements. (#1247) 2025-01-23 16:06:32 +01:00
Koen van HoveandGitHub 6da2c80d68 Integrate roto-api in Krill replacing RISwhois (#1233)
This PR replaces the downloading and parsing of RISwhois files in Krill
with the roto-api.
2024-12-20 14:28:00 +01:00
Martin HoffmannandGitHub 7b87658192 Clippy-suggested code improvements. (#1240) 2024-12-02 17:14:29 +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
Martin HoffmannandGitHub 3253d3c4b6 Reformat to 78 character lines. (#1218) 2024-06-26 10:28:34 +02:00
Tim Bruijnzeels 04cbfdadea Depend on latest rpki-rs with ASPA v1. 2023-10-23 12:00:46 +02:00
Tim Bruijnzeels ec42abed0a Import delegated ca 1133 (#1136)
* Add mapping to support that parent and child use different rc names.
* Export child (so that we can test importing it).
* Import child.
* Force parent refresh in resource check loop.
2023-10-17 15:31:11 +02:00
Tim Bruijnzeels 87cb814408 Fix delete ca #1103 2023-10-17 15:31:11 +02:00
Tim Bruijnzeels d03022f495 Use kvx based transactional task queue #1090 2023-10-17 15:31:11 +02:00
Tim Bruijnzeels 263d870ca8 Support migrations using non-disk storage #1094
* Use kvx with explicit namespace type.
* Do not depend on a data dir for storage.
* Fix upgrade code.
2023-10-17 15:31:11 +02:00
Tim Bruijnzeels 273b4f11fe Track krill version once (#1074 #1081) 2023-10-17 15:31:11 +02:00
Tim BruijnzeelsandArjen dd037c7e70 Kvx storage 1067 (#1069)
* Depend on kvx 0.6.0
* Update minimum rust version to 1.65 (required by kvx)
---------

Co-authored-by: Arjen <4867268+arjentz@users.noreply.github.com>
2023-10-17 15:31:11 +02:00
Tim Bruijnzeels 91c32186c3 Krill MUST NOT create only a single AFI ASPA #1063 2023-05-22 13:06:22 +02:00
Tim Bruijnzeels 9fb967780c Prevent adding customer AS as provider on ASPA objects (#1058) 2023-05-18 12:59:55 +02:00
Tim Bruijnzeels 9d6bb0075f Updating an existing provider should update AFI limit choice #1055 2023-05-12 13:28:59 +02:00
Tim Bruijnzeels 651a3cd7bc Make ASPA updates idempotent.
* allow users to just use this, rather than create/delete
* needed to deal with potentially existing history where Krill
  instances <0.13.0 ended up with AspaDefinitions with an
  empty providers list.
2023-05-11 15:31:59 +02:00
Tim Bruijnzeels f738dcbb23 Remove AspaDefinition and object when all providers are removed. 2023-05-11 15:31:59 +02:00
Tim Bruijnzeels 0ce0cc9eff Let the server reject new ASPAs without providers. 2023-05-11 15:31:59 +02:00
Tim Bruijnzeels 552ef3f3f9 Clippy with rust 1.69 2023-04-21 15:09:12 +02:00
Ximon EighteenandGitHub b22beb3fa3 Remove Cypress based UI tests (#1035) 2023-04-20 13:28:48 +02:00
2d0814125e Remove published objects duplication (#1023)
* Remove support for migrating pre-0.9.0 versions.
* Keep publisher files in one place only.
* Improve merging new publish elements into staged elements.
* Upgrade pre-0.12.0 RepositoryContent.
* Upgrade v0.12.x RepositoryContent
* Log errors in case of merge conflicts
* No session reset on 0.13 upgrade (#1028)

---------

Co-authored-by: ximon18 <3304436+ximon18@users.noreply.github.com>
2023-04-20 13:23:30 +02:00
Tim BruijnzeelsandGitHub 5379521523 Allow including TA private key pem for CA import. (#1008) 2023-03-07 15:59:04 +01:00
Tim Bruijnzeels 286aee9862 Merge branch 'main' with release 0.12.3 into prep-0.13.0 2023-03-07 10:36:38 +01:00
Tim Bruijnzeels 0769751b3f Delete repository files by URI (#991) 2023-03-06 15:25:21 +01:00
Tim Bruijnzeels d01838b62d Cargo fmt 2023-01-24 16:47:40 +01:00
Tim Bruijnzeels 1c7d63e872 Clippy 1.66.1 fixes 2023-01-24 16:12:42 +01:00
Tim BruijnzeelsandGitHub 01e54ff22f Support offline ta (#985) 2023-01-24 10:30:22 +01:00
Tim Bruijnzeels 94fa92baea Merge branch 'main' into prep-0.13.0 2023-01-18 11:15:26 +01:00
Ximon EighteenandTim Bruijnzeels 6b1afa221a Fix RRDP vulnerability (CVE-2023-0158) (#997) 2023-01-17 15:42:40 +01:00
Tim Bruijnzeels 4fe2c08ad5 Use handle locks in WalStore. (fixes #974) 2023-01-17 15:42:40 +01:00
Tim BruijnzeelsandGitHub 54c92ae124 Delete repository files by URI (#991) 2023-01-09 16:46:37 +01:00
Tim BruijnzeelsandGitHub bf93b6f5a8 Use handle locks in WalStore. (fixes #974) 2022-12-01 15:36:08 +01:00
Tim BruijnzeelsandGitHub 81f9a479a7 Add support for importing CAs (#968) with ROAs (#969) 2022-11-25 12:51:51 +01:00
Tim Bruijnzeels 5dbf62eb01 Improve sync-parent scheduling. 2022-10-19 15:27:18 +02:00
Tim BruijnzeelsandGitHub 1c5c7ed82f Combine RRDP deltas if configured to do so (#693) 2022-10-13 17:05:28 +02:00
Tim BruijnzeelsandGitHub 8b51702c62 Show ROA objects (#864)
* Show ROA objects
* Add functional (regression) test for roa comments
2022-09-19 16:41:56 +02:00
Tim BruijnzeelsandGitHub 7c98a2a74e Include (optional) comment with configured (ROA) authorisations. #863 2022-09-06 17:14:52 +02:00
Tim Bruijnzeels d7e79dd4f1 clippy fixes 2022-08-29 16:51:39 +02:00