No authentication on admin UI or any mutating endpoint #3
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
paul_loth/krautspaceTV#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
/adminand every/admin/slides/*and/admin/settingsroute inbackend/app.pyrequire no login/token/basic-auth of any kind. These are reachable from the whole LAN on ports 80/443/8080.Impact
Anyone on the hackerspace network (or WiFi guests) can, with no credentials:
/proxyendpoint (see separate issue).There's also no CSRF protection on the POST forms, so even a "trusted network" argument doesn't fully hold — a malicious page visited by anyone on the LAN could auto-submit a form against these endpoints.
Suggested fix
Add at least HTTP Basic Auth (via a FastAPI dependency) in front of
/admin*and/proxy, with credentials in an env var / local config file (not committed). A CSRF token on mutating forms would be a reasonable follow-up once auth exists.By design: public, unauthenticated admin access is intentional — the goal is to let anyone on the network add their own content. Not going to add auth.