Skip to content

inventory, common: drop the example password hashes - #20

Open
QuentinCazier wants to merge 1 commit into
cloud-gouv:mainfrom
QuentinCazier:remove-example-passwords
Open

QuentinCazier wants to merge 1 commit into
cloud-gouv:mainfrom
QuentinCazier:remove-example-passwords

Conversation

@QuentinCazier

Copy link
Copy Markdown

Closes #16

Bureautix authenticates with FIDO2 keys (LUKS FIDO2 plus PAM U2F), so the example should not ship accounts with a known password.

  • inventory/users/*.nix: the hashedPassword lines (password test) are replaced by the u2f_keys field, with the pamu2fcfg command to fill it, as in common/admins.nix.
  • common/superadmins.nix: root gets a locked password (!). Remote access goes through the superadmin SSH keys. The value stays explicit so the installer keeps passing --no-root-password to nixos-install.
  • common/pam_u2f.nix: users.allowNoPasswordLogin = true. With users.mutableUsers = false, NixOS refuses to build a system where neither root nor a wheel account has a password or an SSH key, and it does not count PAM U2F. Since no account is meant to have a password, the check is turned off next to the authentication settings.

Checks

nix-instantiate -A toplevelRegistry (every terminal of the inventory) and -A usb-installer succeed with the change. -A net-installer already fails on main with "The option securix.pam does not exist", independently of this change. nixfmt, statix and reuse pass.

Bureautix authenticates with FIDO2 keys, so the example should not ship
accounts with a known password. The user files now show the u2f_keys
field instead, root gets a locked password and the NixOS check that
requires a password or an SSH key on root or a wheel account is turned
off explicitly, since no account is meant to have one.

Closes cloud-gouv#16

Signed-off-by: Quentin Cazier <cazierquentin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing password hash from example

1 participant