diff --git a/INTEGRATIONS.md b/INTEGRATIONS.md index 8f1f9b0..9be3e07 100644 --- a/INTEGRATIONS.md +++ b/INTEGRATIONS.md @@ -612,7 +612,7 @@ osTicket's API cannot close a ticket, so this is the one place in the app that * **20 or more sign-ins failed in a day** (warning; shown as "100 or more" when the log's page is full) and **3 or more configuration errors in a day** (warning; a flow or stage that is set up wrongly, with the newest message). - If Authentik cannot be read for 20 minutes its alerts are neither raised nor cleared, the Alerts page says it could not check, and the integration is raised as failing like any other. A part that could not be asked (no workers endpoint on an older version) is not a problem: only *none* is. - `/metrics` has `homelab_authentik_outpost_up`, `homelab_authentik_workers`, `homelab_authentik_failed_logins_24h` and `homelab_authentik_certificate_expiry_days` for each Authentik that was read lately. -- **Checked against a live Authentik** (Inspect): the version, the outposts with their health, the certificates, the tokens and the events log all answered as the reader expects. **`/admin/workers/` answered with something that is not JSON** on that Authentik (the reason is not known yet: the inspector now shows the status and kind of such an answer), so the number of workers is *unknown* there: the page leaves it out and the *no worker is connected* alert is never raised on a guess. A token is listed only if it **expires** and is an API token or app password, so an Authentik whose tokens are all set not to expire shows none, which is right. Everything else is as Authentik publishes it and tried against a pretend server. Lists are read one page at a time +- **Checked against a live Authentik** (Inspect): the version, the outposts with their health, the certificates, the tokens and the events log all answered as the reader expects. **`/admin/workers/` answered HTTP 404 (a web page, not JSON)** on that Authentik — it has no such endpoint — so the number of workers is *unknown* there: the page leaves it out, `homelab_authentik_workers` is not written, and the *no worker is connected* alert is never raised on a guess (only a real count of 0 raises it). A token is listed only if it **expires** and is an API token or app password, so an Authentik whose tokens are all set not to expire shows none, which is right. Everything else is as Authentik publishes it and tried against a pretend server. Lists are read one page at a time (200 items; 100 events), and the newest events come first. The **Diagnostic Log** has what was asked and answered. Flows that fail for one user are not counted — only the configuration errors Authentik itself logs; what the app sees of "failing flows" is that. ## DNS providers diff --git a/server/src/integrations/authentik/adapter.ts b/server/src/integrations/authentik/adapter.ts index c7e5f61..b1cd405 100644 --- a/server/src/integrations/authentik/adapter.ts +++ b/server/src/integrations/authentik/adapter.ts @@ -6,7 +6,7 @@ * flows failed lately (from the events log). Nothing is sent to Authentik but GET requests for these; making a user is ./users.ts, with a token of its own. * * Endpoints and field names are from Authentik's published API (`/api/v3/admin/version/`, `/admin/workers/`, `/outposts/instances/` and its `/health/`, `/crypto/certificatekeypairs/`, - * `/core/tokens/`, `/events/events/`) and were checked against a live server (Inspect), where `/admin/workers/` answered with something that is not JSON — the workers are then unknown, not none; every field is read defensively, and a part that cannot be read is left out. + * `/core/tokens/`, `/events/events/`) and were checked against a live server (Inspect), where `/admin/workers/` answered 404 — an Authentik without that endpoint — and the workers are then unknown, not none; every field is read defensively, and a part that cannot be read is left out. */ import { requestJson } from "../httpJson.js"; import { withDiagLogging } from "../../services/diagLog.js";