A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.
JavaScript 3d-globecesiumflight-trackinggeospatialgeospatial-intelligencegisosintphotogrammetrysatellite-trackingspatial-intelligencewebglworldview
docs(security): include TomTom in same-site gate inventory
Sunilce5df4b8abe1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1f343b4d2..3dfacb35c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -68,6 +68,11 @@## [Unreleased]+- Cross-site browser requests can no longer spend the TomTom traffic-tile+ budget through `/api/tomtom/*`. The shared same-site gate runs before status,+ cache, and upstream work; same-origin app requests and non-browser local+ callers remain supported.+- Add an experimental ChatGPT/Codex OAuth option for cloud voice in ProviderSettings. API-key voice remains the default. Local sign-in can start fromthe auth button and reports completion, failure, timeout, or expireddiff --git a/SECURITY.md b/SECURITY.mdindex 53437a83c..fdb10b877 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -73,7 +73,7 @@ The data proxies under `server/providers/` are written so the browser cannot tur- **Sanitized errors** — internal error details are not echoed back to clients.- **Coalesced OAuth refresh** and cached successful responses only (OpenSky).- **Redacted debug logging.** The voice debug log (`.gev-logs/`, gitignored) strips API keys, bearer tokens, client secrets, and image data URLs before writing.-- **Cross-site gate on cost/log endpoints.** The cost-bearing (`/api/realtime/token`, `/api/openai/hud-summary`, `/api/google/nearby-places`, `/api/google/text-search`), quota-bearing (`/api/mapillary/*`, with a per-IP limit on tiles) and log (`/api/realtime/debug-log`) endpoints refuse cross-site browser requests: a foreign or opaque `Origin`, a `Sec-Fetch-Site` other than `same-origin`/`none` (this is what blocks an `<img>`/navigation that carries no `Origin`), or any reverse-proxy/CDN forwarding header returns `403`. Non-browser loopback tools (the repo QA harnesses POST the token endpoint with no `Origin`) and the explicit `HOST=0.0.0.0` LAN opt-in keep working — the gate deliberately does not require a loopback remote address; that stricter requirement belongs only to the credential panel (`admitKeySetupRequest`). The Host check (`allowedHosts`, applied by `hostCheckPlugin` ahead of every route, since Vite's own check runs only after plugin middleware) rejects a rebinding `Host` before any handler runs, in every mode, and the gate is defense in depth behind it: the LAN opt-in keeps that check and accepts only IP addresses, `localhost` and names listed in `GEV_ALLOWED_HOSTS`. **Limit:** a name you list there is trusted like the app's own address, so list only names you control.+- **Cross-site gate on cost/log endpoints.** The cost-bearing (`/api/realtime/token`, `/api/openai/hud-summary`, `/api/google/nearby-places`, `/api/google/text-search`), quota-bearing (`/api/mapillary/*`, with a per-IP limit on tiles, and `/api/tomtom/*`, backed by its persistent daily tile budget) and log (`/api/realtime/debug-log`) endpoints refuse cross-site browser requests: a foreign or opaque `Origin`, a `Sec-Fetch-Site` other than `same-origin`/`none` (this is what blocks an `<img>`/navigation that carries no `Origin`), or any reverse-proxy/CDN forwarding header returns `403`. Non-browser loopback tools (the repo QA harnesses POST the token endpoint with no `Origin`) and the explicit `HOST=0.0.0.0` LAN opt-in keep working — the gate deliberately does not require a loopback remote address; that stricter requirement belongs only to the credential panel (`admitKeySetupRequest`). The Host check (`allowedHosts`, applied by `hostCheckPlugin` ahead of every route, since Vite's own check runs only after plugin middleware) rejects a rebinding `Host` before any handler runs, in every mode, and the gate is defense in depth behind it: the LAN opt-in keeps that check and accepts only IP addresses, `localhost` and names listed in `GEV_ALLOWED_HOSTS`. **Limit:** a name you list there is trusted like the app's own address, so list only names you control.- **Full Content-Security-Policy.** The dev and preview servers send a real CSP (`script-src 'self' 'unsafe-eval' blob:` plus the YouTube, Facebook and X scripts the Nepal event's embedded media loads, with a matching `frame-src` for their players and posts: no inline script and no other script origin; `blob:` covers the object URLs Cesium's bundled workers bootstrap through in the built app), alongside the existing `X-Frame-Options: DENY` and `frame-ancestors 'none'`. `'unsafe-eval'` stays because Knockout, bundled inside Cesium's widgets package, resolves the global object with `eval` at load time and the globe does not initialize without it; styles permit `'unsafe-inline'` and Google Fonts because Vite's dev client injects `<style>` elements.- **ChatGPT OAuth voice reuses the local Codex sign-in.** `/api/realtime/oauth-status`, `/api/realtime/oauth-login` and `/api/realtime/token?auth=oauth` answer only loopback connections, behind the same cross-site gate as the token endpoint; the login route also refuses a foreign `Origin`. None of them returns the access token. The login route runs `codex login` (or the executable named by `CODEX_BIN`) with an allowlisted environment that leaves out GEV's provider keys, keeps one attempt pending at a time and cancels it after two minutes or when the server stops. **Limits:** any program on this machine that can reach the server can mint Realtime sessions on the signed-in ChatGPT account, as it can with the API key; a local reverse proxy that hides the client's address defeats the loopback check; and OpenAI has not documented this use of Codex credentials for Realtime, so it may stop working or fall outside the account's terms.diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.mdindex eea437dd6..f7c1056ed 100644--- a/docs/CURRENT-STATE.md+++ b/docs/CURRENT-STATE.md@@ -1103,7 +1103,10 @@ plugin order, server-key selection, validation, disk caches, budgets, retriesand stale/error responses remain unchanged. Each has a Node-only package entryunder `gods-eye-view/server/providers/`. Portable terrain mechanics, traffic tilemath and GBFS source rules are available under `gods-eye-view/sources/`.-The browser layers and their rendering remain in their existing modules.+The TomTom `/api/tomtom/*` routes run the shared same-site admission gate before+status, cache or upstream work, refusing cross-site browser requests while+preserving same-origin app requests and non-browser local callers. The browser+layers and their rendering remain in their existing modules.## Terrain height cache bound