Skip to content

Commit bddeabc

Browse files
committed
smoketest: T7483: Add fido ssh smoketest
1 parent 2e739ed commit bddeabc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

smoketest/scripts/cli/test_service_ssh.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,5 +495,22 @@ def test_ssh_trusted_user_ca(self):
495495
self.assertNotIn('none', authorize_principals_file_config)
496496
self.assertFalse(os.path.exists(f'/home/{test_user}/.ssh/authorized_principals'))
497497

498+
def test_ssh_fido(self):
499+
# Order does matter for this test because of how the template
500+
# collects and maps the options.
501+
opt_map = {
502+
'pin-required': 'verify-required',
503+
'touch-required': 'touch-required',
504+
}
505+
expected = 'PubkeyAuthOptions '
506+
for k, v in opt_map.items():
507+
self.cli_set(base_path + ['fido', k])
508+
expected = f'{expected}{v},'
509+
expected = expected[:-1]
510+
self.cli_commit()
511+
tmp_sshd_conf = read_file(SSHD_CONF)
512+
self.assertIn(expected, tmp_sshd_conf)
513+
514+
498515
if __name__ == '__main__':
499516
unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on())

0 commit comments

Comments
 (0)