HIGH: _auth_label() reports anonymous guest sessions as "authed" #90
Labels
No labels
accessibility
backlog
beta-feedback
bug
duplicate
enhancement
feature-request
help wanted
invalid
needs-design
needs-triage
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/kiwi#90
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?
Summary
The
/api/v1/session/bootstrapendpoint (and all structured log lines) report anonymous guest visitors asauth=authed. This breaks log-based analytics: there is no way to distinguish unauthenticated users from authenticated ones in logs.Root Cause
app/cloud_session.py,_auth_label():Guest sessions use
user_id = f"anon-{uuid4()}"(e.g."anon-3e8c..."), which never matches the literal string"anonymous". Every guest hits the fallthrough and returns"authed".Fix
Verified
GET /api/v1/session/bootstrapwith no session cookie or auth header returns:Expected: