MCP HTTP transport: minor hardening follow-ups (from #2607 review)
- Dominant language
- Go
- Stars
- 610
- Forks
- 63
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 57
Description
Follow-ups from the independent review of #2607 (MCP HTTP transport hardening). None were merge-blocking; the surface is experimental and operator-gated. Tracking for v0.18 alongside the already-deferred rate-limiting / per-agent-tokens / mTLS / rotation items.
- **MINOR-1 — auth-failure log-flooding amplification** (`cmd/conduit/root/mcp/http.go` auth path). Each unauthenticated 401 now forces a `warn` log write; with no rate limiting (deferred), an unauthenticated flooder amplifies to disk/journald writes. Mitigate with sampling/dedup on the auth-failure line, or note as an explicit threat-model residual.
- **MINOR-2 — AC-8 leak-scan is narrower than its claim** (`http_test.go`). The token-absence scan only covers the 401 path; extend it to the success path and the startup/warn log lines so a future token-in-startup-log leak would be caught.
- **MINOR-3 — "serving …" info line logs before the bind** (`http.go`). It fires in `newHTTPServer`, before `ListenAndServeTLS`, so a bind failure prints "serving" then the error. Move it after a successful listen for accuracy.
- **NIT** — document in `docs/operations/mcp-server.md` that auth-failure visibility requires log level ≤ warn.
Source: fresh-context review of #2607.
Contributor guide
Research direction
Start with cmd/conduit/root/mcp/http.go and http_test.go, then read docs/operations/mcp-server.md; review the auth path, newHTTPServer, and existing token-absence scan. Check how the 401, success, startup, and warning log paths are tested. Done means the listed logging, bind-status, leak-scan, and documentation follow-ups are addressed or their residual risk is explicitly recorded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, documentation, observability, security, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100