MosswartOverlord/go-services/tracker-go
Erik bf15d4a2f7 feat(go-services): tracker-go — auth gate (itsdangerous + internal-trust)
Replicates main.py's AuthMiddleware so /go/ can be exposed safely:
- internal-trust: private source IP AND no X-Forwarded-For => skip auth
  (loopback/compose callers; nginx adds XFF to all internet traffic).
- session cookie: byte-compatible itsdangerous URLSafeTimedSerializer verify
  (HMAC-SHA1, django-concat key derivation sha1("itsdangerous"+"signer"+key),
  Unix-epoch timestamp, urlsafe-b64 no pad, optional zlib payload), keyed on the
  same SECRET_KEY. 30-day max-age. Public allowlist (/login,/logout,login assets,
  /icons/,/health); 302->/login for html, 401 JSON otherwise.

Validated on the server: internal-trust loopback 200; external no-cookie 401;
html 302; valid cookie 200; tampered 401; /health public 200; and the SAME
Python-issued cookie authenticates BOTH services (cross-compat proof).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 09:48:47 +02:00
..
auth.go feat(go-services): tracker-go — auth gate (itsdangerous + internal-trust) 2026-06-24 09:48:47 +02:00
charstats.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
Dockerfile feat(go-services): tracker-go Phase 0/1 — /live + /trails read parity 2026-06-24 09:24:22 +02:00
go.mod feat(go-services): tracker-go Phase 0/1 — /live + /trails read parity 2026-06-24 09:24:22 +02:00
live.go feat(go-services): tracker-go Phase 0/1 — /live + /trails read parity 2026-06-24 09:24:22 +02:00
main.go feat(go-services): tracker-go — auth gate (itsdangerous + internal-trust) 2026-06-24 09:48:47 +02:00
memstate.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
proxy.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
reads.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
store.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
totals.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00