Skip to content
Snippets Groups Projects
Commit 43c01176 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'add-appmonitor-check' into 'main'

Add appmonitor check

See merge request !48
parents cc21fad5 c7113476
No related branches found
No related tags found
1 merge request!48Add appmonitor check
Pipeline #5417 passed
...@@ -11,6 +11,6 @@ APP_NAME=mfa ...@@ -11,6 +11,6 @@ APP_NAME=mfa
# uid of www-data in the docker container # uid of www-data in the docker container
DOCKER_USER_UID=33 DOCKER_USER_UID=33
APP_PORT=8016 APP_PORT=8018
WEBROOT=/var/www/mfa/public_html WEBROOT=/var/www/mfa/public_html
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
APP_NAME=mfa APP_NAME=mfa
# web port 80 in container is seen on localhost as ... # web port 80 in container is seen on localhost as ...
APP_PORT=8016 APP_PORT=8018
# APP_APT_PACKAGES="git unzip zip" # APP_APT_PACKAGES="git unzip zip"
APP_APT_PACKAGES="git unzip zip" APP_APT_PACKAGES="git unzip zip"
......
...@@ -75,7 +75,7 @@ $sDocroot=realpath(__DIR__.'/../'); ...@@ -75,7 +75,7 @@ $sDocroot=realpath(__DIR__.'/../');
*/ */
$aDirs2Check=[ $aDirs2Check=[
"/admin"=>[ "/admin"=>[
"httpDeny" => [ "httpLogin" => [
"/admin/" "/admin/"
], ],
], ],
...@@ -103,38 +103,6 @@ $aDirs2Check=[ ...@@ -103,38 +103,6 @@ $aDirs2Check=[
"/logs/readme.md", "/logs/readme.md",
], ],
], ],
/*
"/apps/apps"=>[],
"/apps/apps/inventar"=>[
"filesReadable" => [
"/apps/apps/inventar/config/objects.php",
],
"filesWritable" => [
"/apps/apps/inventar/data/app_inventar.sqlite3"
],
"httpDeny" => [
"/apps/apps/inventar/data/app_inventar.sqlite3"
],
],
"/apps/apps/net-logbook"=>[
"filesReadable" => [
"/apps/apps/net-logbook/config/objects.php",
],
"filesWritable" => [
"/apps/apps/net-logbook/data/app_net-logbook.sqlite3"
],
"httpDeny" => [
"/apps/apps/net-logbook/data/app_net-logbook.sqlite3"
],
],
"/ldaptools"=>[
"filesReadable" => [
"/ldaptools/classes/backend.class.config.php",
],
"filesWritable" => [],
"httpDeny" => [],
],
*/
]; ];
foreach($aDirs2Check as $sMySubdir => $aItems) { foreach($aDirs2Check as $sMySubdir => $aItems) {
...@@ -209,6 +177,22 @@ foreach($aDirs2Check as $sMySubdir => $aItems) { ...@@ -209,6 +177,22 @@ foreach($aDirs2Check as $sMySubdir => $aItems) {
], ],
]); ]);
} }
foreach($aItems['httpLogin']??[] as $sUrl) {
$sMyUrl="$sSelfUrl$sUrl";
$oMonitor->addCheck([
"name" => "Deny http on $sUrl",
"description" => "Deny $sMyUrl",
"parent" => $sFolderCheckName,
"check" => [
"function" => "HttpContent",
"params" => [
"headeronly" => true,
"url" => $sMyUrl,
"status" => 401
],
],
]);
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment