From 13ba531fd9b4e462fa37235862337c82eafa9cde Mon Sep 17 00:00:00 2001 From: Jan Pavlicek <469355@mail.muni.cz> Date: Wed, 23 Aug 2023 13:40:16 +0200 Subject: [PATCH] fix: check_saml totp form detection, response message with --skip_logout_check argument --- perun/proxy/utils/nagios/check_saml.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/perun/proxy/utils/nagios/check_saml.py b/perun/proxy/utils/nagios/check_saml.py index 269638a..530d6d6 100755 --- a/perun/proxy/utils/nagios/check_saml.py +++ b/perun/proxy/utils/nagios/check_saml.py @@ -315,7 +315,7 @@ class SAMLChecker: print(response_html) # MFA - if "TOTP" in response_html or "privacyIDEA" in response_html: + if "totp" in response_html.lower() or "privacyidea" in response_html.lower(): if self.args.verbose >= 1: print("MFA is required") totp_form_action, totp_form_data = parse_form(response_html) @@ -521,11 +521,11 @@ class SAMLChecker: "CRITICAL", ) - self.finish( - "Authentication took {:.2f} seconds".format(elapsed_seconds), - status, - auth_time=elapsed_seconds, - ) + self.finish( + "Authentication took {:.2f} seconds".format(elapsed_seconds), + status, + auth_time=elapsed_seconds, + ) def __init__(self, args): self.args = args -- GitLab