NixOS must require users to reauthenticate for privilege escalation.
Severity | Group ID | Group Title | Version | Rule ID | Date | STIG Version |
---|---|---|---|---|---|---|
medium | V-268155 | SRG-OS-000480-GPOS-00227 | ANIX-00-001500 | SV-268155r1039536_rule | 2024-10-25 | 1 |
Description |
---|
Without reauthentication, users may access resources or perform tasks for which they do not have authorization. When operating systems provide the capability to escalate a functional capability, it is critical the user reauthenticate. |
ℹ️ Check |
---|
Verify NixOS enforces reauthentication with sudo with the following command: $ sudo grep timestamp_timeout /etc/sudoers Defaults timestamp_timeout=0 If "timestamp_timeout" is greater than 0, is commented out, or is missing, this is a finding. |
✔️ Fix |
---|
Configure /etc/nixos/configuration.nix to enforce reauthentication with sudo by adding the following configuration settings: security.sudo.extraConfig = '' Defaults timestamp_timeout=0 ''; Rebuild the system with the following command: $ sudo nixos-rebuild switch |