From 396220652a3a4ec5f759035ea91d0913783ebb89 Mon Sep 17 00:00:00 2001 From: Lukas Hellebrandt Date: Fri, 5 Apr 2024 16:47:33 +0200 Subject: [PATCH] Fix TOTP generation. Fix what commit a5a5cd9e5e broke. --- tests/foreman/destructive/test_ldap_authentication.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/foreman/destructive/test_ldap_authentication.py b/tests/foreman/destructive/test_ldap_authentication.py index 3a8468de3d0..5ebe2bde430 100644 --- a/tests/foreman/destructive/test_ldap_authentication.py +++ b/tests/foreman/destructive/test_ldap_authentication.py @@ -129,7 +129,7 @@ def configure_hammer_session(parametrized_enrolled_sat, enable=True): def generate_otp(secret): """Return the time_based_otp""" - time_otp = pyotp.TOTP(secret) + time_otp = pyotp.TOTP(secret, digest='SHA1', digits=6, interval=120) return time_otp.now() @@ -565,7 +565,9 @@ def test_user_permissions_rhsso_user_multiple_group( assert login_details['username'] in current_user -def test_totp_user_login(ad_data, module_target_sat): +def test_totp_user_login( + enable_external_auth_rhsso, rhsso_setting_setup, ad_data, module_target_sat +): """Verify the TOTP authentication of LDAP user interlinked with RH-SSO :id: cf8dfa00-4f48-11eb-b7d5-d46d6dd3b5b2