From 112386f76a4e3bfec9962013ac8ebaadf950ff6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Fri, 24 Jul 2020 15:18:29 +0200 Subject: [PATCH] ipatests: test_commands: test_ssh_from_controller: Paramiko=>OpenSSH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Paramiko is not compatible with FIPS. Migrate test_ssh_from_controller to the OpenSSH CLI SSH(1). Rationale: this is exactly what clients use. Fixes: https://pagure.io/freeipa/issue/8129 Signed-off-by: François Cami Reviewed-By: Mohammad Rizwan Reviewed-By: Michal Polovka --- ipatests/test_integration/test_commands.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ipatests/test_integration/test_commands.py b/ipatests/test_integration/test_commands.py index f358962c7..d5269ce21 100644 --- a/ipatests/test_integration/test_commands.py +++ b/ipatests/test_integration/test_commands.py @@ -893,8 +893,6 @@ class TestIPACommand(IntegrationTest): 3. add an ipa user 4. ssh from controller to master using the user created in step 3 """ - if self.master.is_fips_mode: # pylint: disable=no-member - pytest.skip("paramiko is not compatible with FIPS mode") cmd = self.master.run_command(['sssd', '--version']) sssd_version = platform_tasks.parse_ipa_version( @@ -926,12 +924,11 @@ class TestIPACommand(IntegrationTest): ) tasks.kdestroy_all(self.master) - client = paramiko.SSHClient() - client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - client.connect(self.master.hostname, - username=test_user, - password=password) - client.close() + tasks.run_ssh_cmd( + to_host=self.master.external_hostname, username=test_user, + auth_method="password", password=password + ) + finally: sssd_conf_backup.restore() self.master.run_command(['systemctl', 'restart', 'sssd.service'])