Commit graph

105 commits

Author SHA1 Message Date
Firstyear f669f5a0e8
Resolve incorrect handling of tokens in logout flow (#2795) 2024-05-28 16:01:19 +10:00
Firstyear 1e4f6e85ca
Revive Cookies. (#2788)
* Revive Cookies.
* change from tikv-jemalloc to mimalloc.
2024-05-23 00:45:42 +00:00
James Hodgkinson 7964f55d59
strip out some debug messages unless *really* debugging. (#2767)
* kanidm cli logs on debug level - Fixes #2745
* such clippy like wow
* It's important for a wordsmith to know when to get its fixes in.
* updootin' wasms
2024-05-14 14:56:55 +10:00
James Hodgkinson aefcdc5ee8
Fixing up build for rust 1.78, hiding things behind cfg(test) etc. (#2753)
* 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 1fb8165825
Update Webauthn and Base64 (#2734) 2024-05-01 04:10:18 +00:00
Firstyear 58cfc8bdf9
Minor upgrade fixes (#2722) 2024-04-24 17:21:45 +10:00
Firstyear acc800f00e
Resolve OAuth2 client/rs confusion (#2719)
* Resolve OAuth2 client/rs confusion

* feedback
2024-04-24 15:34:50 +10:00
Firstyear afd674d346
Add mail support to groups (#2718)
* Add mail support to groups

* Update libs/client/src/group.rs

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-04-23 07:08:28 +00:00
Sebastiano Tocci 9354c180af
added profile and memberof search to the basic model (#2712)
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-04-23 10:30:38 +10:00
Firstyear 62bbd7e3ea
20240409 rework orca markov (#2699)
Improve the models and what can be performed in the orca benchmarks.

---------

Co-authored-by: Sebastiano Tocci <seba.tocci@gmail.com>
Co-authored-by: Sebastiano Tocci <sebastiano.tocci@proton.me>
2024-04-16 23:35:16 +00:00
Firstyear d7834b52e6
Begin the basis of the key provider model (#2640)
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
Dustin Frisch e5702909d0
ldap-sync: allow to use attrs more than once (#2676) 2024-03-25 09:41:24 +00:00
Firstyear 285f4362b2
20230224 2437 orca remodel (#2591) 2024-03-09 16:09:15 +10:00
Firstyear b4d9cdd7d5
20240301 systemd uid (#2602)
Fixes #2601 Fixes #393 - 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
Merlijn eddca4fc86
Feature object graph (#2518)
* Refactor: move the object graph ui to admin web ui
* Add dynamic js loading support
Load viz.js dynamically
* Add some js docs
* chore: cleanup imports
* chore: remove unused clipboard feature
chore: remove unused mermaid.sh
* Messing with the profile.release settings and reverting the changes I tried has now made the build much smaller yay :D
* Refactor: user raw search requests
Assert service-accounts properly
* refactor: new v1 proto structure
* Add self to CONTRIBUTORS.md

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-02-29 02:25:40 +00:00
Firstyear fbc021f487
20240221 2489 cleanup api v1 (#2573) 2024-02-27 09:25:02 +00:00
James Hodgkinson 4096b8f02d
Changing to allow startup without a config file (#2582)
* Changing to allow startup without a config file, using environment variables
2024-02-27 15:40:00 +10:00
James Hodgkinson 4efdb7208f
of course I started looking at clippy things and now I can't stop (#2560) 2024-02-21 00:52:10 +00:00
Firstyear 68d788a9f7
20240216 308 resource limits (#2559)
This adds account policy based resource limits to control the maximum
number of entries that an account may query
2024-02-21 00:15:43 +00:00
James Hodgkinson 097db70c3d
prctl compile-time fixes, also chasing lints (#2558)
* fixing up error handling for prctl calls
* minor clippy lintypoos
* making clippy happier
* clippizing a test
* more clippy-calming
* adding tpm-udev to ubuntu flows for testing
* rebuilt wasm
* moving from rg to grep because someone doesn't like nice things
* such clippy like wow
* clippy config to the rescue
2024-02-20 18:21:33 +10:00
James Hodgkinson 6b44495704
Ordering auth methods in the CLI (#2508)
* rewriting ordering of authallowed enum
* ordering the authstate in the CLI

---------

Co-authored-by: William Brown <william@blackhats.net.au>
2024-02-15 12:31:01 +10:00
Firstyear 7567514044
Release 1.1.0-rc.16 (#2483) 2024-02-07 04:39:02 +00:00
Firstyear 9050188b29
Add tools for remigration and domain level raising (#2481) 2024-02-06 10:01:06 +00:00
Firstyear 86916a3d87
Return sshkey label to cli fields (#2440)
* Return ssh label to cli fields
2024-01-20 17:17:57 +10:00
James Hodgkinson e02e0501eb
Adding max_ber_size option in config for ldap sync (#2416) 2024-01-19 10:42:04 +10:00
Firstyear 8dc884f38e
2390 1980 allow native applications (#2428) 2024-01-16 10:44:12 +10:00
Matthew Wilks d56691f12d
Change OAuth2 RS Origin from the CLI (#2418)
* Enable changing the origin of an OAuth2 RS
2024-01-06 14:57:10 +10:00
Firstyear 5c445a4704
20231218 ipa sync unix password (#2374)
* Add support for importing the users password as unix password
2023-12-18 11:20:37 +10:00
Firstyear d09c2448ff
1481 2024 access control rework (#2366)
Rework default access controls to better separate roles and access profiles.
2023-12-17 23:10:13 +00:00
Firstyear 4bd5d584cb
20231204 ipa sync minor improvements (#2357) 2023-12-04 16:58:15 +10:00
Firstyear 76269f9de2
20231129 webauthn attestation (#2351)
This adds full support for attestation of webauthn/passkeys.
2023-12-03 06:13:52 +00:00
Firstyear 31b939fca3
20231128 freeipa migration (#2338)
* Add more weak password formats for freeipa
* Verification of freeipa migration from older ipa versions
2023-11-29 10:43:15 +10:00
Firstyear ac299b5286
Update to the latest compact-jwt version (#2331) 2023-11-24 02:53:22 +00:00
Firstyear bb8914c70d
20231120 2320 sssd compat (#2328) 2023-11-22 10:18:03 +10:00
Firstyear 8a40f5ab7b
Fix spelling (#2303) 2023-11-11 03:04:35 +00:00
Firstyear 47bcea7708
20231109 1122 credential class (#2300)
* Add CredentialType for acc pol
* Reword ui hints
* Finish account policy
* Clean up artefacts
2023-11-11 09:26:44 +10:00
James Hodgkinson 12f1de8358
Update OpenAPI schema gen to actually... be kinda sorta valid. (#2296)
* updating lockfile

* OpenAPI validation issues
Fixes #2295

* clippy sez no

* adding another validator, more specs
2023-11-07 11:35:17 +10:00
Firstyear b7852d1d71
pw min length in account policy (#2289) 2023-11-05 10:33:25 +10:00
James Hodgkinson 7025a9ff55
Feature: kanidm CLI pulling OpenAPI schema (#2285)
* diag is super noisy when you actually turn on logging... even though it wasn't an error?
* adding api download-schema to the CLI
* docs
2023-11-03 17:37:27 +10:00
James Hodgkinson 85c2b0fd82
Problems with bash completion autocomplete (#2281)
refers #2280
2023-11-02 10:55:32 +10:00
Allan dbf476fe5e
Remove unused imports and clippy lint (#2276)
* Fix unused import errors
* Apply clippy get_first lint
* Add contributor

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-11-01 05:54:29 +00:00
James Hodgkinson 3bfc347c53
CLI integration test beginnings (#2261)
* more integration test things, using assert_cmd to test the CLI end-to-end
* packagez
* making clippy happy
* making deno happy
2023-10-30 06:10:54 +00:00
William Brown ecc46bb015 Add book chapter + cli 2023-10-28 13:07:06 +10:00
James Hodgkinson ad3c491d07
Bug chasing (#2257)
* service-account validity expire-at doesn't accept all time nouns as defined by docs
Fixes #2153
* realised a logic bug
* making clippy happy while I'm here
* returning an empty set from the creds if the creds attribute is not found, which is then handled downstream
2023-10-27 05:30:38 +00:00
Samuel Cabrero 99ba97088d
cargo fmt + clippy (#2241)
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-10-27 04:40:24 +00:00
James Hodgkinson 18b4b7549f
service-account or person validity show returns for non-existing identity (#2258)
Fixes #2152
2023-10-27 04:00:37 +00:00
James Hodgkinson 208d7c9932
don't need write if we are not writing (#2256) 2023-10-27 13:34:53 +10:00
Firstyear afe9d28754
20231019 1122 account policy basics (#2245)
---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-10-22 11:16:42 +00:00
James Hodgkinson 6850a17e8c
Windows build fixes and test coverage (#2220)
* adding testing for users functions
* turning KanidmClient build error into a ClientError
* removing a redundant closure
2023-10-17 07:18:07 +00:00
Firstyear 8bcf1935a5
20231012 346 name deny list (#2214)
* Migrate to improved system config reload, cleanup acc pol
* Denied names feature
2023-10-13 08:50:36 +10:00