feat(alertmanager): UI behind Authelia, admin only; verify admin tools redirect to login #250
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/alertmanager-behind-authelia"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit result (live + repo) of what should be behind Authelia:
Change: alertmanager_hostname (alertmanager.; the proxied wildcard already resolves it and Traefik issues the certificate by DNS-01) gets a Traefik route with the authelia middleware and is added to Authelia's admin-only domain list, like Prometheus. With a hostname no port is published and external-url becomes the https link. Unsetting it restores the old tailnet port. Prometheus reaches Alertmanager via alertmanager:9093 on the Docker network, so alert delivery is unaffected.
Tests: scripts/tests/test_admin_tools_authelia.py (8 cases rendering the real Traefik/Authelia/compose templates; removing the middleware makes two fail; in lint.yml). check-exposure.py gains login-redirect checks; run against production now: prometheus OK, vault /admin OK, alertmanager FAIL (526, no route yet), which is the gap.
Not checked: a real deploy and Authelia's own validation of this exact rendered config (the change is one extra entry in an existing domain list; staging brings Authelia up with it before promotion).
Deploy: staging, promotion, then ./infra deploy --tags traefik,authelia,alertmanager --limit services (Authelia and Alertmanager restart briefly; SSO is unavailable for a moment). Verify: python3 scripts/checks/check-exposure.py (all login checks OK), open https://alertmanager.jfraeys.com/ and sign in as an admin, and send a test alert to confirm the link in the notification works.
Follow-up once deployed: the services:9093 rule in the Headscale ACL (#246) is no longer needed and can be removed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ