Commit Graph
101 Commits
Author SHA1 Message Date
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 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 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
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 3253d3c4b6 Reformat to 78 character lines. (#1218) 2024-06-26 10:28:34 +02:00
Tim BruijnzeelsandGitHub 7468e1fcde Update conf file storage text for 0.14.0. (#1145) 2023-10-31 11:02:21 +01:00
Tim Bruijnzeels c907478059 Remove no longer needed 'always_recover_data' function #1086 2023-10-17 15:31:11 +02:00
Gaurav KansalandTim Bruijnzeels a3fb50bdd5 Add quotes to config example to avoid parse error (#1082) 2023-10-17 15:31:11 +02:00
Tim Bruijnzeels f48690c364 Aggregate command sets (#1087) 2023-10-17 15:31:11 +02:00
Ximon EighteenandGitHub 3a5a120804 Allow the value used for certain public and private PKCS#11 key attributes to be overridden (#1018). 2023-04-12 11:40:49 +02:00
Ximon EighteenandGitHub b48ea6e287 Permit setting CKA_PRIVATE to CK_FALSE on PKCS#11 RSA public keys (#1019) (#1021)
* Add new PKCS#11 signer configuration setting 'anon_pubkey_access' (default false) (#1019).
* Use a type and allow the third possibility (token-default) also to be specified.
* Include advice to try changing pubkey_access when the signer registration underlying error is CKR_INCONSISTENT_TEMPLATE. Includes changes to gain access to the underlying error, and propagating the augmented error message (which was wrongly being dropped).
2023-03-08 10:16:44 +01:00
Tim BruijnzeelsandGitHub 92e901423a Support listening on multiple IP addresses. (#955) 2022-10-18 12:04:36 +02:00
Tim BruijnzeelsandGitHub 1c5c7ed82f Combine RRDP deltas if configured to do so (#693) 2022-10-13 17:05:28 +02:00
Tim BruijnzeelsandGitHub 79632c9f81 Deprecate keeping old RRDP files and dirs in Krill (#945) 2022-10-13 15:57:05 +02:00
Tim Bruijnzeels 132fdab39e Clarify that we still use HTTPS for RFC 6492 and 8181 (#913) 2022-09-05 12:37:38 +02:00
Tim Bruijnzeels 242ddb6044 Fix typo 2022-09-01 13:56:54 +02:00
Tim Bruijnzeels 3e674855a0 Allow explicit disabling of https #913 2022-09-01 11:32:45 +02:00
Tim BruijnzeelsandGitHub d68c07b59c Sign BGP router certificates (#827) 2022-07-07 13:20:00 +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
Tim Bruijnzeels 4e1df9294a Merge 0.9.5-rc8 (main) into dev 2022-03-30 14:05:02 +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
Tim Bruijnzeels 92ea597f01 Make CA sync strategy configurable #799 2022-03-06 23:28:16 +01:00
Ximon EighteenandGitHub b0be88bc10 HSM support for keys (#21) (#733)
Adds support for PKCS#11 v2.20 and/or KMIP 1.2 compatible HSMs.
Includes backward compatible extensions to the krill.conf syntax.
Includes HSM related developer docs.
Excludes HSM specific API (REST, krillc, Prometheus) or UI extensions.
2022-01-14 14:19:24 +01:00
Tim Bruijnzeels 18ee87f6e0 Allow configuring RFC6492/8181 client timeouts #743 2021-12-16 10:30:10 +01:00
Tim BruijnzeelsandGitHub ee1f513f8c Allow configuring RFC6492/8181 client timeouts #743 2021-12-16 09:49:14 +01:00
Tim Bruijnzeels 3b94ff2fa6 Proof of concept ASPA support (#685) 2021-11-05 15:59:17 +01: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 30772b6f36 Suspend krill 092 higher only (#670) (PR #672) 2021-09-23 15:57:05 +02:00
Tim Bruijnzeels 72df8caac4 Fix typo. 2021-09-13 13:32:22 +02:00
Tim Bruijnzeels 3cc9547e1e Hide ca-child metrics if there are no CAs with children. 2021-09-13 13:32:22 +02:00
Tim Bruijnzeels 4eae590e99 Keep child state (active/pending) in status and show in CLI and metrics. (#656) 2021-09-13 13:32:22 +02:00
Tim Bruijnzeels 5d5728dc68 Improve help text in default config. 2021-09-13 13:32:22 +02:00
Tim Bruijnzeels 80a7885382 Document metrics and disabling them in default config file. (#654) 2021-09-13 13:32:22 +02:00
Tim Bruijnzeels 5c90624ffd Restrict ca_refresh_seconds to 10-60 minutes. 2021-08-30 10:47:28 +02:00
Tim Bruijnzeels 4c554fb78f Change ca_refresh in config to ca_refresh_seconds to be explicit. 2021-08-30 10:47:28 +02:00
Tim Bruijnzeels eb420f9d02 Clarify suspend directive in example config file. (#623) 2021-08-30 10:47:28 +02:00
Tim Bruijnzeels 4dc54f3a8c Automatically suspend inactive child CAs *if* configured to do so. (#623) 2021-08-30 10:47:28 +02:00
Ximon EighteenandGitHub 47d23f87a7 Permit disabling automatic sending of prompt=login to the OIDC provider (#616)
Adds a new `prompt_for_login` configuration file setting in the `[auth_openidconnect`]` block (defaults to true for backward compatibility) which can be used to avoid advising the OpenID Connect provider to prompt for login details even if the user has a valid provider login session. Resolves #614.
2021-08-03 11:20:38 +02:00
Tim Bruijnzeels 90d8a59524 Merge 0.9.1-rc1 release into 'dev'. 2021-07-16 15:03:54 +02:00
Tim Bruijnzeels 5bb32aa9b3 Fix config tests after changing text in template. 2021-07-14 10:13:15 +02:00
Tim BruijnzeelsandGitHub d85dca7b98 Make 'service_uri' default pick up ip and port 2021-07-13 16:06:49 +02:00
Tim BruijnzeelsandGitHub 51c58ec58b Use next update time as mft EE expiry time (#589) 2021-07-13 15:52:00 +02:00
Tim Bruijnzeels fb31fc39e4 Improve comment in krill.conf and fix related tests. 2021-06-23 14:50:24 +02:00
Rich ComptonandGitHub ce4bbf8742 Mention up-down protocol in krill.conf (#585) 2021-06-23 13:46:17 +02:00
Tim Bruijnzeels c25dce6345 Update example testbed config. 2021-05-20 12:51:52 +02:00
Ximon EighteenandGitHub 13b6f7d1f3 Security tweaks (#382) (#484)
* Encrypt session state using ChaCha20-Poly1305 instead of AES-GCM.
* Replace config file users login use of insecure unsalted SHA2 password hashing with secure scrypt salted password hashing.
* Log the start of the request before determining the actor.
* Allow sufficient time for password hashing delays during login with config file user based tests..
* Synced with Lagosta commit b49f23de.
2021-04-20 00:47:22 +02:00
Tim BruijnzeelsandGitHub b43a6815cf Inconsistent and unacceptable token references (#433) (#483) 2021-04-19 22:23:02 +02:00
2917e21c3b Ran cargo update (#366)
* Ran cargo update.
* Upgrade Oso and remove no-longer needed workaround.

Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
2021-04-15 14:41:32 +02:00
Tim BruijnzeelsandGitHub 3a916cb632 Limit the number of deltas in RRDP notification.xml file. (#460) 2021-04-01 15:53:11 +02:00
Ximon EighteenandGitHub f3e8023be5 Support fine grained access per CA (resolves #437) (#443)
- Various changes to support a grey policy in between black and white approach of permitting or denying access to CAs entirely, whereby a user can have a different role in one CA than in another.
- Introduces the NoResourceType for requests not relating to a specific "resource", e.g. CA, such as LOGIN. NoResourceType maps to `nil` in Oso policy language.
- Add support for Permission constants in Polar files. Build the Permission enum using a macro.
- Added CA_ADMIN (for bulk operations) and CA_DELETE permissions.
- Support loading more than one custom auth policy file.
- Checks were missing on some API calls if the user had the necessary permission *on the relevant resources*.
- Rename the team policy as a demo to indicate that it is educational only.
- Split a role-per-ca demo out of the team policy demo.
- Extend the with_ta Cypress test to cover the role-per-ca ca demo policy (as it creates the needed data).
- Don't misrepresent an external policy file in log statements as being internal.
- Better comments describing what the tests are doing.
- Remove unused role parameter in team access demo policy.
- Add disallow() in Oso policies as a way to define deny rules.
2021-03-25 21:35:38 +01:00