2021-12-06 16:07:01 +00:00
|
|
|
import ../make-test-python.nix ({ ... }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "pam-u2f";
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nodes.machine =
|
2020-04-24 23:36:52 +00:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
security.pam.u2f = {
|
|
|
|
control = "required";
|
|
|
|
cue = true;
|
|
|
|
debug = true;
|
|
|
|
enable = true;
|
|
|
|
interactive = true;
|
2022-07-18 16:21:45 +00:00
|
|
|
origin = "nixos-test";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
machine.wait_for_unit("multi-user.target")
|
|
|
|
machine.succeed(
|
2022-07-18 16:21:45 +00:00
|
|
|
'egrep "auth required .*/lib/security/pam_u2f.so.*debug.*interactive.*cue.*origin=nixos-test" /etc/pam.d/ -R'
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
})
|