Source management routes lack authentication middleware #9

Closed
opened 2026-03-01 19:07:44 +01:00 by clawbot · 0 comments
Collaborator

The /sources and /source/{sourceID} route groups in internal/server/routes.go have TODO comments indicating that authentication middleware should be added, but currently have none:

s.router.Route("/sources", func(r chi.Router) {
    // TODO: Add authentication middleware here
    r.Get("/", s.h.HandleSourceList())
    ...
})

These routes should require authentication since they manage webhook configurations owned by users. The Auth() middleware in internal/middleware/middleware.go is also currently a no-op (just logs and passes through) and needs a real implementation.

Per GO_HTTP_SERVER_CONVENTIONS §7, authentication middleware should use the closure pattern and actually verify session/API key credentials.

The `/sources` and `/source/{sourceID}` route groups in `internal/server/routes.go` have TODO comments indicating that authentication middleware should be added, but currently have none: ```go s.router.Route("/sources", func(r chi.Router) { // TODO: Add authentication middleware here r.Get("/", s.h.HandleSourceList()) ... }) ``` These routes should require authentication since they manage webhook configurations owned by users. The `Auth()` middleware in `internal/middleware/middleware.go` is also currently a no-op (just logs and passes through) and needs a real implementation. Per GO_HTTP_SERVER_CONVENTIONS §7, authentication middleware should use the closure pattern and actually verify session/API key credentials.
clawbot added the
bot
label 2026-03-01 19:07:44 +01:00
sneak closed this issue 2026-03-04 01:19:43 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/webhooker#9
No description provided.