Commit graph

135 commits

Author SHA1 Message Date
James Hodgkinson 151a9ad90f
ripping out some extra packages (#3146) 2024-10-26 02:27:56 +00:00
James Hodgkinson 5a709520dc
OAuth2 Device flow foundations (#3098) 2024-10-26 12:08:48 +10:00
Firstyear 5a3e5f1e07
20241017 3107 token ttl (#3114) 2024-10-18 03:28:52 +00:00
Firstyear 8c8f72381f
Add the strict flag on client creates for developers (#3111) 2024-10-16 13:58:57 +10:00
Firstyear 2075125439
Working scim entry get for person (#3088) 2024-10-15 04:29:45 +00:00
James Hodgkinson c8b3b6214c
Cache buster buster (#3091) 2024-10-15 01:54:46 +00:00
James Hodgkinson 6b48054a2e
fix(http): status content type should be JSON (#3096) 2024-10-15 01:28:07 +00:00
Firstyear 131ff80b32
20240921 ssh keys and unix password in credential update session (#3056) 2024-10-03 05:57:18 +00:00
CEbbinghaus dc4a438c31
Feat: Adding POSIX Password fallback (#3067)
* Added Schema for credential fallback
* Added account polcity management to ac migration
* Refactored Ldap & Unix auth to be common
* removed unused methods and renamed unused fields
* Fixed LDAP missing Anonymous logic
* Added CLI argument for configuring primary cred fallback
2024-10-02 19:28:36 +10:00
micolous 2e4d19f4f8
scim_proto: fix incorrect language tag (#3064)
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-09-26 03:10:31 +00:00
Firstyear fb3e7a01bc
Resolve incorrect SCIM Sync serialisation (#3047) 2024-09-17 06:27:41 +00:00
James Hodgkinson 004e263f90
CLI image error nicening (#3037)
* fix(scim_proto): fixing an issue with building due to dependencies
* feat(cli): more error message detail when things go wrong with images on the CLI
2024-09-17 04:07:43 +00:00
Chris Olstrom 3819d21593
implements additional traits for filter types (#3036)
* impl ToString for filter::AttrPath
* impl ToString for filter::ScimComplexFilter
* impl ToString for filter::ScimFilter
* impl FromStr for filter::{ScimFilter,ScimComplexFilter,AttrPath}
* derive(Serialize,Deserialize) for filter::{ScimFilter,ScimComplexFilter,AttrPath}

Signed-off-by: Chris Olstrom <chris@olstrom.com>
2024-09-12 04:17:35 +00:00
Firstyear d3891e301f
20240810 SCIM entry basic (#3032) 2024-09-12 12:53:43 +10:00
Firstyear 95fc6fc5bf
20240828 Support Larger Images, Allow Custom Domain Icons (#3016)
Allow setting custom domain icons.
2024-09-05 04:19:27 +00:00
Firstyear 0fac1f301e
20240820 SCIM value (#2992)
Add the basics of scim value serialisation to entries.
2024-08-29 11:38:00 +10:00
Firstyear 2ea8a0ed88
Expose group rename (#2999)
* feat(cli): add group rename
2024-08-23 06:18:29 +00:00
James Hodgkinson 7c3deab2c4
enforcen den clippen (#2990)
* enforcen den clippen
* updating outdated oauth2-related docs
* sorry clippy, we tried
2024-08-21 00:32:56 +00:00
Firstyear 239f4594dd
20240810 application passwords (#2968)
Add the server side components for application passwords. This adds the needed datatypes and handling via the ldap components.

Admin tools will be in a follow up PR. 

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Co-authored-by: Samuel Cabrero <scabrero@suse.de>
2024-08-20 06:44:37 +00:00
Firstyear b1099dfa3b
Foundations of pam/nss multi resolver
This starts the support for multi-resolver operation as well as a system level nss resolver.

In future we'll add the remaining support to auth system users with pam too.
2024-08-15 23:54:35 +00:00
James Hodgkinson 9f7c8310eb
fixing println bug (#2935)
* fixing println bug

* fixing schema requirement for OpenAPI

* moar scim

* moar OpenAPI

* schema all the things
2024-07-27 10:01:21 +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 7bbb193cdf
20240725 allow connection to older servers (#2930)
Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-25 16:11:14 +10:00
Firstyear da7ed77dfa
Substring Indexing (#2905) 2024-07-20 03:12:49 +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
Alin Trăistaru eb2b578c55
build profiles: rename release_suse_generic to release_linux (#2907)
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-07-17 04:11:11 +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
James Hodgkinson eddec88429
making the internals of kanidmclientconfig public for other users (#2895)
* making the internals of kanidmclientconfig public for other users
* clippyisms
2024-07-15 10:28:23 +00:00
Firstyear bf73332088
enable build htmx in docker (#2893) 2024-07-15 08:06:15 +00:00
Firstyear d7a5097527
htmx logout tidy up (#2884) 2024-07-15 07:11:00 +00:00
dependabot[bot] 34abdc2e24
Bump the all group across 1 directory with 10 updates (#2881)
Bumps the all group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [async-trait](https://github.com/dtolnay/async-trait) | `0.1.80` | `0.1.81` |
| [hyper](https://github.com/hyperium/hyper) | `1.3.1` | `1.4.0` |
| [hyper-util](https://github.com/hyperium/hyper-util) | `0.1.5` | `0.1.6` |
| [lodepng](https://github.com/kornelski/lodepng-rust) | `3.10.1` | `3.10.2` |
| [sd-notify](https://github.com/lnicola/sd-notify) | `0.4.1` | `0.4.2` |
| [serde](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.119` | `1.0.120` |
| [serde_with](https://github.com/jonasbb/serde_with) | `3.8.1` | `3.8.3` |
| [syn](https://github.com/dtolnay/syn) | `2.0.68` | `2.0.69` |
| [gethostname](https://github.com/swsnr/gethostname.rs) | `0.4.3` | `0.5.0` |



Updates `async-trait` from 0.1.80 to 0.1.81
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.80...0.1.81)

Updates `hyper` from 1.3.1 to 1.4.0
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v1.3.1...v1.4.0)

Updates `hyper-util` from 0.1.5 to 0.1.6
- [Release notes](https://github.com/hyperium/hyper-util/releases)
- [Changelog](https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper-util/compare/v0.1.5...v0.1.6)

Updates `lodepng` from 3.10.1 to 3.10.2
- [Commits](https://github.com/kornelski/lodepng-rust/compare/v3.10.1...v3.10.2)

Updates `sd-notify` from 0.4.1 to 0.4.2
- [Changelog](https://github.com/lnicola/sd-notify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lnicola/sd-notify/compare/v0.4.1...v0.4.2)

Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

Updates `serde_json` from 1.0.119 to 1.0.120
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.119...v1.0.120)

Updates `serde_with` from 3.8.1 to 3.8.3
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.8.1...v3.8.3)

Updates `syn` from 2.0.68 to 2.0.69
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.68...2.0.69)

Updates `gethostname` from 0.4.3 to 0.5.0
- [Changelog](https://github.com/swsnr/gethostname.rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swsnr/gethostname.rs/compare/v0.4.3...v0.5.0)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: hyper-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: lodepng
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: sd-notify
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: gethostname
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 08:44:52 +10: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
Firstyear f9a77ee1f3
2818 2511 oauth2 urls (#2867)
* Allow multiple origins
* Docs
* Capitalization 'n stuff

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-07-05 23:17:26 +00:00
James Hodgkinson 1e12b8552f adding freebsd target_os 2024-06-26 18:16:01 -07:00
Firstyear 10e15fd6b3
20240613 performance improvements (#2844)
Thanks to @Seba-T's work with Orca, we were able to identify a number of performance issues in certain high load conditions.

This commit contains fixes for the following issues

* Unbounded Memory Growth - due to how ARCache works, to maintain temporal consistency it must retain copies of keys (not values) in a special data set for tracking. The Filter Resolve Cache was using unresolved filters as keys. This caused memory explosions when refint or memberof were updating a group with a large number of members because they would emit a query with hundreds of filter terms that would only be used once and never again, causing the ARCache haunted set to grow without bound. To limit this, we no longer cache large/complex queries for resolution, and in future we may implement some other methods to reduce this like sha256/hmac of the queries.

* When creating a new account, dyngroups would be engaged to add the account as a member due to the matching scope. However the change to the dyngroup was triggering an update of all the dyngroups *members* related memberof attributes. This would mean that adding an account would trigger every other account to be loaded an updated.

* When memberof would iterate over leaf entries and update them one at a time. This mean a large number of small fragmented queries in the case of a lot of leaf entries being updated. Now leaf entries are updated in a single stripe once groups are stabilised.

* Member of would always trigger it's members to always update. Instead, we should only update members where a difference is observed, or all members if the group's memberof itself has changed since this needs to propogate to all leaf entries. This significantly reduces the amount of writes and operations to examine the changed member of set.

* Referential integrity would examine all reference uuids on entries for validity rather than just the reference uuids that were altered within the transaction. This change means that only uuids that were *added* are validated during an operation. 

* During async write backs (delayed actions) these were performed one at a time. Instead, when possible this should be done in a single transaction as the write transaction caches all writes in memory until the commit meaning that by batching we reduce overall latency.

* In the server there can only be one write transaction and many readers. These are guarded by tokio semaphores that act as fair queues - first in gets the lock next. Due to the design of the server readers would be blocked on the *database* semaphore, and writers would block on the write semaphore and THEN the database semaphore. This arrangement was creating a situation which unfairly advantaged readers over writers, as any write would first have to become the head of it's queue, and then compete with all readers to access a db transaction. Instead, we now have a reader semaphore with size threads minus 1, clamped at a minimum of 1. This means that provided there are two or more threads, then a writer will *always* have a database handle available, and readers will pre-queue with each other before queueing on the db ticket. If there is only one thread, then writes and reads will alternate between each other fairly.
2024-06-20 02:50:00 +00:00
Joshua M. Clulow e591b5f2cc
illumos support (#2838)
* disable mimalloc on illumos, in part because it immediately segfaults,
  but also because we prefer libumem and link it into all Rust binaries

* switch from fs2 (unmaintained crate) to fs4 which provides the same
  interface and has wider platform support
2024-06-15 05:20:11 +00:00
Firstyear 9c4e8bb90a
20240611 performance (#2836)
While basking under the shade of the coolabah tree, I was overcome by an intense desire to improve the performance and memory usage of Kanidm.

This pr reduces a major source of repeated small clones, lowers default log level in testing, removes some trace fields that are both large and probably shouldn't be traced, and also changes some lto settings for release builds.
2024-06-12 16:48:49 -07: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
James Hodgkinson 3c01a96348
Better WebAuthn and other error responses (#2608) 2024-06-05 09:57:16 +10:00
Firstyear 2c0ff46a32
20240530 nightly warnings (#2806)
* Cleaneup
* Lots of ram saving
2024-05-30 20:22:19 +10:00
Firstyear 1e7b94b7cf
Regrets Dot Pee Enn Gee (#2804)
Upgrade Axum

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-05-30 12:50:45 +10:00
James Hodgkinson 1d0a606e69
WIP: serialization and domain info setting wonkiness (#2791) 2024-05-28 11:49:30 +10: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
James Hodgkinson ff02ec2417
Don't need to check versions when there's an intermediary reporting connectivity issues (#2758)
* don't need to check versions when there's an intermediary reporting connectivity, skip it on 502 and 504
2024-05-14 02:47:39 +00:00
Firstyear 1fb8165825
Update Webauthn and Base64 (#2734) 2024-05-01 04:10:18 +00: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