Redefined test with requirepass option

This commit is contained in:
Michael Boelen 2016-08-12 09:46:13 +02:00
parent 2dae957c58
commit c761fe8106

View File

@ -207,21 +207,21 @@
################################################################################# #################################################################################
# #
# Test : DBS-1884 # Test : DBS-1884
# Description : Determine Redis configuration option: secureauth # Description : Determine Redis configuration option: requirepass
if [ ${REDIS_RUNNING} -eq 1 -a ${REDIS_CONFIGURATION_FOUND} -eq 1 ]; then PREQS_METS="YES"; else PREQS_MET="NO"; fi if [ ${REDIS_RUNNING} -eq 1 -a ${REDIS_CONFIGURATION_FOUND} -eq 1 ]; then PREQS_METS="YES"; else PREQS_MET="NO"; fi
Register --test-no DBS-1884 --weight L --network NO --preqs-met "${PREQS_MET}" --category security --description "Redis: secureauth option configured" Register --test-no DBS-1884 --weight L --network NO --preqs-met "${PREQS_MET}" --category security --description "Redis: requirepass option configured"
if [ ${SKIPTEST} -eq 0 ]; then if [ ${SKIPTEST} -eq 0 ]; then
if FileIsReadable ${REDIS_CONFIGURATION}; then if FileIsReadable ${REDIS_CONFIGURATION}; then
if SearchItem "^secureauth" "${REDIS_CONFIGURATION}" "--sensitive"; then if SearchItem "^requirepass" "${REDIS_CONFIGURATION}" "--sensitive"; then
LogText "Result: found 'secureauth' configured" LogText "Result: found 'requirepass' configured"
AddHP 3 3 AddHP 3 3
Display --indent 4 --text "- Redis (secureauth configured)" --result "${STATUS_FOUND}" --color GREEN Display --indent 4 --text "- Redis (requirepass configured)" --result "${STATUS_FOUND}" --color GREEN
Report "redis_secureauth=1" Report "redis_requirepass=1"
else else
AddHP 0 3 AddHP 0 3
Display --indent 4 --text "- Redis (secureauth configured)" --result "${STATUS_NOT_FOUND}" --color YELLOW Display --indent 4 --text "- Redis (requirepass configured)" --result "${STATUS_NOT_FOUND}" --color YELLOW
ReportSuggestion "${TEST_NO}" "Configure the 'secureauth' setting for Redis" "${REDIS_CONFIGURATION}" "solution:configure 'secureauth' setting" ReportSuggestion "${TEST_NO}" "Configure the 'requirepass' setting for Redis" "${REDIS_CONFIGURATION}" "solution:configure 'requirepass' setting"
Report "redis_secureauth=0" Report "redis_requirepass=0"
fi fi
else else
LogText "Result: test skipped, as we can't read configuration file" LogText "Result: test skipped, as we can't read configuration file"