Files
agent/ui
Cédric VerstraetenandClaude Opus 5.5 c0baade8fd security: require authentication everywhere and drop the default JWT key
- JWT signing key: without AGENT_JWT_SECRET, generate a random secret on
  first start and keep it in data/config/jwt_secret (0600) instead of
  falling back to a publicly known constant. AGENT_JWT_SECRET still takes
  precedence, so deployments that share a key with Kerberos Factory are
  unchanged.
- Only tokens for the configured account are authorised, and malformed
  token claims are rejected instead of panicking.
- /ws (live view) and /file (recordings) now require a valid token. The UI
  passes it as ?token=, since browsers cannot set headers on WebSocket
  connections or <video src>; it no longer opens the socket before sign-in.
  /file no longer sends its own wildcard CORS header.
- pprof is off by default; AGENT_ENABLE_PPROF=true registers it behind auth.
- Release workflows pass tags to shell steps through quoted environment
  variables and validate them; the shared release-bump workflow is pinned
  to a commit and no longer receives inherited secrets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:17:28 +00:00
..
2022-06-05 21:36:22 +02:00
2022-08-15 22:08:08 +02:00
2026-11-21 22:08:02 +00:00

Kerberos Agent UI

The web interface of the Kerberos Agent: a React app built with Vite and tested with Vitest. Requires Node.js 20.19 or newer.

Scripts

  • yarn start: starts the dev server on http://localhost:3000 with hot reload.
  • yarn build: builds for production and moves the output to ../machinery/www, where the Agent serves it.
  • yarn preview: serves the production build from ../machinery/www on port 3000. Run yarn build first.
  • yarn test: runs the test suite once. yarn test:watch keeps it running.
  • yarn lint: lints src/ with ESLint.
  • yarn format: formats the code with Prettier.

Configuration

In development the UI talks to the Agent API on port 8082 of the same host. Override it with VITE_AGENT_API_PORT:

VITE_AGENT_API_PORT=9090 yarn start

In production builds the UI uses the host and port it was served from.

Runtime settings that differ per deployment (such as demo mode) live in public/env.js, which the Agent can replace without rebuilding the UI.

Layout

  • index.html: the HTML entry point; Vite injects the bundle here.
  • src/: application code. src/index.jsx is the entry module.
  • public/: copied unchanged to the build root (favicons, fonts, locales, env.js).
  • Bundled JS, CSS and assets go to static/ in the build, so they don't mix with the assets/ folder from public/.