Commit Graph
342 Commits
Author SHA1 Message Date
Koen van HoveandGitHub 0ccc5cdff4 Add support for UNIX sockets (#1322)
This PR adds API access via a local Unix socket on Unix systems allowing to
use the username of local user accessing the API as the authentication
username.

Configuration options are provided to map user names to roles similar to the
configfile authentication provider.

This will allow using Krill without authentication tokens if it is only
accessed via krillc on the same machine.

The PR also removes the example configuration files and moves the
documentation included in those files into a krill.conf.5 manual page. By
doing this, it simplifies the creation of the configuation file in the binary
packages. Those are now very minimal and only contain the mandatory config
options.
2026-01-06 14:27:31 +01:00
Koen van HoveandGitHub 206f308b3d Update openidconnect to v4 (#1333) 2025-11-24 12:01:16 +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 986b82e137 Update dependencies (#1317) 2025-08-27 15:37:27 +02:00
Martin Hoffmann 0b5f3d9af7 Bump version. 2025-08-12 13:46:52 +02:00
Martin HoffmannandGitHub c9dedb1610 Release 0.15.0 ‘But I Disgress.’ (#1316)
Breaking Changes

* Refactored command line options processing for all binaries. As a
  result, options for both `krillc` and `krillta` have slightly changed.
  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`. ([#1228])
* Removed support for RTA in `krillc`. Support is currently still
  present in the Krill server, though behind a (non-default) feature flag.
  ([#1228])
* Changed how authorization works with OpenID Connect and configuration
  files. Custom profiles have been replaced with a straightforward mapping
  from access permission to roles and assigning roles to users. For
  configuration file-based authentication, the file format has slightly
  changed but the current format is still accepted. If you are using
  OpenID Connect, you will have to update your configuration. Please, see
  the manual for details. ([#1232])
* Replaced downloading of RISwhois file for ROA analysis with calls to the
  [Roto API](https://github.com/NLnetLabs/roto-api). This can be
  controlled via new configuration settings `bgp_api_enabled`,
  `bgp_api_uri`, and `bgp_api_cache_seconds`. ([#1233], [#1266])

New

* Added a command to re-initialize the trust anchor signer with different
  timing values or TAL URLs. ([#1255])
* Disables the protection against early re-issuance for CA certificates that
  have the full resource set, typically TA certificates. ([#1281])

Bug Fixes

* Fixed a potential infinite recursion in PKCS11 error handling. ([#1215])
* Open ID connect: Re-initialize the connection after 60s to pick up
  configuration changes at the provider. ([#1226])
* Fixed the naming of the trust anchor timing configuration. It was
  expected to be `timing_config` for the config used by Krill and
  `ta_timing` if used by the Krill TA signer. It is now `ta_timing` in
  both cases while `timing_config` is accepted as an alias in both cases.
  ([#1241])
* Improve performance by using buffered reading and writing in the store.
  ([#1300], [#1301])

Other changes

* Refactored Prometheus metrics generation which resulted in a slightly
  different formatting but should still be syntactically correct.
  ([#1249])
* Upgraded the bundled Krill UI to
  [release 0.9.0](https://github.com/NLnetLabs/krill-ui/releases/tag/v0.9.0).
  ([#1295])
* Added packaging support for Ubuntu Noble, RHEL 10, Debian Trixie; removed
  packaging support for Ubuntu Xenial and Bionic, and Debian Stretch.
  ([#1239], [#1297], [#1308])
* The minimum supported Rust version is now 1.85. ([#1288])
2025-08-12 13:40:16 +02:00
Martin Hoffmann 1cd18451d7 Bump version. 2025-08-11 15:05:38 +02:00
Martin HoffmannandGitHub 517f6255b4 Release 0.15.0-rc6. (#1314)
This RC was only made to properly test upgrading Debian packages. It does
not include any functional changes.

Other changes

* Do not include systemd unit files in krillta and krillup deb packages.
  ([#1313])
2025-08-11 15:03:21 +02:00
Koen van HoveandGitHub 321d384a54 Do not include systemd unit files in krillta and krillup (#1313)
This PR prevents older versions of deb packages from including systemd-unit
files.

Because of the way Krill is set up, this requires both Ubuntu 20.04 and
Debian 11 to have usrmerge (which both have by default, only if upgraded
from an older version it might be missing).
2025-08-11 13:55:32 +02:00
Martin Hoffmann 26dabddea5 Bump version. 2025-08-05 10:41:57 +02:00
Martin HoffmannandGitHub 4559e5a478 Release 0.15.0-rc5. (#1312)
Bug fixes

* Improved the message printed when the TA proxy’s signer request does not
  contain any actual requests. ([#1305])
* Fixed various migration issues. ([#1306], [#1307], [#1309])

Other changes

* Add packaging for Debian 13. ([#1308])
* Updated dependencies. ([#1311])
2025-08-05 10:36:20 +02:00
Koen van HoveandGitHub 835d9f6052 Add support for Debian Trixie (#1308)
This PR adds support for Debian Trixie (13).

 It also cleans up some old references that are no longer used.
2025-07-31 15:04:10 +02:00
Martin Hoffmann 265383694f Bump version. 2025-06-26 14:01:45 +02:00
Martin HoffmannandGitHub 5a6ea66af5 Release 0.15.0-rc4. (#1302)
Bug fixes

* Improve performance by using buffered reading and writing in the store.
  ([#1300], [#1301])

Other changes

* Updated dependencies.
2025-06-26 13:56:30 +02:00
Martin Hoffmann 88f72987b7 Bump version. 2025-06-18 12:50:38 +02:00
Martin HoffmannandGitHub f18ff6c9a2 Release 0.15.0-rc3. (#1299)
Other changes

* Upgraded the bundled Krill UI to release 0.9.0 ([#1295])
* Added packaging support for RHEL 10-alikes. ([#1297])
2025-06-18 12:37:18 +02:00
Martin Hoffmann 7c0593b195 Bump version. 2025-06-13 16:34:23 +02:00
Martin HoffmannandGitHub e0ce086bb5 Release 0.15.0-rc2. (#1294)
Bug fixes

* Fix Krill refusing to start if the now unnecessary “refresh announcements
  info” task is still present by adding it back as a dummy task. ([#1292])
* Fix redirect of `/` to `/ui` and allow additional segments on the `/ui`
  path in the HTTP server. ([#1293])
2025-06-13 16:21:28 +02:00
Martin Hoffmann ed64d75466 Bump version. 2025-06-13 14:38:23 +02:00
Martin HoffmannandGitHub ee7e60ab4f Release 0.15.0-rc1. (#1291)
Breaking Changes

* Refactored command line options processing for all binaries. As a
  result, options for both `krillc` and `krillta` have slightly changed.
  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`. ([#1228])
* Removed support for RTA in `krillc`. Support is currently still
  present in the Krill server, though behind a (non-default) feature flag.
  ([#1228])
* Changed how authorization works with OpenID Connect and configuration
  files. Custom profiles have been replaced with a straightforward mapping
  from access permission to roles and assigning roles to users. For
  configuration file-based authentication, the file format has slightly
  changed but the current format is still accepted. If you are using
  OpenID Connect, you will have to update your configuration. Please, see
  the manual for details. ([#1232])
* Replaced downloading of RISwhois file for ROA analysis with calls to the
  [Roto API](https://github.com/NLnetLabs/roto-api). This can be
  controlled via new configuration settings `bgp_api_enabled`,
  `bgp_api_uri`, and `bgp_api_cache_seconds`. ([#1233], [#1266])

New

* Added a command to re-initialize the trust anchor signer with different
  timing values or TAL URLs. ([#1255])
* Disables the protection against early re-issuance for CA certificates that
  have the full resource set, typically TA certificates. ([#1281])

Bug Fixes

* Fixed a potential infinite recursion in PKCS11 error handling. ([#1215])
* Open ID connect: Re-initialize the connection after 60s to pick up
  configuration changes at the provider. ([#1226])
* Fixed the naming of the trust anchor timing configuration. It was
  expected to be `timing_config` for the config used by Krill and
  `ta_timing` if used by the Krill TA signer. It is now `ta_timing` in
  both cases while `timing_config` is accepted as an alias in both cases.
  ([#1241])

Other changes

* Refactored Prometheus metrics generation which resulted in a slightly
  different formatting but should still be syntactically correct.
  ([#1249])
* Added packaging support for Ubuntu Noble; removed packaging support for
  Ubuntu Xenial and Bionic, and Debian Stretch. ([#1239])
* The minimum supported Rust version is now 1.85. ([#1288])
2025-06-13 14:31:29 +02:00
Martin HoffmannandGitHub 3e523cd143 Upgrade to edition 2024. (#1290)
This PR upgrades to edition 2024.

This surfaces an interesting issue as std::env::set_var is unsafe. Krill
relies on various environment variables which are read throughout operation
and set to convey them to those points. This should be replaces by reading
those variables up front and conveying information by other means.
2025-06-12 17:52:41 +02:00
Martin HoffmannandGitHub 74dfd7e0cd Upgrade dependencies for 0.15.0. (#1288)
Some dependency requires edition 2024, so we need to upgrade the minimum
Rust version to 1.85.
2025-06-12 16:20:54 +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
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 99e331b18e Remove static-openssl feature. (#1279)
This PR removes the static-openssl feature. If necessary, this features can
be invoked by selecting openssl/vendored directly.

The PR also removes building and testing with default features from the CI
workflow. The only difference between default and all features currently is
rta which is deprecated and will be removed, anyway.

This PR now also fixes a few issues in krillc config simple and the post
install scripts for Debian and RPM packages.
2025-06-04 17:58:28 +02:00
Koen van HoveandGitHub be8d000435 Update dependencies (#1273)
This is primarily related to #1251, which is fixed by upgrading
rpki to 0.18.6. However, whilst we're at it we might as well
upgrade the other dependencies as well. That also keeps
Dependabot happy.
2025-06-04 15:55:04 +02:00
Martin Hoffmann 4f5c340eb6 Bump MSRV to 1.81. 2025-04-11 16:07:16 +02:00
Maarten AertsenandGitHub 6964bcacfa Update package.homepage in Cargo.toml (#1256) 2025-03-31 11:57:09 +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 2914b86d88 Import KVX with disk and memory stores. (#1253)
This PR imports the code previously in the kvx crate into Krill itself
as the commons::storage module. It also rearranges some of Krill’s
eventsourcing and queue code to better integrate with the now internal
storage module.
2025-03-21 14:07:16 +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 9ef5e22134 Replace once_cell::OnceCell with std::sync::OnceLock. (#1246)
This PR removes the dependency on once_cell since all the relevant functionality is now in std.
2025-01-10 12:17:24 +01:00
Koen van HoveandGitHub c13d44fb8a Remove fslock and libflate dependencies. (#1245) 2025-01-08 13:04:19 +01:00
Koen van HoveandGitHub 7d989c16ed Bump dependencies (#1244) 2025-01-06 14:50:14 +01:00
Koen van HoveandGitHub 7c14de18e9 Packaging: add Ubuntu Noble, remove Xenial, Bionic, and Debian Stretch (#1239) 2024-12-04 10:15:51 +01:00
Martin Hoffmann d34df0c881 Switch back to rpki-rs main branch. 2024-08-20 15:57:53 +02:00
Martin Hoffmann 4b00231104 Experimentally update rpki-rs for backslashes in handles. 2024-08-20 14:44:15 +02: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 7f6ceadb7c Upgrade to edition 2021. (#1217)
This PR upgrades the codebase to Rust edition 2021.

This mostly just means removing a number of use statements for TryFrom and
TryInto. There are no actual code changes.
2024-06-25 16:20:40 +02:00
Martin HoffmannandGitHub 45eb8f857b Fix Clippy warnings and enable Clippy in CI. (#1216)
This PR fixes all warnings from nightly Clippy as of today and enables a
Clippy run in the CI workflow for the stable channel with all features
enabled.
2024-06-25 15:16:15 +02:00
Martin Hoffmann 5fb6835b3e Switch to released rpki-rs. 2024-06-25 10:27:52 +02:00
Martin HoffmannandGitHub 5a86110a92 Upgrade cryptoki to 0.7. (#1212)
This PR upgrades cryptoki to 0.7. It doesn’t take advantage of the changes
yet. This will happen in follow-up PRs.
2024-06-24 17:53:19 +02:00
Martin HoffmannandGitHub fff64ce16f Update hyper to 1.3.1 and reqwest to 0.12.5. (#1211)
This PR updates hyper, reqwest, and the rustls stack to their current versions.
2024-06-24 17:32:43 +02:00
Martin HoffmannandGitHub 3837a4d4a1 Upgrade most dependencies. (#1202)
This PR updates the dependencies that don’t require complex changes.
2024-06-24 17:04:34 +02:00
Martin Hoffmann cd3d0da6bb Slightly reformat Cargo.toml. 2024-06-18 10:11:14 +02:00
Martin HoffmannandGitHub 99c6dd2079 Reorder Cargo.toml (and do a soft upgrade). (#1210)
This PR reorders the dependency list in Cargo.toml alphabetically. It also
does a soft cargo update.
2024-06-18 10:06:24 +02:00
Martin HoffmannandGitHub 2c8cd95ee5 Switch to rpki-rs git main to pull in fix for empty CRLs. (#1200)
This is just a reminder to require the latest release of rpki-rs when we release Krill.
2024-06-12 13:05:26 +02:00
Martin HoffmannandGitHub 4d0b4edb1b Upgrade minimum Rust version to 1.70.0. (#1198) 2024-06-11 15:07:44 +02:00
Theo BuehlerandGitHub e1da2f600e Make cryptoki-sys optional (#1196)
cryptoki itself is marked optional and only needed for hsm builds.
cryptoki-sys is still compiled unconditionally, also in builds
disabling the hsm feature. This causes build failures if cryptoki
isn't installed or on systems unsupported by cryptoki-sys's build
script.
2024-06-11 11:57:40 +02:00
Ximon Eighteen 33e072ef44 Bump version for development, to work around Ploutos packaging failure due to upgrade to same version as last published. 2024-04-08 22:40:05 +02:00