Skip to content

hardening: tole serve — request-line caps, session eviction, auth rate-limit (Wave 2) #133

Closed

Description

@ajianaz

What problem does this solve?

tole serve (D3 v1, #131) introduced a long-running network daemon. Hardening gaps beyond the Wave-1 scan triage:

  • connection flood: thread-per-connection is unbounded (30s IO timeout bounds each thread, not the count)
  • auth attempts are not rate-limited (brute-force on a static token is possible on a trusted LAN)
  • no TLS (plaintext token on the wire; 127.0.0.1 default mitigates, but LAN deployments are the use case)

Proposed solution

  • bounded concurrent connections (semaphore cap, e.g. 32)
  • auth failure rate-limit (simple token-bucket per source IP)
  • optional TLS via rustls behind a feature flag (documented as LAN-hardening)

Alternatives considered

  • reverse proxy (nginx/caddy) in front for TLS + limits — documented as the recommended production posture; the daemon should still defend itself on a flat LAN.

Notes

  • Part of the approved hardening plan (2026-09-28), Wave 2. Estimate: ~½ day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions