2021-11-27 09:04:28 +01:00
|
|
|
import ../make-test-python.nix ({ ... }:
|
2019-01-29 17:45:26 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "pam-u2f";
|
|
|
|
|
2022-03-21 00:15:30 +01:00
|
|
|
nodes.machine =
|
2019-01-29 17:45:26 +01:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
security.pam.u2f = {
|
|
|
|
control = "required";
|
|
|
|
cue = true;
|
|
|
|
debug = true;
|
|
|
|
enable = true;
|
|
|
|
interactive = true;
|
2022-04-06 12:23:17 +02:00
|
|
|
origin = "nixos-test";
|
2019-01-29 17:45:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
2019-12-07 23:16:59 +01:00
|
|
|
machine.wait_for_unit("multi-user.target")
|
|
|
|
machine.succeed(
|
2022-04-06 12:23:17 +02:00
|
|
|
'egrep "auth required .*/lib/security/pam_u2f.so.*debug.*interactive.*cue.*origin=nixos-test" /etc/pam.d/ -R'
|
2019-12-07 23:16:59 +01:00
|
|
|
)
|
2019-01-29 17:45:26 +01:00
|
|
|
'';
|
|
|
|
})
|