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