Files
NODEDC_PLATFORM/services/map-gateway/EGRESS.md
T

2.5 KiB

Optional delegated Core egress

Prepared 17 November 2026; not deployed on NAS. The legacy AMD path remains active when no delegation is supplied. McHost's relay is installed, but Cesium country-blocks its public egress IP; Mission Core has therefore not selected it.

src/egress.mjs admits a request-scoped nodedc.map-egress/v1 binding only with a separate HMAC signature over schema, method, path and payload. A browser or trusted subject header alone cannot set the route. The key is derived from Gateway's existing administrative secret with the domain nodedc.map-egress.core/v1; Core would receive only the derived key in private services/cesium-ion/egress-signing.key (64 hexadecimal characters). No key has been provisioned in this rollout. Keep the key, binding and provider credentials out of logs, responses and Git.

The binding expires within 30 seconds and supplies a pinned relay endpoint, credential and Cesium profile. TLS 1.3 certificate verification by exact fingerprint precedes HTTP credentials. Destination checks forbid private addresses and arbitrary provider hosts. The relay allows only GET/HEAD; range and conditional headers are forwarded. Cancellation closes the stream. Concurrent relay requests are bounded at 16; handshake and body idle timeouts are 8 and 30 seconds.

Cache lookup is unchanged and occurs before external fetch. Delegation affects only a miss/refresh fetch: it does not change canonical URLs, object keys, index format, credential scoping, atomic fills or the physical cache root. Warm hits need neither AMD nor VPS. Do not rebuild, copy, clear or reindex tiles for this transport change. The health contract advertises egressContract after deployment; Core requires this contract and its signing key before admitting a cached route.

Three delegation tests passed, including real TLS pin/header/cancellation cases. Existing smoke checks passed for no-browser-credentials, live-cache-fallback and streaming-cache-fill (unchanged warm-hit writes, conditional responses, bounded singleflight and partial-object privacy). These are local checks, not proof of a deployed Gateway or live NAS-to-VPS acceptance.

Before activation: qualify a reachable provider exit; build and deploy only with the canonical NODE.DC artifact/runner plan/apply workflow; provision the derived private key; verify bounded warm hits, cold fills and NAS outage/recovery. Preserve the existing AMD route as rollback. No NAS deployment artifact was staged during the blocked McHost qualification.