Console

Proxy auth

Reach Console remotely through Tailscale, Cloudflare Access, or a proxy with a shared secret. Each must prove who the user is.

In proxy mode Console trusts an identity only when the proxy proves it. A header alone is spoofable whenever the network path is not what you think; Docker's userland proxy, for example, makes every client look like the bridge gateway. A request without a valid proof is 401. A proven identity that is not a Console user is 403, unless auth.default_role is set.

Named tokens (Authorization: Bearer vct_...) work in every mode, for scripts.

Tailscale

# <home>/console.yaml
auth: { mode: tailscale }
users: { "[email protected]": controller, "[email protected]": admin }

Console asks the local tailscaled (LocalAPI whois, over /var/run/tailscale/tailscaled.sock, or auth.tailscale.socket) who owns the connection, by its ip:port. Headers the client sends do not count, with one opt-in exception below. A connection from this machine's own addresses, its tailnet address included, never gets an identity: whois would name this node's owner, so any process on the host could sign in as them.

There are two ways to put Console on the tailnet. They differ in what a process on the same host can do.

Bind the tailnet address (recommended where agents run). Console listens on this machine's tailnet IP, and every other node connects to it directly:

viewport-console serve --host 100.101.102.103 --port 7071 --no-open

whois proves each remote connection. A process on this machine that connects, from loopback or from the tailnet address, gets no identity (401). Set public_url to the address users open (http://100.101.102.103:7071, or the machine's MagicDNS name), so Console accepts that Host.

Tailscale Serve (HTTPS, only where nothing untrusted runs). tailscale serve terminates HTTPS on the node's ts.net name and proxies to Console on loopback:

auth: { mode: tailscale, tailscale: { trust_serve_headers: true } }
public_url: https://box.tailnet-name.ts.net
tailscale serve --bg 7071

A proxied connection arrives from 127.0.0.1, where whois usually cannot name the user, so Console trusts the Tailscale-User-Login header Serve sets, but only on a loopback connection and only with trust_serve_headers: true (off by default; without it every request through Serve is 401). Any process on this machine can also connect to loopback and send that header, and so sign in as any user in console.yaml. Use Serve only on a host where no agents or other untrusted processes run, such as a dedicated Console machine or container. doctor warns while the setting is on. When tailscaled itself maps the loopback connection to the node it came from, whois of its ip:port decides and the header is ignored.

Do not set auth.default_role in Tailscale mode: tagged devices (servers, CI runners) resolve to the login tagged-devices, so every tagged machine on the tailnet would get that role. List users explicitly.

Cloudflare Access

auth:
  mode: cloudflare-access
  cloudflare_access: { team: acme, audience: "<application AUD tag>" }
users: { "[email protected]": viewer }

Every request's Cf-Access-Jwt-Assertion is verified against https://acme.cloudflareaccess.com: signature (the team's JWKS), issuer, audience and expiry. The JWT's email is the identity.

A proxy with a shared secret

auth:
  mode: header
  header:
    identity_header: X-Forwarded-Email
    trusted_proxies: [10.0.0.0/8]
    secret_env: VIEWPORT_CONSOLE_PROXY_SECRET

The proxy sets X-Viewport-Proxy-Secret to the value of VIEWPORT_CONSOLE_PROXY_SECRET (16 characters or more; compared in constant time) and the identity header. The connection must also come from a trusted_proxies address. All three are required.

Roles and tenants

RoleMay
viewerRead daemons, sessions, inbox, evals, receipts, runs
controllerViewer, plus answer approvals and control sessions
adminController, plus pair and unpair daemons, sources, users and tokens

A daemon that paired Console as a viewer cannot be controlled through Console by anyone. Users and tokens can be scoped to tenants (users: { "[email protected]": { role: controller, tenants: [acme] } }). A scoped principal sees only its tenants' records; records without a tenant are visible only to unscoped principals.

On this page