Commit graph

12 commits

Author SHA1 Message Date
William Brown debaf002bf Unify unix config parser 2025-04-05 13:44:28 +10:00
Firstyear 82a883089f
Allow versioning of server configs ()
This allows our server configuration to be versioned, in preparation
for a change related to the proxy protocol additions.
2025-04-02 02:44:19 +00:00
Firstyear b88b6923eb
20250313 unixd system cache ()
The implementation of the unixd cache relies on inotify to detect changes to files in /etc so that we know when to reload the data for nss/passwd. However, the way that groupadd/del and other tools work is they copy the file, change it, and then move it into place. It turns out that william of the past didn't realise that inotify works on inodes not paths like other tools do (auditctl for example).

As a result, when something modified /etc/group or another related file, the removal was seen, but this breaks notifications on any future change until you reload unixd.

To resolve this we need to recursively watch /etc with inotify - yep, that's correct. We have to watch everything in /etc for changes because it's the only way to pick up on the add/remove of files. But because we have to watch everything, we need permissions to watch everything.

This forces us to move the parsing of the etc passwd/group/shadow files to the unixd tasks daemon - arguably, this is the correct place to read these anyway since that is a high priv (and locked down) daemon. Because of this, we actually end up solving the missing "shadow" group on debian issue, and probably similar on the BSD's in future.

In order to make my life easier while testing I also threw in a makefile that symlinks the files to needed locations for testing. It has plenty of warnings as it should.

Fixes 
Fixes 
Fixes 
2025-03-14 13:46:26 +10:00
Firstyear 63deda350c
20250225 improve test performance ()
* Ignore tests that are no longer used.

Each time a library or binary is added, that requires compilation to create
the *empty* test harness, which then is executed and takes multiple seconds
to start up, do nothing, and return success.

This removes test's for libraries that aren't actually using or running
any tests.

Additionally, each time a new test binary is added, that adds a ton of
compilation time, but also test execution time as the binary for each
test runner must start up, execute, and shutdown. So this merges all
the testkit integration tests to a single running which significantly
speeds up test execution.

* Improve IDL exists behaviour, improve memberof verification

Again to improve test performance. This improves the validation of idx
existance to be a faster SQLite call, caches the results as needed.

Memberof was taking up a large amount of time in verify phases of test
finalisation, and so a better in memory version has been added.

* Disable TLS native roots when not needed

* Cleanup tests that are hitting native certs, or do nothing at all
2025-03-04 10:36:53 +10:00
Firstyear 50e513b30b
Add nss testframework and fallback when daemon offline () 2024-10-15 04:05:51 +00:00
Firstyear 20b2d40215
Add support for group extension () 2024-10-03 06:33:56 +00:00
Firstyear cf63c6b98b
Complete the implementation of the posix account cache ()
Allow caching and checking of shadow entries (passwords)
    Cache and serve system id's
    improve some security warnings
    prepare for multi-resolver
    Allow the kanidm provider to be not configured
    Allow group extension
2024-10-02 02:12:13 +00:00
James Hodgkinson 3eae7be0bb
OAuth2 Token Type ()
* fix(OAuth2): Invalid `token_type` for token introspection
Fixes 

* fix(aut): `assert_eq` instead of `assert ==`

* fix(OAuth2): IANA registry access token types

* fix(OAuth2): deserialize case insensitively
2024-08-25 23:30:20 +00:00
James Hodgkinson 7c3deab2c4
enforcen den clippen ()
* enforcen den clippen
* updating outdated oauth2-related docs
* sorry clippy, we tried
2024-08-21 00:32:56 +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
Firstyear 0836118443
20240716 check mkdir () 2024-07-17 01:11:11 +00:00
Firstyear 0ce333ff5a
Allow providers to be box dyn ()
* Allow providers to be box dyn in kanidm_unixd
* Massive refactor
2024-06-16 22:21:25 +00:00
Renamed from unix_integration/tests/cache_layer_test.rs (Browse further)