hermes-agent/hermes_cli/dashboard_auth
Teknium 4d23b2238e fix(dashboard-auth): harden the public native-authorize surface
Two tightenings on /auth/native/authorize (a public pre-auth route):

- Per-IP pending cap (8): the broker store is capacity-bounded fail-closed
  at 256 entries with a 600s TTL, so one unauthenticated spammer could fill
  it and deny native sign-in gateway-wide for the pending window. Pending
  entries now record the requester IP and each address is capped well above
  any legitimate concurrent-login count; other addresses keep signing in.
- Loopback redirect_uri accepts IP literals only (127.0.0.1 / ::1):
  'localhost' can be re-pointed via the hosts file or a hostile resolver
  (RFC 8252 \u00a78.3 says to use loopback IP literals); the desktop always
  sends 127.0.0.1, so nothing legitimate used the name.

3 new tests: per-IP cap enforced, cap frees on TTL expiry, localhost
redirect rejected at the route.
2026-07-22 06:50:50 -07:00
..
__init__.py
audit.py
base.py
cookies.py
login_page.py
middleware.py
native_flow.py fix(dashboard-auth): harden the public native-authorize surface 2026-07-22 06:50:50 -07:00
prefix.py
public_paths.py
registry.py
routes.py fix(dashboard-auth): harden the public native-authorize surface 2026-07-22 06:50:50 -07:00
token_auth.py
ws_tickets.py