Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117889306
D5082.1775360998.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D5082.1775360998.diff
View Options
diff --git a/kolabctl b/kolabctl
--- a/kolabctl
+++ b/kolabctl
@@ -356,7 +356,7 @@
echo "All containers are available"
# We skip mollie and openexchange
- podman exec $POD-webapp env APP_DEBUG=false ./artisan status:health --check DB --check Redis --check IMAP --check Roundcube --check Meet --check DAV
+ podman exec $POD-webapp env APP_DEBUG=false ./artisan status:health --user="$ADMIN_USER" --password="$ADMIN_PASSWORD" --check DB --check Redis --check IMAP --check Roundcube --check Meet --check DAV --check Auth
echo "Checking postfix authentication"
podman exec $POD-postfix testsaslauthd -u "$ADMIN_USER" -p "$ADMIN_PASSWORD"
echo "Checking imap authentication"
diff --git a/src/app/Console/Commands/Status/Health.php b/src/app/Console/Commands/Status/Health.php
--- a/src/app/Console/Commands/Status/Health.php
+++ b/src/app/Console/Commands/Status/Health.php
@@ -24,7 +24,9 @@
* @var string
*/
protected $signature = 'status:health
- {--check=* : One of DB, Redis, IMAP, LDAP, Roundcube, Meet, DAV, Mollie, OpenExchangeRates, Storage}';
+ {--check=* : One of DB, Redis, IMAP, LDAP, Roundcube, Meet, DAV, Mollie, OpenExchangeRates, Storage, Auth}
+ {--user= : Test user (for Auth test)}
+ {--password= : Password of test user}'; // phpcs:ignore
/**
* The console command description.
@@ -98,6 +100,18 @@
}
}
+ private function checkAuth()
+ {
+ try {
+ $user = \App\User::findByEmail($this->option('user'));
+ $response = \App\Http\Controllers\API\AuthController::logonResponse($user, $this->option('password'));
+ return $response->getData()->status == 'success';
+ } catch (\Exception $exception) {
+ $this->line($exception);
+ return false;
+ }
+ }
+
private function checkRoundcube()
{
try {
@@ -168,6 +182,9 @@
$steps = [
'DB', 'Redis', 'IMAP', 'Roundcube', 'Meet', 'DAV', 'Mollie', 'OpenExchangeRates'
];
+ if (!empty($this->option('user'))) {
+ array_unshift($steps, 'Auth');
+ }
if (\config('app.with_ldap')) {
array_unshift($steps, 'LDAP');
}
@@ -187,7 +204,7 @@
if ($this->{$func}()) {
$this->info("OK");
} else {
- $this->error("Not found");
+ $this->error("Error while checking: $step");
$result = 1;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 5, 3:49 AM (7 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828485
Default Alt Text
D5082.1775360998.diff (2 KB)
Attached To
Mode
D5082: Authentication health check
Attached
Detach File
Event Timeline