Management lock-out guard does not evaluate country allow-lists

Abierto
#2,145 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Wikid82 ya está trabajando en esto.

Desde el 3/12/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

backend bug caddy database low security

What: The guard that warns an admin before a change would lock them out of Charon's own interface builds its access-list evaluator with no GeoIP service attached (services.NewAccessListService(g.db) at backend/internal/api/handlers/management_guard.go:62,73, also used at security_management_handler.go:99,119, security_status_enforcement.go:152 and services/geoip_candidate_guard.go:48). Without a GeoIP lookup, Evaluate treats the database as unavailable and always admits, so a country allow-list chosen for Charon's own interface is never flagged as a lock-out risk by this guard, whatever its rules are.

Where: the four call sites above.

Impact: this only affects the pre-save lock-out warning shown to the admin making the change — it does not affect the live request-time enforcement on Charon's own interface, which goes through the proxy's own Caddy configuration with a real GeoIP lookup. An admin who assigns a country allow-list to Charon's own interface gets no warning from this guard even when the change would in fact refuse their own address once applied.

Suggested approach: thread the server's GeoIP service into the evaluator these four call sites build, the same way the proxy's own evaluation path gets one, so the guard can judge country-based restrictions.

Severity: low (pre-existing, self-inflicted risk only — no path to admitting an unauthorized caller).

Found during B8-05 implementation (country access lists admitting local network visitors), PR closing #1895/#1980.

Lenguaje dominante
Go
Estrellas
17
Forks
2
Merge medio
1 h 42 min
PR fusionados (30 d)
173

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Wikid82/Charon

Todos los issues de Wikid82/Charon

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.