authelia: forward-auth accepts the session cookie only #409
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!409
Loading…
Reference in a new issue
No description provided.
Delete branch "authelia/cookie-only"
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?
Stacked on #408 (base is its branch); retarget to trunk once that merges.
Problem
The empty-username failed logins from #404's aside, ~160 a day: Authelia's default forward-auth strategy tries any
Authorizationheader as a Basic login before the session cookie, onbypassdomains too, and a failed lookup short-circuits as a failed 1FA. The phone's ntfy app sends its access token as Basic with an empty username on every topic resubscribe (seven topics, seven lines a burst), and Forgejo runner/CI traffic from the host did the same. They also counted inauthelia_authn{success="false"}, the metric behind AutheliaHighFailedAuthn.Fix
server.endpoints.authz.forward-auth.authn_strategies: [CookieSession]. The login portal becomes the only place a password is accepted; apps' own API auth passes through untouched. A non-browser client can no longer log in as an Authelia user, which nothing here did. Auth-and-Security page says so.Verification
Live, 2026-10-08:
curl -u ':x' https://radarr.…/→ 401 with a Basic challenge, and the log file getsUnsuccessful 1FA authentication attempt by user ''plus the user-details error.just recreate authelia: healthy in 8s, no startup-check line.Access to … is not authorized. On ntfy (bypass) the probe reaches ntfy, which answers 401 for the bad token itself; Authelia logs nothing.user ''line since the recreate.🤖 Generated with Claude Code
The default authn_strategies try any Authorization header as an Authelia Basic login before the cookie, on bypass domains too, and a failed lookup short-circuits as a failed 1FA. Every ntfy token the phone app sends as an empty-username Basic header on each topic resubscribe, and the Forgejo runner and CI traffic from the host, were landing in the log as "Unsuccessful 1FA authentication attempt by user ''" and in authelia_authn{success="false"}: about 160 a day, bursts of seven a minute against AutheliaHighFailedAuthn's ten. Cookie only also means the login portal is the single place a password is accepted; nothing here used Basic auth against Authelia. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>