summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChloe Surett <chloe@surett.me>2025-11-17 11:57:09 -0500
committerChristian Breunig <christian@breunig.cc>2026-01-15 16:25:45 +0100
commit2473e1bfdeeb0ea7cc47a14811c29cc4801c8038 (patch)
tree8bb10b93d70a567f1f0e24bb2625a12e310cb48a /smoketest/scripts/cli
parent0c373c7c9cf0fff573e5acc5642f6af63c311da2 (diff)
downloadvyos-1x-2473e1bfdeeb0ea7cc47a14811c29cc4801c8038.tar.gz
vyos-1x-2473e1bfdeeb0ea7cc47a14811c29cc4801c8038.zip
ssh: T7483: Add fido2 PubkeyAuthOptions
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_service_ssh.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py
index 8cd4a2178..72f828093 100755
--- a/smoketest/scripts/cli/test_service_ssh.py
+++ b/smoketest/scripts/cli/test_service_ssh.py
@@ -494,5 +494,22 @@ class TestServiceSSH(VyOSUnitTestSHIM.TestCase):
self.assertNotIn('none', authorize_principals_file_config)
self.assertFalse(os.path.exists(f'/home/{test_user}/.ssh/authorized_principals'))
+ def test_ssh_fido(self):
+ # Order does matter for this test because of how the template
+ # collects and maps the options.
+ opt_map = {
+ 'pin-required': 'verify-required',
+ 'touch-required': 'touch-required',
+ }
+ expected = 'PubkeyAuthOptions '
+ for k, v in opt_map.items():
+ self.cli_set(base_path + ['fido', k])
+ expected = f'{expected}{v} '
+ expected = expected[:-1]
+ self.cli_commit()
+ tmp_sshd_conf = read_file(SSHD_CONF)
+ self.assertIn(expected, tmp_sshd_conf)
+
+
if __name__ == '__main__':
unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on())