Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Light Gateway

light-gateway is the public Portal BFF and API gateway. It terminates TLS, serves Portal View assets, performs authentication/authorization, and routes Portal, MCP and backend API traffic. The standard Compose listener maps host port 443 to container port 8443.

Configuration boundaries

VariablesPurpose
LIGHT_RS_CONFIG_DIRStartup and local configuration templates.
LIGHT_PORTAL_AUTHORIZATIONGateway service identity for Config Server/Portal operations.
WORKFLOW_INVOCATION_SCOPE_TOKENGateway identity forwarded as X-Scope-Token for Workflow invocation.
STATELESSAUTH_BOOTSTRAPTOKENBootstrap token for the configured browser authentication flow.
STATELESSAUTH_*CLIENTSECRETOptional social-login client secrets.
GROQ_API_KEY, GEMINI_API_KEY, NVIDIA_API_KEYProvider keys only if the public Gateway profile contains LLM routes.
CLIENT_CACERTPATH, CLIENT_VERIFYHOSTNAMEOutbound TLS trust and hostname validation.
gatewayEvidence.* or normalized GATEWAYEVIDENCE_*Operational evidence sink, binding and schema fences.
RUST_LOG, GATEWAY_LOG_ANSILogging controls.

Runtime configuration

The mounted startup.yml selects Config Server. The promoted Gateway snapshot defines handler paths, virtual hosts, route policies, MCP tools, backend targets and static assets. Restarting Portal View does not alter that snapshot.

Gateway evidence uses a protected role-specific operational database URL and a published binding. Do not substitute the Portal database connection.

Diagnosis

For an unexpected response, inspect the access log fields for selected handler, policy outcome, backend target and backend status. A Gateway-generated 503 and a proxied backend 503 have different owners. For workflow-backed MCP, an allowed policy outcome followed by WORKFLOW_INVOCATION_UNAVAILABLE means the request passed Gateway policy and the Workflow service failed downstream.