Fully declarative users with encrypted passwords (opt-in) #9
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Discussion
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Help Wanted
Status
Need More Info
Prio - Hoog
Prio - Laag
Prio - Middel
styling
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MinBZK/DAWO-NixOS#9
Loading…
Add table
Add a link
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?
What's missing
users-dawotoday usesinitialHashedPassword, i.e. the password hash sits ina
.nixfile and ends up world-readable in the Nix store, andmutableUsersis left at its default so accounts can drift at runtime (
useradd/passwdonthe device). For a government workstation you want users fully as code, no
drift, and password material that isn't readable in the store.
Proposal
An opt-in
users-hardenedmodule that setsmutableUsers = false(nothingoutside git), plus a documented per-user inventory pattern:
modules/users/<name>.nix, one file per user (the inventory), like theexisting
users-dawomachine->user mapping
hashedPasswordFileinstead of a hash in git, agenix isalready wired through the environment module
docs/users.mddocuments the add-a-user flow, the agenix step(
mkpasswd -m yescrypt->agenix -e), the admin/sudo pattern (wheel, plusnixos-pam-u2ffor strong auth), and the SSH-only superadmin pattern.Norm: BIO access management + gitops.
Note
Enabling
users-hardenedis lockout-risk: withmutableUsers = falseeverylogin user needs a
hashedPasswordFile/hashedPassword(notinitialHashedPassword). Migrate first, test on a canary, keep a recovery path.That's why it's opt-in and
users-dawois left as-is for now.Question
Welcome upstream? And is
users-hardenedthe right name / shape for themutableUsers-false switch?
It's a great suggestion to be sure. I'd like to see some options in this blocks repo:
Thanks, for now LDAP and SSSD seem org specific. What you want to use is greatly dependent on the orgs (IdP, IAM stack).
Difficult to make generic. What we could do is multiple modules for popular sign in options? (more maintenance on our end)
Example users I'll add.