Commit graph

64 commits

Author SHA1 Message Date
David Mulder bec8c9058c
Windows Hello Authentication requirements (#2688)
* Add keystore to unix_user_online_auth_init

Himmelblau needs this to check whether the device
is enrolled in the domain (via the presence of
TPM keys), to know whether to attempt Windows
Hello PIN auth, or to enroll first in the domain.

Signed-off-by: David Mulder <dmulder@samba.org>

* Implement PIN setup

After enrolling in a domain, Himmelblau will
prompt the user to choose a pin, which will be
the auth value for an associated Windows Hello
TPM key. We loop here until the values match.
Otherwise no validation is performed. Validation
can be done by the id provider, and can send an
additional request to PAM if the PIN is invalid.

Signed-off-by: David Mulder <dmulder@samba.org>

* Add Pin authentication

After setting up a Windows Hello pin, users can
authentication using this pin.

Signed-off-by: David Mulder <dmulder@samba.org>
2024-04-05 08:50:37 +10:00
Firstyear c09daa4643
kanidm unixd mfa capabilities (#2672)
Improve the support for the resolver to support MFA options with pam. This enables async task spawning and cancelation via the resolver backend as well. 

Co-authored-by: David Mulder <dmulder@samba.org>
2024-03-28 01:17:21 +00:00
Firstyear fbc021f487
20240221 2489 cleanup api v1 (#2573) 2024-02-27 09:25:02 +00: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
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 84b2c4956d
Removing unused constant and updating docstring for LDAP bind address (#2556) 2024-02-20 11:10:02 +10:00
Firstyear cc28fb2c4b
Re-enable HW tpm support (#2531) 2024-02-17 01:30:08 +00:00
Firstyear 62dff7565e
Add further hardening for system services (#2542) 2024-02-17 00:11:32 +00:00
David Mulder a315d8d440
Himmelblau requires the machine key for unix_user_get (#2523)
I need access to the machine key here in order to
send a new request to Azure for user details.

Signed-off-by: David Mulder <dmulder@samba.org>
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-02-13 01:11:30 +00:00
James Hodgkinson cf87993a1c
Debian build fixes (also the book) (#2400)
* betterer errors on things
* Adding tpm-udev as a dependency of kanidm-unixd
* fixing makefile arch error
* adding jq to deb build deps
* adding kanidm deb to autobuild
* making the debian build script more resilient
2024-01-16 01:30:52 +00:00
David Mulder 53ef2552e1
idprovider: Provide the keystore during auth (#2385)
Himmelblau requires access to the keystore at
auth time in order to store the id key modified
during a device join.

Signed-off-by: David Mulder <dmulder@samba.org>
Co-authored-by: Firstyear <william@blackhats.net.au>
2023-12-22 17:06:25 +00:00
David Mulder dfc4bb5b25
db: Fix insert_tagged_hsm_key doesn't cache the hsm key (#2389)
Signed-off-by: David Mulder <dmulder@samba.org>
Co-authored-by: Firstyear <william@blackhats.net.au>
2023-12-21 23:14:03 +00:00
David Mulder bb6709d88a
daemon: Fix inverted logic on cache dir check (#2388)
Signed-off-by: David Mulder <dmulder@samba.org>
2023-12-22 08:43:32 +10:00
James Hodgkinson cbadf0af9b
Unixd build/debugging updates (#2350)
* noisy for no reason message
* updating build script to include unix modules
* adding restart config for kanidm systemd services
2023-12-03 06:34:02 +00:00
Firstyear 85022e5e8a
Fix handling of TPM in some trait contexts (#2347) 2023-12-03 05:33:25 +00:00
Firstyear 4b097d8fdc
Expose machine key in auth phase (#2340) 2023-11-29 14:59:16 +10:00
Firstyear 060cb729a7
Expose TPM in more interface places (#2334) 2023-11-27 14:35:59 +10:00
James Hodgkinson c1f1720ee2
Adding kanidm client config docs and notes ref #2248 (#2333) 2023-11-25 09:55:54 +10:00
James Hodgkinson 24c4f15b5e
Better errors when TPM PIN file not found (#2330) 2023-11-23 23:16:20 +00:00
Firstyear bb8914c70d
20231120 2320 sssd compat (#2328) 2023-11-22 10:18:03 +10:00
Firstyear 6dc8f1db3a
Resolve future send issue with keystore (#2311) 2023-11-20 12:46:52 +10:00
Firstyear 3bd2cc8a9f
20231101 add id cert to unixint (#2284) 2023-11-09 13:11:23 +10:00
Firstyear 88da55260a
Add file diagnosis (#2210) 2023-10-12 12:09:54 +10:00
James Hodgkinson 19f9fde012
Thread naming and display (#2190)
* sometimes handlers fail
* enums are better than strings
* clippyisms
2023-10-08 13:08:46 +10:00
James Hodgkinson a239fbdd94
Yaleman/issue989 (#2111)
* adding version command to ssh_authorizedkys
* adding version and help to kanidm_unixd_tasks
2023-09-16 14:22:03 +10:00
David Mulder 8401c3e1c8
Implement DeviceAuthorizationGrant for MFA (#2079)
Himmelblau will use the DeviceAuthorizationGrant
(defined in RFC8628) to perform MFA. This commit
adds the bits to Kanidm to make that possible,
using the new pam state machine code.

Signed-off-by: David Mulder <dmulder@samba.org>
2023-09-13 07:33:46 +10:00
Firstyear da56738dea
pam multistep auth state machine (#2022)
Himmelblau needs to maintain some data about the state of an authentication across the course of pam exchanges.

Signed-off-by: David Mulder <dmulder@samba.org>
Co-authored-by: David Mulder <dmulder@samba.org>
2023-08-28 09:27:29 +10:00
Firstyear cb2136cf26
Resolve incorrect time units on timeout (#2014) 2023-08-21 14:14:32 +10:00
Firstyear 87866c568b
1982 service account access (#1985)
* Fix issue with incorrect filter class preventing service account delete
2023-08-16 15:33:28 +10:00
James Hodgkinson 83f189fed3
error handling and web server logging fixes (#1960)
* Fixing the setup_dev_environment script
* clippy calming
* handle_internalunixusertokenread throwing 500's without context
Fixes #1958
2023-08-14 20:47:49 +10:00
David Mulder 498be4f08a
resolver: Himmelblau needs old token for refresh (#1962)
Himmelblau needs access to the old token during
a refresh otherwise the GECOS is lost (AAD
responds with everything we need except GECOS).

Signed-off-by: David Mulder <dmulder@samba.org>
2023-08-10 07:36:36 +10:00
Firstyear 270b9f8ef2
Resolve build failiures when selinux is enabled (#1927) 2023-08-01 19:08:21 +10:00
Firstyear cccc20ea42
20230731 release (#1921)
* Cleanup how we check for last git commit to avoid an insecure dep
* Resolve unmaintained or old deps
* Fix ci
2023-07-31 22:27:21 +10:00
Firstyear 62ce42f8c1
Improve default shells for distros (#1920) 2023-07-31 14:58:27 +10:00
Firstyear d731b20a9d
20230728 techdebt paydown (#1909) 2023-07-31 12:20:52 +10:00
Firstyear 99b761c966
20230727 unix int modularity (#1907) 2023-07-28 10:48:56 +10:00
Firstyear 9bcd8d4737
Resolve compilation issue with tpm enabled on linux (#1902) 2023-07-25 13:12:57 +10:00
Firstyear 046a6fb298
20230720 unix int modular (#1881)
* Progress
* Db traits mostly sorted, need to get dyn working next
* updoot
2023-07-24 00:10:37 -07:00
Firstyear e17dcc0ddb
1788 admin unix socket (#1880) 2023-07-24 10:05:10 +10:00
James Hodgkinson 5cd62eb974
Upgraded clap, removing atty as a dependency (#1849)
* upgraded clap, removing atty as a dependency
* changing the PR template so when you add a list up the top it doesn't break the bottom
2023-07-13 12:19:28 +10:00
Firstyear 07580cf57a
Improve selinux in tasks daemon (#1847) 2023-07-11 15:39:28 +10:00
Firstyear 6e01c4802f
Resolve issue with order of operations causing group memberships to disappear (#1845) 2023-07-10 16:59:15 +10:00
David Mulder 76b868b4d3
Fix a typo in the unix daemon debug (#1822)
Signed-off-by: David Mulder <dmulder@samba.org>
2023-07-10 10:58:35 +10:00
James Hodgkinson cc35654388
Converting from tide to axum (#1797)
* Starting to chase down testing
* commenting out unused/inactive endpoints, adding more tests
* clippyism
* making clippy happy v2
* testing when things are not right
* moar checkpoint
* splitting up testkit things a bit
* moving https -> tide
* mad lad be crabbin
* spawning like a frog
* something something different spawning
* woot it works ish
* more server things
* adding version header to requests
* adding kopid_middleware
* well that was supposed to be an hour... four later
* more nonsense
* carrying on with the conversion
* first pass through the conversion is DONE!
* less pub more better
* session storage works better, fixed some paths
* axum-csp version thing
* try a typedheader
* better openssl config things
* updating lockfile
* http2
* actually sending JSON when we say we will!
* just about to do something dumb
* flargl
* more yak shaving
* So many clippy-isms, fixing up a query handler bleep bloop
* So many clippy-isms, fixing up a query handler bleep bloop
* fmt
* all tests pass including basic web logins and nav
* so much clippyism
* stripping out old comments
* fmt
* commenty things
* stripping out tide
* updates
* de-tiding things
* fmt
* adding optional header matching ,thanks @cuberoot74088
* oauth2 stuff to match #1807 but in axum
* CLIPPY IS FINALLY SATED
* moving scim from /v1/scim to /scim
* one day clippy will make sense
* cleanups
* removing sketching middleware
* cleanup, strip a broken test endpoint (routemap), more clippy
* docs fmt
* pulling axum-csp from the wrong cargo.toml
* docs fmt
* fmt fixes
2023-07-05 22:26:39 +10:00
Firstyear 12121bae37
Improve tasks daemon shutdown (#1806) 2023-07-04 15:53:48 +10:00
Firstyear 0425122ba3
20230629 tpm keygen ... again (#1793) 2023-06-30 12:41:32 +10:00
Firstyear b752ab65b8
20230628 tpm minor issue with key regen (#1790)
* Ignore key that cant be loaded
* fix handle
2023-06-28 18:34:03 +10:00
Firstyear 23eb4283e9
Improve tpm key generation - improve unix config for tpms. (#1782) 2023-06-27 10:09:19 +10:00
Firstyear a20dd3b113
Remove r2d2 - sad beep noises (#1766) 2023-06-24 16:15:31 +10:00
Firstyear f3080df628
Implement tpm binding of cached password hashes (#1754) 2023-06-21 20:33:01 +10:00