Networking And Identity
Networking And Identity
Section titled “Networking And Identity”sigMAX can publish application APIs and generated frontends through a Traefik reverse proxy, configure HTTPS certificates, delegate authentication to Authentik and provide WireGuard access. These services surround the execution runtime: a WASM module receives declared inputs and capabilities rather than configuring its own public listener.
The operations below are implemented in the current Studio generators and container topology. Core places Host and Config on the same machine with Docker Compose. Pro uses Kubernetes and the COS2000 executor in KubeVirt VMs. The inspected networking code operates containers through the Docker/Podman Engine API; it does not establish a complete Kubernetes ingress or KubeVirt deployment package.
Reverse Proxy And Routes
Section titled “Reverse Proxy And Routes”Traefik is the application reverse proxy.
- Configure in Studio — Record domains and resolve them against generated component routes.
- Generate — Produce
generated/ingresses.yaml. - Publish through Traefik — The ingress runtime translates the file into routers, services and middleware.
| Publishing scope | What it routes |
|---|---|
| Application | Generated HTTP routes across the application’s components. |
| Component | A selected component behind a hostname and path prefix. |
| WASM operation | The existing HTTP route associated with a selected module; the request still passes through its component runtime. |
| Frontend | The generated FrontMark application served by sigmax-front-ui. |
| Identity provider | Authentik at a dedicated hostname and root path. |
Routing combines a hostname with PathPrefix. Longer prefixes receive higher priority. A component published under an additional prefix can use stripPrefix; if its own routes already include that prefix, the generator preserves it. Application and module mappings can use replacePath to reach the declared backend route. A frontend mounted below a prefix can strip that mount prefix before forwarding.
For example, a component whose own endpoint is /orders can be published below /api: the public request /api/orders reaches /orders in the component. When the component already owns /api/orders, the generator can preserve that path instead.
The ingress runtime watches generated configuration and atomically replaces its dynamic Traefik file. Changes to routers and middleware can therefore reload while Traefik is running. Certificate resolvers and entry points belong to its startup configuration and require a restart when changed.
HTTPS And Certificates
Section titled “HTTPS And Certificates”| Setting | Implemented behavior |
|---|---|
| HTTP | Routes can run without TLS. localhost is explicitly normalized to HTTP. |
| HTTPS | The HTTP router redirects to HTTPS; the HTTPS router selects an ACME certificate resolver. |
| HTTP challenge | Certificate validation uses Traefik’s HTTP entry point. |
| DNS challenge | Supported configuration providers are Cloudflare, Route 53, DigitalOcean, OVHcloud, Gandi LiveDNS and Hetzner DNS. |
| Wildcard hostname | TLS validation requires the DNS challenge. Authentik’s generated integration does not support wildcard protected origins. |
| Certificate state | ACME state is stored in a persistent ingress volume, with restricted permissions on acme.json. |
HTTPS configuration requires an ACME email address. DNS credentials are stored through the project’s private-object mechanism and injected into the ingress container for the selected providers. DNS records, reachable challenge endpoints and valid provider credentials still determine whether certificate issuance succeeds.
The inspected generator has no selectable self-signed HTTPS mode or custom certificate upload workflow. Authentik’s blueprint does reference its self-signed certificate for OIDC token signing; that is separate from the browser-facing TLS certificate managed by Traefik.
Public And Private Exposure
Section titled “Public And Private Exposure”In the current topology, a component started while the project’s Traefik container is running has no direct host port binding. Requests reach it over the runtime network through the proxy. Without Traefik, component startup publishes its runtime port on the host. This choice happens when the component starts; starting Traefik later does not rewrite an already running component’s port bindings.
The generated frontend remains on the private runtime network. PostgreSQL, MinIO, the storage adapter, the file adapter and the application Redis cache also use that network rather than public application routes.
These are exposure choices, not a separate VM boundary. Core still runs WASM inside the containerized runtime without the dedicated execution isolation provided by Pro’s COS2000 VM architecture.
The inspected development topology publishes the Traefik dashboard port on all host interfaces and enables its unauthenticated dashboard mode. It should not be described as a protected administrative interface. Authentik’s direct server ports, the WireGuard administration port and the monitoring query ports use loopback host bindings.
Authentication And Identity
Section titled “Authentication And Identity”The Authentik integration generates provider configuration and starts an Authentik server and worker with PostgreSQL storage. Traefik calls the Authentik outpost through ForwardAuth before forwarding protected application requests. When this integration is enabled, generated routes are protected except for Authentik itself and the outpost callback routes.
| Capability | Current implementation |
|---|---|
| Browser authentication | Generated OIDC configuration for authorization code flow, a public client and PKCE S256. Redirect URIs are explicitly registered. |
| Provider sessions and tokens | The blueprint configures five-minute access tokens and eight-hour refresh tokens. These values do not define an independent sigMAX session store. |
| User accounts | Blueprints declare usernames, names, email addresses and active state. |
| Service accounts | Blueprints declare expiring Authentik app-password tokens. The outpost handles service authentication before the runtime. |
| Request identity | Subject, selected claims, groups and entitlements can populate the host’s request context. |
| Application authorization | WASM host primitives can inspect roles and permissions; application rules decide what an authenticated identity may do. |
The runtime maps Authentik groups to roles and entitlements to permissions when trusted identity headers are enabled. It exposes only allowed claims and prevents raw authorization, cookie and identity headers from becoming ordinary declared request-header inputs for WASM.
This integration relies on the trusted proxy path. The current Rust runtime requires identity context when configured by Studio; it does not independently validate an Authentik JWT simply because the generated manifest includes an issuer and JWKS URL. Backend reachability and header trust must match that deployment model.
The generated blueprint does not contain user passwords, administrator tokens or the resulting service-token keys. Starting the containers creates the provider services and a persistent secret key, but does not prove that initial administrator setup, user credential enrollment or application role policies are complete. Those steps belong to the Authentik configuration used for the deployment.
WireGuard Access
Section titled “WireGuard Access”The WireGuard extension manages a wg-easy runtime and client profiles. Studio can configure the public endpoint, UDP port, server address, DNS servers, allowed IP ranges and keepalive, then add, inspect and remove clients. Client configuration files and QR codes are available for enrollment.
The topology publishes the configured VPN UDP port and binds the administration port to loopback. The runtime uses a persistent configuration volume, /dev/net/tun and the networking capabilities needed by WireGuard. Its ability to start depends on the host’s tunnel support and permissions.
WireGuard supplies a network access path. Application routes, authentication and authorization still determine which operations a connected client can use.
Studio Gateway And Generated Frontend
Section titled “Studio Gateway And Generated Frontend”There are three distinct web services in the inspected implementation:
Nginx Studio gateway
Proxies the Studio UI and API, including streaming and WebSocket connections, through a common entry point.
Generated FrontMark frontend
Runs as a versioned sigmax-front-ui image on the private runtime network.
Traefik application ingress
Publishes the generated frontend and component APIs with hostname, path, TLS and optional ForwardAuth rules.
Nginx is therefore a real reverse proxy for Studio. It is not the WASM executor, and the application publishing path inspected here uses Traefik.
Implementation References
Section titled “Implementation References”This page follows studio/apps/worker/src/stages.ts, studio/apps/ingress-runtime/src/index.ts, studio/apps/api/src/services/ingresses.ts, studio/apps/api/src/services/authentik.ts, studio/apps/api/src/services/wireguard.ts, studio/apps/topology/src/docker.ts, studio/apps/topology/src/runtime-port.ts, studio/nginx/studio.conf and runtime/src/main.rs in sigMAX_runtime.
See also file storage, database storage and observability.