From e44feac7d637f9036751485efe0d4b4b8d05b361 Mon Sep 17 00:00:00 2001 From: Pavel Vyskocil Date: Mon, 1 Mar 2021 13:09:45 +0100 Subject: [PATCH 1/2] Remove fix IP address for testing --- nagios/proxy_idp_auth_test_script/oidc_auth_test_aai.sh | 1 - nagios/proxy_idp_auth_test_script/saml_auth_test_aai.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/nagios/proxy_idp_auth_test_script/oidc_auth_test_aai.sh b/nagios/proxy_idp_auth_test_script/oidc_auth_test_aai.sh index 901e7c7..926795c 100755 --- a/nagios/proxy_idp_auth_test_script/oidc_auth_test_aai.sh +++ b/nagios/proxy_idp_auth_test_script/oidc_auth_test_aai.sh @@ -20,7 +20,6 @@ BASENAME=$(basename $0) ## Get host IP IP=($(hostname -I)) -IP="78.128.216.77" TEST_SITE=$1 diff --git a/nagios/proxy_idp_auth_test_script/saml_auth_test_aai.sh b/nagios/proxy_idp_auth_test_script/saml_auth_test_aai.sh index b1f9cc9..a05512d 100755 --- a/nagios/proxy_idp_auth_test_script/saml_auth_test_aai.sh +++ b/nagios/proxy_idp_auth_test_script/saml_auth_test_aai.sh @@ -20,7 +20,6 @@ BASENAME=$(basename $0) ## Get host IP IP=($(hostname -I)) -IP="78.128.216.77" TEST_SITE=$1 LOGIN_SITE=$2 From b851c3080f3914a7ae163c87cb0b378c83cc1ed0 Mon Sep 17 00:00:00 2001 From: Pavel Vyskocil Date: Mon, 1 Mar 2021 13:16:11 +0100 Subject: [PATCH 2/2] Fix return response for unsuccessful sign in --- nagios/proxy_idp_auth_test_oidc.sh | 6 ++++-- nagios/proxy_idp_auth_test_saml.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nagios/proxy_idp_auth_test_oidc.sh b/nagios/proxy_idp_auth_test_oidc.sh index 171b51d..928b951 100755 --- a/nagios/proxy_idp_auth_test_oidc.sh +++ b/nagios/proxy_idp_auth_test_oidc.sh @@ -116,11 +116,13 @@ if [ ${CESNET_RC} -eq 0 ]; then STATUS=0 STATUS_TXT="Successful login!" fi - RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" else - RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" + STATUS=2 + STATUS_TXT="ERROR!" fi +RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" + echo ${RESULT} echo ${RESULT} > ${DIR}/proxy_idp_auth_test_oidc.cache exit 0 diff --git a/nagios/proxy_idp_auth_test_saml.sh b/nagios/proxy_idp_auth_test_saml.sh index 7d31d68..662d5c5 100755 --- a/nagios/proxy_idp_auth_test_saml.sh +++ b/nagios/proxy_idp_auth_test_saml.sh @@ -116,11 +116,13 @@ if [ ${CESNET_RC} -eq 0 ]; then STATUS=0 STATUS_TXT="Successful login!" fi - RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" else - RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" + STATUS=2 + STATUS_TXT="ERROR!" fi +RESULT="${STATUS} ${BASENAME}-${INSTANCE_NAME} aai_login_time=${AAI_LOGIN_TIME}|muni_login_time=${MUNI_LOGIN_TIME}|cesnet_login_time=${CESNET_LOGIN_TIME} ${STATUS_TXT} [AAI STATUS - ${AAI_RESULT}(${AAI_LOGIN_TIME}s);MUNI STATUS - ${MUNI_RESULT}(${MUNI_LOGIN_TIME}s); CESNET STATUS - ${CESNET_RESULT}(${CESNET_LOGIN_TIME}s)]" + echo ${RESULT} echo ${RESULT} > ${DIR}/proxy_idp_auth_test_saml.cache exit 0