Commit graph

92 commits

Author SHA1 Message Date
Firstyear 3ae8453375
In honour of SebaT, error on db lock acq timeout (#2947) 2024-08-02 09:29:46 +10:00
Merlijn f82a52de3b
[htmx] Credential Update page (#2897)
Implement credential update page in HTMX

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-08-01 01:17:14 +00:00
Firstyear 329750981e
Update to 1.4.0-dev (#2943) 2024-08-01 00:02:11 +10:00
James Hodgkinson 5313c5ffdc
Reorganising the daemon startup so it doesn't fail with OTEL configured (#2934) 2024-07-26 07:28:35 +00:00
Firstyear 21d3f82aa1
Add scim proto to kanidm, refactor to improve serde performance. (#2933) 2024-07-26 15:54:28 +10:00
Firstyear a695e0d75f
Oauth2 in htmx (#2912)
* Apply suggestions from code review

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-20 02:30:06 +00:00
Firstyear c7fcdc3e4e
Strict redirect URL enforcement (#2917)
Add strict OAuth2 URL enforcement per the RFC. This includes a transition process for the next release so that Admins can come into compliance.
2024-07-20 02:09:50 +00:00
Alin Trăistaru 562f352516
fix typos (#2908)
* fix typos and misspellings
* use proper capitalization
* Apply suggestions from code review
---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-18 03:22:20 +00:00
James Hodgkinson 7373d9abbe
Forcing the http2 feature on hyper, but also chasing some out of date packages (#2896)
* Forcing the http2 feature on hyper, but also chasing some out of date packages
2024-07-16 10:10:46 +10:00
Firstyear d0e57442d2
Tidy up replication poll interval (#2883) 2024-07-15 06:16:24 +00:00
Firstyear a4a06c1172
Add a migration for future versions that will notify and warn about the removal of security keys. (#2885) 2024-07-12 02:19:43 +00:00
Firstyear b1480e36f0
20240703 htmx (#2870)
Complete the remainder of the HTMX rewrite of the login page.
2024-07-07 03:36:47 +00:00
Merlijn 4795541719
Offer configuration of images for Oauth2 resources (#2665) 2024-07-06 12:25:55 +10:00
Firstyear bd6d9284c0
20240607 2417 piv (#2829)
Add some more ground work for future PIV/x509 authentication.
2024-06-11 00:54:57 +00:00
Firstyear f39dd7d7a2
Add development taint flag to prevent mismatch of server versions (#2821)
* Add development taint flag to prevent mismatch of server versions
* Update server/lib/src/constants/schema.rs

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-06-07 09:53:30 +10:00
James Hodgkinson 3c01a96348
Better WebAuthn and other error responses (#2608) 2024-06-05 09:57:16 +10:00
Firstyear a8b9dc8ee8
2756 - resolve invalid loading of dyngroups at startup (#2779)
* 2756 - resolve invalid loading of dyngroups at startup
* Add a "patch level" migration for domain one shot fixes
2024-05-28 02:12:44 +00:00
Firstyear c1235a7186
Check for same version with backup/restore (#2789) 2024-05-23 01:48:37 +00: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
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
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
James Hodgkinson 4c1fa0d644
Adding a builtin class for all built-in things (#2603)
* adding builtin class to builtin objects
* Resolve issues with builtin PR

---------

Co-authored-by: William Brown <william@blackhats.net.au>
2024-03-06 01:33:14 +00:00
Vladimir Dronnikov 1a81b437d8
apidoc fixes (#2614) 2024-03-04 02:10:01 +00:00
James Hodgkinson dbf59474bb
OpenAPI schema fixes (#2590)
* OpenAPI schema fixes
* Adding OpenAPI schema checks to the release script
2024-03-01 16:57:36 +10:00
Firstyear fbc021f487
20240221 2489 cleanup api v1 (#2573) 2024-02-27 09:25:02 +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 84b2c4956d
Removing unused constant and updating docstring for LDAP bind address (#2556) 2024-02-20 11:10:02 +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 002ab13698
Add code_challenge_methods_supported to OIDC discovery (#2525) 2024-02-15 09:17:08 +10:00
Firstyear cdbaefe23d
Fix for incorrect domain migration rollbacks (#2482) 2024-02-07 13:11:55 +10:00
Firstyear 9050188b29
Add tools for remigration and domain level raising (#2481) 2024-02-06 10:01:06 +00:00
Firstyear d42268269a
20240125 2217 client credentials grant (#2456)
* 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 b1e7cb13a5
Add rfc8414 metadata (#2434) 2024-01-19 04:14:52 +00:00
Firstyear 8dc884f38e
2390 1980 allow native applications (#2428) 2024-01-16 10:44:12 +10:00
Firstyear 3408816932
Add DN as a virtual ldap attr (#2379) 2023-12-19 15:07:19 +10:00
James Hodgkinson a4c44bc5f9
fixing default for oauth2 request_parameter_supported metadata (#2378) 2023-12-19 11:56:47 +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 854b696532
249 2024 managed by syntax (#2359)
Allows hierarchial entry management rules.
2023-12-07 10:00:09 +00: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
James Hodgkinson 916bb4ec04
Adding env var configs for the server (#2329)
* env var config for server
* I am my own clippy now
* Man, that got complicated quick
2023-11-24 01:27:49 +00:00
Firstyear bb8914c70d
20231120 2320 sssd compat (#2328) 2023-11-22 10:18:03 +10: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
Firstyear 9e5449a644
Minor improvements to incoming replication (#2279) 2023-11-02 01:21:21 +00:00
James Hodgkinson ef96ca6aa1
started writing docs and ended up in another rabbit hole (#2267)
* started writing docs and ended up in another rabbit hole
* updoots
* dangit fedora
2023-10-31 19:15:35 +10: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