Commit Graph

5 Commits

Author SHA1 Message Date
fuomag9 881992b6cc Restrict analytics, GeoIP status, and OpenAPI spec to admin role
Pentest found that all 8 analytics API endpoints, the GeoIP status
endpoint, and the OpenAPI spec were accessible to any authenticated
user. Since the user role should only have access to forward auth
and self-service, these are now admin-only.

- analytics/*: requireUser → requireAdmin
- geoip-status: requireUser → requireAdmin
- openapi.json: add requireApiAdmin + change Cache-Control to private
- analytics/api-docs pages: requireUser → requireAdmin (defense-in-depth)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 00:02:13 +02:00
fuomag9 f80b0c4735 feat: add geoip-status API route with auth
Returns whether GeoLite2-Country and GeoLite2-ASN databases are loaded,
used by the UI to show the GeoIP ready indicator in GeoBlockFields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 08:20:48 +01:00
fuomag9 25e1f2acee fix: make geoip-status a public endpoint (no auth required) 2026-02-25 01:31:06 +01:00
fuomag9 1231150550 fix: require auth on geoip-status endpoint 2026-02-25 01:24:11 +01:00
fuomag9 ccef82cca8 feat: add GeoIP status API route and improved geoblock UI 2026-02-25 01:22:04 +01:00