Make the Auth tab explain a number instead of only showing it
A low uptime figure, a refused login and a certificate that stopped renewing all looked the same from the row: a number, with the reason split across NPM, an Authelia config and the directory. The why-check goes and looks — TCP to the forward target, HTTP through the proxy, a second handshake with verification off to tell a broken certificate from a broken service. Forward hosts are docker names that only resolve on NPM's network, so an unresolvable one is redirected to the container address and the substitution is reported; a check that could not be made must never read as a check that failed. The access simulator walks the rules the way Authelia does and shows the ones it stepped over, reading whichever instance the chosen host points at rather than the one conf names — there are two here. Cert triage counts runs rather than log lines and orders by rotation suffix rather than mtime, both of which change the answer.
This commit is contained in:
@@ -308,5 +308,14 @@ if (!file_exists($cacheFile)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// ── Why renewals failed ───────────────────────────────────────────────────────
|
||||
// Reads certbot's own logs and names the categories the failures fall into. A read, so GET: it
|
||||
// opens files and nothing else. Bounded inside vv_cert_triage() by file count and bytes per file,
|
||||
// because the log directory here is 639 MB and a page request must not depend on its size.
|
||||
if ($action === 'triage') {
|
||||
echo json_encode(vv_cert_triage());
|
||||
exit;
|
||||
}
|
||||
|
||||
$data = json_decode(file_get_contents($cacheFile), true) ?: [];
|
||||
echo json_encode(array_merge(['ok' => true], $data));
|
||||
|
||||
Reference in New Issue
Block a user