Commit graph

16 commits

Author SHA1 Message Date
Firstyear a2eae53328
20250314 remove protected plugin ()
Removes the protected plugin into an access control module so that it's outputs can be properly represented in effective access checks.
2025-04-01 01:00:56 +00:00
James Hodgkinson aefcdc5ee8
Fixing up build for rust 1.78, hiding things behind cfg(test) etc. ()
* fixing up build for rust 1.78, hiding things behind cfg(test) etc.
* cleaning up version identifier handling in book gen
2024-05-07 09:00:55 +10:00
Firstyear d7834b52e6
Begin the basis of the key provider model ()
This completely reworks how we approach and handle cryptographic keys in Kanidm. This is needed as a foundation for replication coordination which will require handling and rotation of cryptographic keys in automated ways. 

This change influences many other parts of the code base in it's implementation.

The primary influences are:

* Modification of how domain user signing keys are revoked or rotated.
* Merging of all existing service-account token keys are retired (retained) keys into the domain to simplify token signing and validation
* Allowing multiple configurations of local command line tools to swap between instances using disparate signing keys.
* Modification of key retrieval to be key id based (KID), removing the need to embed the JWK into tokens

A side effect of this change is that most user authentication sessions and oauth2 sessions will have to be re-established after upgrade. However we feel that session renewal after upgrade is an expected side effect of an upgrade. 

In the future this lays the ground work to remove a large number of legacy key handling processes that have evolved, which will allow large parts of code to be removed.
2024-04-15 23:44:37 +00:00
Firstyear b4d9cdd7d5
20240301 systemd uid ()
Fixes  Fixes  - gid numbers can be part of the systemd nspawn range.

Previously we allocated gid numbers based on the fact that uid_t is a u32, so we allowed 65536 through u32::max. However, there are two major issues with this that I didn't realise. The first is that anything greater than i32::max (2147483648) can confuse the linux kernel. 

The second is that systemd allocates 524288 through 1879048191 to itself for nspawn.

This leaves with with only a few usable ranges.

1000 through 60000
60578 through 61183
65520 through 65533
65536 through 524287
1879048192 through 2147483647

The last range being the largest is the natural and obvious area we should allocate from. This happens to nicely fall in the pattern of 0x7000_0000 through 0x7fff_ffff which allows us to take the last 24 bits of the uuid then applying a bit mask we can ensure that we end up in this range. 

There are now two major issues.

We have now changed our validation code to enforce a tighter range, but we may have already allocated users into these ranges. 

External systems like FreeIPA allocated uid/gid numbers with reckless abandon directly into these ranges. 

As a result we need to make two concessions.

We *secretly* still allow manual allocation of id's from 65536 through to 1879048191 which is the nspawn container range. This happens to be the range that freeipa allocates into. We will never generate an ID in this range, but we will allow it to ease imports since the users of these ranges already have shown they 'don't care' about that range. This also affects SCIM imports for longer term migrations. 

Second is id's that fall outside the valid ranges. In the extremely unlikely event this has occurred, a startup migration has been added to regenerate these id values for affected entries to prevent upgrade issues. 

An accidental effect of this is freeing up the range 524288 to 1879048191 for other subuid uses.
2024-03-07 03:25:54 +00:00
Firstyear fbc021f487
20240221 2489 cleanup api v1 () 2024-02-27 09:25:02 +00:00
Firstyear d42268269a
20240125 2217 client credentials grant ()
* Huge fix of a replication problem.
* Update test
* Increase min replication level
* Client Credentials Grant implementation
2024-02-01 02:00:29 +00:00
Firstyear afe9d28754
20231019 1122 account policy basics ()
---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-10-22 11:16:42 +00:00
Firstyear 8bcf1935a5
20231012 346 name deny list ()
* Migrate to improved system config reload, cleanup acc pol
* Denied names feature
2023-10-13 08:50:36 +10:00
Firstyear b3aed1df34
68 20230908 replication attrunique ()
Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-09-12 08:50:51 +10:00
Firstyear d1fe7b9127
68 20230829 replication referential integrity ()
* Member of works!
* Hooray, refint over replication works.
2023-09-05 21:30:51 +10:00
Sebastiano Tocci 003234c2d0
Identity verification feature () 2023-08-16 21:02:48 +10:00
Sebastiano Tocci 9a3c12a79d
Name change history () 2023-06-28 18:34:44 +10:00
Sebastiano Tocci cc5f21eee5
added pre_cand entries to both pre_modify and pre_batch_modify plugin functions () 2023-06-13 19:46:41 +10:00
Firstyear 2752965de1
Add more replication tests, improve some handling of tombstones. () 2023-05-26 12:18:53 +10:00
Firstyear 48c620e43a
20230508 replication incremental () 2023-05-23 13:25:22 +10:00
Firstyear 00cca81012
1399 cleanup reorg () 2023-03-01 13:10:52 +10:00
Renamed from kanidmd/lib/src/plugins/mod.rs (Browse further)