You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything is currently unauthenticated: /v1/shape, the engine control plane (POST /shapes, /query, /schema), the debug endpoints (/graph, /trace, /memory), the tRPC API, and the DS server (anyone with a stream id can read shape data). No CORS on engine or API.
Decisions (aligned in discussion):
Shared deployment secret, two presentations: ?secret= on /v1/shape (Electric-parity — their client works unchanged; 401 on mismatch), Authorization: Bearer on the extended tRPC API. Explicit ELECTRIC_IVM_INSECURE=true opt-out validated at boot (refuse to start with neither secret nor flag). Secret redaction in logs/traces.
Debug surface moves to a separate utility port (like upstream's prometheus port): /graph, /trace, /memory, /metrics, /subqueries, shape sweep/management. Deployments simply don't expose it; pipeline-viz points at the utility bind. Main port keeps only /v1/shape, /health (+/ready), and the authed control plane.
DS server stays internal — not exposed to clients at all. The extended API proxies feed reads (streamUrl points at an API route, e.g. GET /feeds/<shapeId>?offset=…), authenticated with the bearer secret. The proxy must pass through the DS cache headers (cache-control, etag, stream-cursor, stream-next-offset, stream-up-to-date) so Extended API caching: serve shape feeds via the Rust DS server's built-in CDN protocol #11's CDN story survives the hop — the CDN fronts the API instead of the DS server. Signed per-stream URLs remain a possible later optimization to remove the hop.
CORS: on /v1/shape (echo Origin, expose the electric-* header set, preflight with access-control-max-age), and on the API feed-proxy route.
Everything is currently unauthenticated: /v1/shape, the engine control plane (POST /shapes, /query, /schema), the debug endpoints (/graph, /trace, /memory), the tRPC API, and the DS server (anyone with a stream id can read shape data). No CORS on engine or API.
Decisions (aligned in discussion):
?secret=on/v1/shape(Electric-parity — their client works unchanged; 401 on mismatch),Authorization: Beareron the extended tRPC API. ExplicitELECTRIC_IVM_INSECURE=trueopt-out validated at boot (refuse to start with neither secret nor flag). Secret redaction in logs/traces./graph,/trace,/memory,/metrics,/subqueries, shape sweep/management. Deployments simply don't expose it; pipeline-viz points at the utility bind. Main port keeps only/v1/shape,/health(+/ready), and the authed control plane.streamUrlpoints at an API route, e.g.GET /feeds/<shapeId>?offset=…), authenticated with the bearer secret. The proxy must pass through the DS cache headers (cache-control,etag,stream-cursor,stream-next-offset,stream-up-to-date) so Extended API caching: serve shape feeds via the Rust DS server's built-in CDN protocol #11's CDN story survives the hop — the CDN fronts the API instead of the DS server. Signed per-stream URLs remain a possible later optimization to remove the hop./v1/shape(echo Origin, expose theelectric-*header set, preflight withaccess-control-max-age), and on the API feed-proxy route.🤖 Generated with Claude Code