Commit graph

37 commits

Author SHA1 Message Date
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
Firstyear faef3d0a4b
Fix issues with suspend reported by himmelblau (#2911) 2024-07-17 10:33:04 +10:00
James Hodgkinson 678937d955
Updating service type per kanidm/kanidm#2892 (#2898)
Co-authored-by: Firstyear <william@blackhats.net.au>
2024-07-15 10:48:17 +00:00
Georg a61038f400
Require kanidm-unixd before kanidm-unixd-tasks (#2687)
The kanidm-unixd-tasks service refuses to start before kanidm-unixd:

```
systemd[1]: Started Kanidm Local Tasks.
(xd_tasks)[29469]: kanidm-unixd-tasks.service: Failed to set up mount namespacing: /run/systemd/unit-root/run/kanidm-unixd: No such file or directory
(xd_tasks)[29469]: kanidm-unixd-tasks.service: Failed at step NAMESPACE spawning /usr/sbin/kanidm_unixd_tasks: No such file or directory
systemd[1]: kanidm-unixd-tasks.service: Main process exited, code=exited, status=226/NAMESPACE
systemd[1]: kanidm-unixd-tasks.service: Failed with result 'exit-code'.
```

Resolve this by ensuring kanidm-unixd gets activated as a dependency.
The ordering ("After") is already in place.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-03-29 05:23:13 +00:00
Firstyear 7b490d73dc
Allow /dev/tpmrm0 on older systemd versions (#2587)
Older systemd versions require a specific device allow for the tpm to be accessed.
2024-02-27 02:13:31 +00:00
Michel Le Bihan 1d34947ee9
Fix string comparison in Debian build script (#2409) 2024-02-21 02:13:20 +00: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
Firstyear 7a78cb8a80
Conflict nscd, start before sshd (#2539) 2024-02-16 02:24:37 +00:00
Jinna Kiisuo aa00ac94d0
Fix debian versioning (#2472)
* Make the ubuntu_docker_builder.sh script a bit easier to use

- Entrypoint that installs dependencies on launch
- Echo hint on how to build deb packages

* Change debian packaging version string format to fix sort order

The sort order is important so that newer packages are seen as an update
and get installed, instead of apt preferring the older versions!

With these changes, a package is generated as `kanidm_Ubuntu_22.04_1:1.1.0~rc.15-dev~202401311334+c8a9e2c_x86_64.deb`
with the version string `1:1.1.0~rc.15-dev~202401311334+c8a9e2c`

Deb package version string comparison is Complex:
https://man7.org/linux/man-pages/man7/deb-version.7.html

With the previous versioning scheme for dev packages, the git hash
ended up getting prioritized over the date string, see for example:
`dpkg --compare-versions 1.1.0-rc.15-dev-202401100453666448f lt 1.1.0-rc.15-dev-20240120072786916a3; echo $?`
-> 1 (comparison failure)

A simple schema change avoiding most dashes could rescue the hash trouble:
`dpkg --compare-versions 1.1.0~rc.15-dev-202401100453+666448f lt 1.1.0-rc.15-dev-202401200727+86916a3; echo $?`
-> 0 (comparison success)

.. But, the second problem is seeing a stable release as newer:
`dpkg --compare-versions 1.1.0~rc.15-dev~202401100453+666448f lt 1.1.0; echo $?`
-> 1 (comparison failure)

.. Which can be solved by forcing the entire dev portion to not be
interpreted as a debian version by substituting tildes:
`dpkg --compare-versions 1.1.0~rc.15-dev~202401100453+666448f lt 1.1.0; echo $?`
-> 0 (comparison success)

.. But, old schema versions still seem newer due to their debian
version:
`dpkg --compare-versions 1.1.0-rc.15-dev-202401100453666448f lt 1.1.0~rc.15-dev~202401200727+86916a3; echo $?`
-> 1 (comparison failure)

Thus, the only solution is to change the scheme and increment the epoch value once
to force all lesser default epoch versions to be seen as older:
`dpkg --compare-versions 1.1.0-rc.15-dev-202401100453666448f lt 1:1.1.0~rc.15-dev~202401200727+86916a3; echo $?`
-> 0 (comparison success)
`dpkg --compare-versions 1:1.1.0~rc.15-dev~202401200727+86916a3 lt 1:1.1.0; echo $?`
-> 0 (comparison success)

* Drop epoch field from deb filenames

GitHub Actions enforces NTFS compatible artifact filenames, ergo the
colon required for the epoch field is banned. The epoc is still in the
version field itself, just not in the filename.

---------

Co-authored-by: Jinna Kiisuo <jinna+git@nocturnal.fi>
2024-02-05 18:06:43 +10:00
James Hodgkinson c8bd1739f9
PyKanidm updates and testing (#2301)
* otel can eprintln kthx

* started python integration tests, features

* more tests more things

* adding heaps more things

* updating docs

* fixing python test

* fixing errors, updating integration test

* Add models for OAuth2, Person, ServiceAccount and add missing endpoints

* Alias Group to GroupInfo to keep it retrocompatible

* Fixed issues from review

* adding oauth2rs_get_basic_secret

* adding oauth2rs_get_basic_secret

* Fixed mypy issues

* adding more error logs

* updating test scripts and configs

* fixing tests and validating things

* more errors

---------

Co-authored-by: Dogeek <simon.bordeyne@gmail.com>
2024-01-31 03:27:43 +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
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
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
James Hodgkinson bca2fbcf4e
Unix crossbuild scripts and docs (#2326)
* can build now with cargo cross
2023-11-27 06:30:21 +00:00
Firstyear 060cb729a7
Expose TPM in more interface places (#2334) 2023-11-27 14:35:59 +10:00
Firstyear 545c04e74f
Add systemd deps for unixd (#2314) 2023-11-16 13:12:55 +10:00
jian c66a401b31
Reduce pam_kanidm's priority in Debian platforms (#2209)
`pam_kanidm` doesn't set AUTHTOK after reading from user input, so modules down the stack will have to ask for passwords redundantly. This is only a workaround, and might not be the desired behaviour in all cases.
2023-10-11 13:16:19 +10:00
James Hodgkinson 034ddd624a
Can't build kanidmd using the Ubuntu docker builder scripts - cleanup (#2154) 2023-09-27 14:08:20 +10:00
James Hodgkinson d5c1f9de6a
sqlite3 doesn't need to be installed on dev machines (#2104)
* Dependencies - sqlite3 dev no longer needs to be installed - Fixes #2083
* setting workspace-level features for rusqlite
2023-09-12 09:54:54 +10:00
Firstyear 54544075c1
Improve service file for host installs (#1901) 2023-07-25 12:23:47 +10:00
Yuxuan Lu 7cf8ff1e6f
Fix debian packaging (#1742)
* Fix debian package
* Fix mode on pam config
* Set up PAM by default
* Update platform/debian/kanidm-unixd/postinst

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-06-24 18:26:52 +10:00
Firstyear f3080df628
Implement tpm binding of cached password hashes (#1754) 2023-06-21 20:33:01 +10:00
Firstyear 32a7200305
Fix block_on in ssh authorised keys (#1752) 2023-06-19 15:02:09 +10:00
James Hodgkinson 2f4687765c
more more more unixd build fixes (#1573)
* fixing unix packaging
2023-04-26 15:42:23 +10:00
James Hodgkinson ec8e5dfc31
more-merge unixd commands (#1568)
* fixing unix packaging
* stripping out actions-rs/toolchain
* fixing an error in the qrcode def in cargo.toml
2023-04-25 22:36:17 +10:00
Firstyear e33beea89d
1399 cleanup cli docs (#1413)
* Cleanup cli args
* Update book
* Update wasm
* making the CI happy


---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2023-03-02 12:47:23 +10:00
Yuxuan Lu 251feac7cb
Fix debian build path (#1331)
* Update CONTRIBUTORS
* Fix debian & ubuntu packaging
* Use standard way to install pam config
* Fix simple_pkg.sh & add pam nss instructions
* Merge ssh with unixd; update CI to build for multiple os versions; upload packages to artifacts
2023-01-25 09:45:55 +10:00
kalebo 55ee2410d7
Add /etc/skel templating and notes adjacent to kanidm-unixd and packaging (#1113) 2022-11-04 09:49:11 +10:00
James Hodgkinson d179b23476
Systemd Unit Files in Deb packages (#1119)
* Adding systemd unit files for DEB packages, closes #1093
2022-10-12 13:17:04 +10:00
James Hodgkinson 3ca622e5f0
Ubuntu package unix lists wrong config (#1103)
* Ubuntu package unix lists wrong config
Fixes #1092

* fixes version detection in the Deb build scripts
2022-10-10 08:59:14 +10:00
James Hodgkinson b249747e55
.deb packaging config and scripting (#920)
* working on debian builds again
* github actions tweaks
* fixed a ref in the build script
* updating makefile targets to include build profile env
* updates to docs and makefiles
2022-07-20 17:21:40 +10:00
Firstyear f252d91e13
20220219 webui updates + source refactor + clippy go clip clip (#642) 2022-02-20 12:43:38 +10:00
James Hodgkinson e4d0f3ffbc
Fixes #528 - DynamicUser was set to kanidmd (#530) 2021-07-22 12:04:48 +10:00
cuberoot74088 d2e6186c15
471 add service files (#474) 2021-06-16 07:59:41 +10:00