summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-01-17 09:54:08 +0100
committerGitHub <noreply@github.com>2026-01-17 09:54:08 +0100
commit0868f3dc7246ea44a1765cee04649cd08c188982 (patch)
tree20d4777afdd5deb059b68649abea063d1555a7f1 /smoketest/scripts/cli
parent240123722abf90e0d6bbe46efc81895fbc75825b (diff)
parent2473e1bfdeeb0ea7cc47a14811c29cc4801c8038 (diff)
downloadvyos-1x-0868f3dc7246ea44a1765cee04649cd08c188982.tar.gz
vyos-1x-0868f3dc7246ea44a1765cee04649cd08c188982.zip
Merge pull request #4852 from scj643/ssh-fido2-options
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())