File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff 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+
498515if __name__ == '__main__' :
499516 unittest .main (verbosity = 2 , failfast = VyOSUnitTestSHIM .TestCase .debug_on ())
You can’t perform that action at this time.
0 commit comments