Skip to content

Commit d2023f1

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

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

smoketest/scripts/cli/test_service_ssh.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,5 +495,20 @@ 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 = {'pin-required': 'verify-required',
502+
'touch-required': 'touch-required'}
503+
expected = 'PubkeyAuthOptions '
504+
for k, v in opt_map.items():
505+
self.cli_set(base_path + ['fido', k])
506+
expected = f'{expected}{v},'
507+
expected = expected[:-1]
508+
self.cli_commit()
509+
tmp_sshd_conf = read_file(SSHD_CONF)
510+
self.assertIn(expected, tmp_sshd_conf)
511+
512+
498513
if __name__ == '__main__':
499514
unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on())

0 commit comments

Comments
 (0)