Commit graph

202 commits

Author SHA1 Message Date
58f71f5b45 Merge pull request 'fix(news): drop future-dated items at ingest, hide them in /api/news' (#52) from wt/t_b8b8e927 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 02:43:23 +00:00
backend
c42d375d6c fix(news): drop future-dated items at ingest, hide them in /api/news
wiseye.org public-affairs event listings carry pubDate 3-6 days ahead; with
ORDER BY timestamp DESC they pinned the top of the feed for a week and made
the news list look frozen.

- PostgresPipeline drops items whose parsed publish date is >2h in the
  future, counts future_dated_dropped (stats + one INFO line per run).
  Unparseable dates keep the old behaviour (kept, timestamped now()).
- GET /api/news filters timestamp > now() in the query while still returning
  timestamp IS NULL rows; limit/offset/domain/since unchanged.
- docs/news.md documents the guard.
- tests: pipeline drop/keep unit tests, API future-row exclusion + limit.
2026-11-13 21:41:44 -05:00
84ea0a17b1 Merge pull request 'feat(auth): ADMIN_COOKIE_SECURE forces the session cookie Secure' (#51) from wt/t_e5a0c384 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 02:16:57 +00:00
Hermes Backend
72757e7c51 feat(auth): ADMIN_COOKIE_SECURE forces the session cookie Secure
Behind the cluster's HTTP origin listener Envoy normalizes
X-Forwarded-Proto to http, so _is_https() never fires and the session
cookie was issued without Secure. Add an explicit deploy-time flag:
set_session_cookie() now marks the cookie Secure when the env var is
1/true/yes (case-insensitive, stripped) or the header inference says
https. clear_session_cookie() is unchanged, SameSite stays Lax.

Tests cover flag-over-http, header-without-flag, and the local-dev path;
docs/auth.md and .env.example document the variable.
2026-11-13 21:15:05 -05:00
d8113b37b8 Merge pull request 'feat(auth): public read-only HUD, admin-only API keys and mutations' (#50) from feat/public-hud-admin-auth into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #50
2026-11-14 02:05:19 +00:00
Sirius DevOps
c0a2454fdd feat(auth): public read-only HUD, admin-only API keys and mutations
Adds single-admin authentication to the dashboard. Anonymous visitors get a
read-only site (map + news); the one admin unlocks everything else.

- app/auth.py: deny-by-default ASGI middleware on /api/* with an explicit
  public read allowlist; /login page; /api/auth/{login,logout,me}; PBKDF2
  password hashing; HMAC-signed HttpOnly SameSite=Lax session cookie (7d,
  Secure behind X-Forwarded-Proto: https); 5-fail/15-min per-IP login limit;
  Origin/Referer host check on state-changing admin requests.
- Fails closed: missing ADMIN_PASSWORD_HASH or ADMIN_SESSION_SECRET -> admin
  routes 403 'admin auth not configured', public site unaffected.
- app/main.py: mounts the middleware + router (6 lines, no per-route decorators).
- app/static/index.html: hides Ingest/API Keys/Settings, the summarizer panel
  and geofence write controls until /api/auth/me says admin; adds a discreet
  SIGN IN link to /login. CSS gates fail closed without JS.
- tests/test_auth.py: 42 tests (anonymous 401s, login/logout, tampered and
  expired cookies, fail-closed, rate limit, CSRF, HUD markup).
- Existing API tests now send an admin session cookie for admin routes.

Public allowlist extends the spec's list with the remaining read-only GETs the
HUD calls (/api/stats, /api/conflicts, /api/place, /api/satellites,
/api/infrastructure, /api/map/gpsjam, /api/map/times, /api/fire-incidents,
/api/fire-perimeters, /api/weather-alerts, /api/storms, /api/geofences/{id}/at)
so an anonymous HUD is not half-broken.
2026-11-13 20:56:07 -05:00
38eb4fe4d6 Merge pull request 'feat(map): quiet HUD chrome — VIIRS default, collapsed layer rail' (#49) from feat/hud-chrome-quiet into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 27s
Reviewed-on: #49
2026-09-01 17:21:09 -04:00
Sirius DevOps
0fa49b8407 fix(map): NEWS ticker fills 32px news-only dock
.ticker stayed at height:50% after MKT was hidden, leaving an empty
half-bar. .dock.news-only .ticker is now 100% of the 32px dock.
2026-09-01 17:15:32 -04:00
Sirius DevOps
beb457c382 feat(map): quiet HUD chrome — VIIRS default, collapsed rail
Satellite-first chrome: daily VIIRS preferred, layer rail collapsed on
load, geofence after basemap, FIRMS-only default overlays, hide MKT
standby ticker, Strait select instead of buttons, IBM Plex instead of
Orbitron, news as 6px circleMarkers.
2026-09-01 17:15:24 -04:00
cb20473119 Merge pull request 'feat(map): geofence watch HUD — finish/cancel, inbox, fence DVR' (#48) from feat/geofence-watch-ui into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 21s
Reviewed-on: #48
2026-09-01 07:44:36 -04:00
Sirius DevOps
8c97ce50d2 feat(map): geofence watch HUD — finish/cancel, inbox, fence DVR
Phone can finish a polygon without double-click. List is mute/go/rename/delete.
Inbox seeds from /api/geofence-alerts and appends WS hits. Watch all fence
ids on /ws/live. Selected-fence DVR uses GET /api/geofences/{id}/at.
2026-09-01 01:36:21 -04:00
75e065f8c2 Merge pull request 'feat(geofence): watch list, filtered hit log, fence snapshot' (#47) from feat/geofence-watch into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 15s
Reviewed-on: #47
2026-09-01 01:26:31 -04:00
Sirius DevOps
f6c1cfc454 feat(geofence): watch list, filtered hit log, fence snapshot
Off-viewport clients that send {type:watch_geofences,ids} on /ws/live
still receive geofence_alert; AIS/ADS-B stay viewport-only.

GET /api/geofence-alerts accepts geofence_id/since/until/source_kind.
GET /api/geofences/{id}/at returns CAGG+FIRMS inside the fence at T
(404 if missing, empty lists if DB down). DELETE missing fences 404s.
2026-09-01 01:24:36 -04:00
6ff2fd0351 Merge pull request 'fix(api): SSRF guard on ingest; whitelist PATCH /api/sources' (#46) from feat/ssrf-ingest-source-whitelist into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 22s
Reviewed-on: #46
2026-09-01 00:54:14 -04:00
622c548792 Merge branch 'master' into feat/ssrf-ingest-source-whitelist 2026-09-01 00:54:05 -04:00
5c6042c692 Merge pull request 'chore: remove unused masscan scanner' (#45) from feat/remove-masscan into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 21s
Reviewed-on: #45
2026-09-01 00:52:54 -04:00
e8060cf5d1 Merge pull request 'fix(ops): pin TiTiler digest, GIST bbox indexes, single uvicorn worker' (#44) from feat/pin-titiler-gist-single-worker into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 25s
Reviewed-on: #44
2026-09-01 00:51:40 -04:00
Sirius DevOps
158ecc6235 chore: remove unused masscan scanner
Active discovery never produced cameras rows. Drop the scanner, systemd
unit, ingest trigger, and docs/env knobs. Keep RTSP preview via ffmpeg.
2026-09-01 00:47:24 -04:00
Sirius DevOps
59974be696 fix(api): SSRF guard on ingest; whitelist PATCH /api/sources
Reject private/loopback/link-local hosts on POST /api/ingest/rss and
URL-shaped GDELT queries via camera_scraper.is_public_url (HTTP 400).
PATCH /api/sources/{id} only accepts name, url, config, enabled (422 else).
2026-09-01 00:47:15 -04:00
Sirius DevOps
74722f7628 fix(ops): pin TiTiler digest, GIST bbox indexes, single uvicorn worker
Pin titiler to the Pi-running digest, make workers=1 explicit for
in-memory WS/layer caches, and add PostGIS GIST indexes for events/fires
bbox pans without dropping the existing btree indexes.
2026-09-01 00:47:06 -04:00
ef27e13e50 Merge pull request 'feat(satellites): CelesTrak GP JSON satellites API with SGP4 propagation' (#43) from osint-dashboard/t_fe710941-osint-celestrak-get-api-satellites into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 41s
Reviewed-on: #43
2026-08-31 23:18:07 -04:00
Sirius DevOps
b9558431f2
Merge origin/master into CelesTrak satellites API
Keep satellites import (this PR) and place.reverse_geocode from #37.
2026-08-31 23:15:08 -04:00
91c7ad437c Merge pull request 'feat(hud): layer counts, shortcuts, terminator, zoom-gated cams, SWPC' (#41) from osint-dashboard/t_45362857-osint-hud-counts-shortcuts-terminator-zo into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 23s
Reviewed-on: #41
2026-08-31 23:13:53 -04:00
Sirius DevOps
7d344ce636
Merge origin/master into HUD polish
Keep cheat-sheet/SWPC CSS (this PR) and place-dossier CSS from #37.
2026-08-31 23:15:08 -04:00
Sirius DevOps
c91c9ef321
Merge origin/master into CelesTrak satellites API
Keep /api/satellites (this PR) and /api/infrastructure from #36,
plus both overlay_catalog entries. Disjoint layers.
2026-08-31 22:28:23 -04:00
6caa98e0a4 Merge pull request 'feat(map): right-click place dossier (Nominatim + nearby overlays)' (#37) from osint-dashboard/t_715a3b7e-osint-map-right-click-place-dossier into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 16s
Reviewed-on: #37
2026-08-31 22:28:05 -04:00
7a627d116b Merge branch 'master' into osint-dashboard/t_715a3b7e-osint-map-right-click-place-dossier 2026-08-31 22:27:52 -04:00
Sirius DevOps
848ace15d1
Merge origin/master into place dossier
Keep place-dossier JS (this PR) and conflicts overlay loaders from #39.
Disjoint HUD features in index.html.
2026-08-31 22:23:04 -04:00
5815ccb4d4 Merge pull request 'feat(infra): GET /api/infrastructure Overpass nuclear markers (bbox)' (#36) from osint-dashboard/t_5955729a-osint-get-api-infrastructure-overpass-nu into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 17s
Reviewed-on: #36
2026-08-31 22:22:47 -04:00
f8dbfef6c2 Merge pull request 'feat(cameras): UDOT IBI 511 traffic cameras -> cameras table' (#38) from osint-dashboard/t_5bfc52e8-osint-udot-ibi-511-cameras-cameras-table into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 16s
Reviewed-on: #38
2026-08-31 22:22:11 -04:00
Sirius DevOps
f7853a354c
Merge origin/master into HUD polish
Keep terminator .lp-dot.night (this PR) and .lp-dot.conflicts from #39.
2026-08-31 22:20:18 -04:00
Sirius DevOps
640fea31f4
Merge origin/master into UDOT IBI 511 cameras
Keep both UDOT IBI 511 (this PR) and ODOT TripCheck (merged #40)
plus existing MDOT parsers. Disjoint camera sources.
2026-08-31 22:20:04 -04:00
1383305409 Merge pull request 'feat(map): Conflicts zone overlay (Leaflet)' (#39) from osint-dashboard/t_fd263e32-osint-map-conflict-zone-overlay into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 16s
Reviewed-on: #39
2026-08-31 22:15:41 -04:00
53edaa9433 Merge pull request 'feat(cameras): ODOT TripCheck parser -> cameras table' (#40) from osint-dashboard/t_93732570-osint-odot-tripcheck-cameras-cameras-tab into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 17s
Reviewed-on: #40
2026-08-31 22:14:53 -04:00
240b9e70b3 Merge pull request 'feat(api): GET /api/stats HUD counters (counts only, never 500)' (#42) from osint-dashboard/t_75d2037f-osint-get-api-stats-hud-counters into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 20s
Reviewed-on: #42
2026-08-31 22:12:55 -04:00
Sirius DevOps
3f18b40da7
Merge origin/master into place dossier
Keep lastAircraft cache for nearby-dossier and MIL filter from #35.
2026-08-31 22:12:51 -04:00
Sirius DevOps
e0e59900b2
Merge origin/master into HUD polish
Keep aircraft MIL filter from #35 and HUD setLayerCount helper
(disjoint: mil styling vs layer-count API).
2026-08-31 22:12:19 -04:00
Sirius DevOps
12467dab4d
Merge origin/master into CelesTrak satellites API
Keep both overlay_catalog entries: satellites (this PR) and
conflicts (already on master). Disjoint layers.
2026-08-31 22:11:56 -04:00
Sirius DevOps
6c41019d6c
Merge origin/master into Overpass nuclear infrastructure
Keep both overlay_catalog entries: infra_nuclear (this PR) and
conflicts (already on master). Disjoint layers.
2026-08-31 22:11:29 -04:00
Sirius DevOps
e69d19c521
Merge origin/master into UDOT IBI 511 cameras
Keep both UDOT IBI 511 and already-merged MDOT MiDrive parsers
(disjoint camera sources on camera_scraper.py / tests).
2026-08-31 22:11:09 -04:00
Sirius DevOps
604738e176
Merge origin/master into ODOT TripCheck cameras
Keep both ODOT TripCheck and already-merged MDOT MiDrive parsers
(disjoint camera sources on the same dispatch/config/tests files).
2026-08-31 22:09:34 -04:00
f072a83ca8 Merge pull request 'feat(map): aircraft popup enrichment and emergency/MIL styling' (#35) from osint-dashboard/t_1d9c5839-osint-map-aircraft-popup-enrichment-emer into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 18s
Reviewed-on: #35
2026-08-31 21:55:09 -04:00
71b6f589a5 Merge branch 'master' into osint-dashboard/t_1d9c5839-osint-map-aircraft-popup-enrichment-emer 2026-08-31 21:54:54 -04:00
af836b0414 Merge pull request 'feat(conflicts): GET /api/conflicts conflict-zone catalog + news/GDELT counts' (#33) from osint-dashboard/t_e66223e3-osint-get-api-conflicts-catalog-news-cou into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 21s
Reviewed-on: #33
2026-08-31 21:52:02 -04:00
9712ad03a7 Merge pull request 'feat(cameras): MDOT MiDrive parser -> cameras table' (#34) from osint-dashboard/t_8be8d860-osint-mdot-midrive-cameras-cameras-table into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 28s
Reviewed-on: #34
2026-08-31 21:50:45 -04:00
Sirius DevOps
6b5eec3824 feat(satellites): CelesTrak GP JSON satellites API with SGP4 propagation
GET /api/satellites?groups=stations,weather returns last-known satellite
positions propagated from CelesTrak GP JSON (OMM mean elements, not TLE)
via the real sgp4 library (TEME->geodetic), not two-body Kepler.

- Fetch gp.php?GROUP=...&FORMAT=JSON at most once per 2h per group,
  cached with a last-good blob fallback for 403 / stale responses.
- SatNOGS TLE fallback only when the CelesTrak cache is empty.
- bbox viewport culling; unknown group -> 400.
- overlay_catalog() gains id=satellites (kind=points, /api/satellites).
- OMM path handles NORAD cat numbers >= 100000 (no TLE round-trip).
2026-08-31 21:42:50 -04:00
Sirius DevOps
f61d587523
feat(hud): layer counts, shortcuts, terminator, zoom-gated cams, SWPC
Poll GET /api/stats ~30s for rail integers (404 falls back to overlay
array lengths). Keyboard: ? cheat sheet, L layers, R reset, Esc closes
panels; F/S left unbound. Cheap sun-position day/night overlay default
off. Camera/HLS thumbs only at zoom >= 12. NOAA SWPC Kp chip in the
status strip (browser-direct; hide on failure).
2026-08-31 21:41:59 -04:00
Sirius DevOps
92dd9c5803 feat(api): GET /api/stats HUD counters (counts only, never 500) 2026-08-31 21:41:45 -04:00
Sirius DevOps
41433be574 feat(cameras): ODOT TripCheck parser -> cameras table
Add parse_odot_json (Esri-style cctvinventory.js) next to parse_caltrans_json:
JPEG snapshot_url, discovery_source=odot, Oregon bbox + filename guard,
no RTSP. Wire dispatch + default CAMERA_SOURCE_URLS entry. Unit tests.
2026-08-31 21:38:09 -04:00
Sirius DevOps
0b3ca0915e Merge remote-tracking branch 'origin/master' into osint-dashboard/t_fd263e32-osint-map-conflict-zone-overlay 2026-08-31 21:37:23 -04:00