Kanidm unix client on thinks and pis: SSH login with personal Kanidm accounts #17
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/machine-configs#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Server-side groundwork is lab/iac#48 (Kanidm Terraform): the posix groups, per-person SSH keys, and the unixd auth path must exist before the fleet rolls this on.
The module
modules/kanidm-unix.nix→services-kanidm-unix, option-gated, enabled on think-01..03 and pi-01..04 only. mini-01, game-01, and test-01 stay off; enabling them later is one line per host. The installer image never carries it: the recovery path cannot depend on the IdP.services.kanidmmodule already provides the client half (unix.enableneeds noserver.enable): unixd + tasks units,/etc/kanidm/{config,unixd}, NSS ordering (kanidmbeforefiles),pam_kanidmin every service stack, andunix.sshIntegrationwiringAuthorizedKeysCommandthrough the setuidkanidm_ssh_authorizedkeyswrapper. This block configures it, it does not reimplement it.client.settings.uri = https://auth.animeteamspeak.moe(unixd reads it even withoutclient.enable).unix.settings.kanidm.pam_allowed_login_groups = [<login group>]. Login is opt-in; a Kanidm web user gets nothing by existing.map_groupmaps the Kanidm admins group onto localwheel. WithwheelNeedsPassword = false, mapped people get NOPASSWD root.services.kanidm.package = pkgs.kanidm_1_xto the same minor as the kanidm-mini image in flux-clusters. The barekanidmalias is gone in this pin.adminkeeps working (sshd checksAuthorizedKeysFilebeforeAuthorizedKeysCommand),PasswordAuthenticationstays off, Kanidm people live in NSS only,users.mutableUsersstays false.Fleet hazards
task cache:push HOSTS='pi-01 pi-02 pi-03 pi-04'thentask comin:retry, same drill as the cross kernel (AGENTS.md).base.nixforcessecurity.pam.services.sshd.startSession = false. Theaccountstack still gates login, but first-login home-dir creation must be proven over plainssh(tasks daemon), not only at a console.admin(1000).task vm:e2e), then one think, then the rest,task fleet:statusto 7/7.Done when
services-kanidm-unixexists, enabled on thinks+pis onlyadminkey works with kanidmd unreachablefleet:status7/7docs/kanidm-unix.md: grant and revoke procedure