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.
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.
This PR fixes an issue where removing children or parents from CAs fails
before a successful communication with the remote CA. It also fixes an error
message when CAs without parent, children, and repository are removed.
This PR resolves an issue with the new BGP API code which returns no
announcement info even though there is announcement info (but it is
available, but there is no information about its relations).
This PR simplifies the structure of the keys used by the key-value store.
It changes the scope portion from being a sequence of identifiers to an
optional single identifier since the sequence is actually never used. As a
consequence, namespace, scope, and key now all use the same type, the newly
introduced Ident.
This PR adds a step to the start of the Krill daemon that initializes the
property store with the current version if it hasn’t been initialized
earlier. It also assumes that an uninitialized property store with no
per-store version information indicates that the data is from version 0.14.0
and migrates the stores lock directories accordingly.
This PR changes the function that collects all scopes for a given store to
not include the global scope. This restores the behaviour of kvx.
As a side effect, it changes the store testing code to run on both backends.
This PR skips any scope with .locks as its first segment when upgrading
any stores. This is an artifact of moving the lock directory from the top
level of each store to the top level of the storage space.
This PR brings the RefreshAnnouncementsInfo task back which was used to
trigger download of the RIS files. While we don’t need the task any more,
it may still be in the task queue which would cause Krill to refuse to
start.
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.
This PR sticks a warning on all types that are used when serializing
Krill’s state. This hopefully will serve as a reminder that they cannot
be changed without considering migrations.
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>
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.
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.
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).
Currently temporary files needed to run the tests are put in the
test-resources directory. This can make repeated tests behave differently.
This copies those files to a temporary directory first so they are always
run using a clean slate.
This PR moves sweeping the login session cache from being driven of the
scheduler (and thus using persistent tasks) into a Tokio task that is
spawned onto the runtime at the start of the daemon.
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 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.
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.
This PR refactors how response for the HTTP metrics endpoint is being
assembled. It uses a very thin layer on top of the bare Prometheus
protocol instead of manually writing all the content.
Ideally, this doesn’t change any of the metrics. It does, however,
slightly change the formatting.
This PR renames the `timing_config` options in the Krill config to
`ta_config`. It was already required to have this name if the config
was used by the Krill TA signer. The `timing_config` name is allowed
as an alias in both cases now.
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.
This PR adds an explicit lifetime to the Open ID connection, and if the
connection has existed for more than 60 seconds, it will initialise a new
connection in order to pick up possible configuration changes at the provider.
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.
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.