NixOS must store only encrypted representations of passwords.
An XCCDF Rule
Description
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.
- ID
- SV-268130r1039278_rule
- Version
- ANIX-00-000770
- Severity
- High
- References
- Updated
Remediation Templates
A Manual Procedure
Configure NixOS to store only encrypted representations of passwords.
Add/modify /etc/nixos/configuration.nix to include the following lines:
environment.etc."login.defs".text = pkgs.lib.mkForce ''
ENCRYPT_METHOD SHA256