Commit Graph
292 Commits
Author SHA1 Message Date
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
Tim Bruijnzeels 266cf2e06d API to add parent should not change #898 2022-08-29 16:51:39 +02:00
Tim Bruijnzeels 9443792dc1 API to upload repository response should not change #895 2022-08-29 16:51:39 +02:00
Ximon EighteenandTim Bruijnzeels 802b0fda81 Upgrade rpki crate dependency (fixes #874)
* Upgrade rpki crate dependency (fixes #874).
* Update changelog.
* Fix test to not expect a leading line break in the XML response.
2022-08-29 16:51:39 +02:00
Tim Bruijnzeels d34a7f2fdb Show RFC8183 XML in CLI (#868) 2022-08-29 16:51:39 +02:00
Tim Bruijnzeels b03511b503 Ensure that all published objects are on the manifest (fix #853) 2022-07-25 14:33:25 +02:00
Tim BruijnzeelsandGitHub bbb2267587 Migrate RPKI objects in history (#841)
Ensures that Krill is more robust with regards to stricter validation of RPKI object types in future.
2022-07-18 15:51:26 +02:00
Tim BruijnzeelsandGitHub d68c07b59c Sign BGP router certificates (#827) 2022-07-07 13:20:00 +02:00
Tim BruijnzeelsandGitHub 7d271417f1 Support configuration for benchmark testing (#825) 2022-05-27 09:11:42 +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 12c4a1fc9a Merge release 0.9.5 into dev 2022-04-13 16:58:52 +02:00
Tim Bruijnzeels 5973b7431c Split big function test into smaller tests. 2022-04-05 16:01:25 +02:00