Kanidm unix groundwork: posix login/admin groups, per-person SSH keys, unixd auth path #48

Open
opened 2026-11-07 23:47:51 +00:00 by ginjiruu · 1 comment
Owner

lab/machine-configs wants the Kanidm unix client on the thinks and pis (login with personal Kanidm accounts + SSH keys, admins mapped to wheel). The identities and groups that gate that login are Kanidm objects, so they belong in iac/kanidm/ Terraform, not in the NixOS module.

In kanidm/ Terraform

  • One posix login group (e.g. lab-unix, needs a gid). machine-configs lists it in unix.settings.kanidm.pam_allowed_login_groups; membership is the only thing that grants server ssh.
  • One unix admins group (e.g. lab-unix-admins). The machine-configs module maps it onto local wheel via unixd map_group; members get NOPASSWD root on the thinks and pis. Keep its membership deliberately small.
  • Per person: posix status enabled, at least one ssh_publickey, membership in the login group. Decide whether TF tracks the keys or people self-serve with kanidm person ssh add-publickey and TF only asserts at least one key exists.
  • unixd auth path: check whether the domain's anonymous access is enabled (unixd reads over anonymous by default). If it is off or gets disabled, create a service account, add it to idm_unix_authentication_read, and hand its token to machine-configs' sops (the file never enters the Nix store).

Done when

  • Both groups exist and are managed in Terraform
  • One named test person has posix + key + login-group membership end to end
  • The unixd auth path (anonymous vs service account) is decided and recorded on this issue
  • The admins group contains exactly the people who may hold root on the thinks and pis
> lab/machine-configs wants the Kanidm unix client on the thinks and pis (login with personal Kanidm accounts + SSH keys, admins mapped to wheel). The identities and groups that gate that login are Kanidm objects, so they belong in `iac/kanidm/` Terraform, not in the NixOS module. ## In kanidm/ Terraform - One posix login group (e.g. `lab-unix`, needs a gid). machine-configs lists it in `unix.settings.kanidm.pam_allowed_login_groups`; membership is the only thing that grants server ssh. - One unix admins group (e.g. `lab-unix-admins`). The machine-configs module maps it onto local `wheel` via unixd `map_group`; members get NOPASSWD root on the thinks and pis. Keep its membership deliberately small. - Per person: `posix` status enabled, at least one `ssh_publickey`, membership in the login group. Decide whether TF tracks the keys or people self-serve with `kanidm person ssh add-publickey` and TF only asserts at least one key exists. - unixd auth path: check whether the domain's anonymous access is enabled (unixd reads over anonymous by default). If it is off or gets disabled, create a service account, add it to `idm_unix_authentication_read`, and hand its token to machine-configs' sops (the file never enters the Nix store). ## Done when - [ ] Both groups exist and are managed in Terraform - [ ] One named test person has posix + key + login-group membership end to end - [ ] The unixd auth path (anonymous vs service account) is decided and recorded on this issue - [ ] The admins group contains exactly the people who may hold root on the thinks and pis
Author
Owner

Consumed by lab/machine-configs#17 (Kanidm unix client on thinks and pis).

Consumed by lab/machine-configs#17 (Kanidm unix client on thinks and pis).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/iac#48
No description provided.