Skip to content

Commit

Permalink
Tests: alltests/test_krb5: Replace files provider
Browse files Browse the repository at this point in the history
Replace files provider with proxy provider.
This test case test authentication of local user using
kerberos and also update the authselect to select sssd only.

Signed-off-by: Madhuri Upadhye <[email protected]>
  • Loading branch information
madhuriupadhye committed Mar 21, 2024
1 parent 3788f48 commit cf589fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/tests/multihost/alltests/test_krb5.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from __future__ import print_function
import pytest
from sssd.testlib.common.utils import sssdTools
from sssd.testlib.common.ssh2_python import check_login_client
from sssd.testlib.common.ssh2_python import check_login_client, check_login_client_bool


@pytest.mark.usefixtures('setup_sssd_krb', 'create_posix_usersgroups')
Expand All @@ -33,7 +33,9 @@ def test_0001_krb5_not_working_based_on_k5login(self,
'with-files-access-provider')
multihost.client[0].service_sssd('stop')
client_tool = sssdTools(multihost.client[0])
domain_params = {'id_provider': 'files',
domain_params = {'proxy_lib_name': 'files',
'passwd_files': '/etc/passwd',
'proxy_pam_target': 'sssd-shadowutils',
'access_provider': 'krb5'}
client_tool.sssd_conf('domain/example1', domain_params)
dmain_delete = {"ldap_user_home_directory": "/home/%u",
Expand All @@ -49,10 +51,10 @@ def test_0001_krb5_not_working_based_on_k5login(self,
multihost.client[0].run_command(f'chgrp {user} /home/{user}/.k5login')
multihost.client[0].run_command(f'chmod 664 /home/{user}/.k5login')
multihost.client[0].service_sssd('restart')
with pytest.raises(Exception):
check_login_client(multihost, user, 'Secret123')
ssh = check_login_client_bool(multihost, user, "Secret123")
multihost.client[0].run_command(f'rm -vf /home/{user}/.k5login')
multihost.client[0].service_sssd('restart')
assert ssh, f"{user} is not able to login"
check_login_client(multihost, user, 'Secret123')
multihost.client[0].run_command('authselect select sssd')

Expand Down

0 comments on commit cf589fb

Please sign in to comment.