Skip to content

Latest commit

 

History

History
123 lines (93 loc) · 30.5 KB

configuration.md

File metadata and controls

123 lines (93 loc) · 30.5 KB
title Configuration
description How Tapas's Helm values are organised and the ones most installs set.
sidebar
order
1

All settings are values of the chart in deploy/helm/javo. Every value is listed, with its comment, in the Helm values reference.

Values fall in two groups:

  • Top-level values shape the Kubernetes objects: the image, the database, sizes, ingress, backups, resources.
  • config is the platform's own settings. The chart renders it into the ConfigMap javo-config, which the gateway and the controller both read.

The values most installs set

Value What it does
image.repository, image.digest (or image.tag) The javo image. A released chart already names its image by digest; the source chart does not render until you set one.
database.engine sqlite (default; one pod) or postgres (separate gateway and controller, more than one replica each).
database.postgres.dsnSecret With Postgres: a Secret whose key dsn holds the connection string.
publicHost The host (and port) browsers use. Panel and Bokeh check websocket origins against it. Defaults to config.urls.uiHost.
ingress.* An Ingress for the web UI (and the apps host, when set). config.urls.uiHost defaults to ingress.host.
gateway.secureCookies Marks the session cookie Secure even when config.urls.scheme is http. With https (the default) it is always Secure.
gateway.trustedProxies CIDRs of reverse proxies in front of the gateway, so sign-in rate limits see the real client address. List only the proxy's own addresses: anything listed can forge a client address. Left empty behind an ingress, the gateway cannot tell clients apart and turns per-address sign-in limits off (it logs a warning). Sign-in limits are kept in each gateway replica's memory, so several replicas allow that many times the attempts.
gateway.trustedProxySecret Secret (key secret, at least 32 random characters) your reverse proxy sends in the X-Javo-Proxy-Secret header. Set, X-Forwarded-For is believed only on requests that carry it, and the header is removed before anything else sees it. Set it whenever other traffic can arrive from the proxy's address: on k3s a pod calling the node's NodePort arrives from the same bridge address as a proxy forwarding to that NodePort, and could otherwise pick any client address for the sign-in rate limits and the audit log.
config.auth Sign-in: local accounts and OpenID Connect.
config.sessions.ttl How long a sign-in lasts before the person signs in again. Default 12h.
config.api.tokens.groupsMaxAge How long after its owner's last sign-in (or the last check of their session with the identity provider) an API token keeps working, so someone removed at the provider keeps working tokens for at most this long. After it their apps and job runs also start without their group folders. Default 168h (7 days). A lower value takes tokens and group folders from a removed person sooner, and makes everyone sign in at least that often: otherwise their CI, app and job tokens pause and their scheduled jobs run without group folders. See Sign-in.
config.roles Which groups are platform admins, template admins and members.
config.urls App addresses. uiHost and appsHost, like config.auth.oidc.issuer and clientID, may be Helm templates such as javo.{{ .Values.global.domain }}.
sizes, defaultSize, customSize Sizes.
config.idleStop Idle stop.
config.limits Per-person limits: apps, running apps, jobs, runs, previews, tokens and plans per person, the longest run, and quotas of per-person and per-team namespaces.
database.backup, backupTarget Backups.
workspaceTemplates Turn built-in templates on or off, point one at an image in your own registry, or limit one to groups (allowedGroups) or identity provider roles (allowedProviderRoles).
containerImages Allow the Container image template, and from which registries. On EKS, GKE, AKS and any cluster whose nodes can pull from a private registry (or run a node-local registry), set allowedRegistries: the kubelet pulls a person's image with the node's own registry credentials, so an empty list lets every member run any private image the nodes can read. Tapas pulls these images with imagePullPolicy: Always (a cached image is not reused without the registry's check), runs them as the person's own uid and gid, never offers the platform's imagePullSecrets for them, and checks the list again each time a pod is built.
source.previews Pull request previews.
config.namespaces.mode Where apps run: one shared namespace (shared, default), one per person (per-user) or one per team (per-team).

Security defaults to keep

  • networkPolicy.enabled: true. Apps have no sign-in of their own; the controller keeps a default-deny NetworkPolicy in every app namespace that lets only gateway pods in. It also checks every networkPolicy.probeInterval (6 hours) that the network plugin really enforces it, and templates whose apps have no login start only while it does. The chart refuses to render with it off unless you also set networkPolicy.iUnderstandAppsAreUnauthenticated: true.
  • config.workloads (off by default) isolates people's pods (apps, previews, job runs) further from the node: hostUsers: false runs each in a user namespace of its own, so a container escape lands as an unprivileged uid on the node (Kubernetes 1.33+, with a runtime and kernel that support user namespaces and idmapped mounts for your volume types); runtimeClassName runs them under a RuntimeClass such as gVisor or Kata. Test either on your cluster before turning it on: an unsupported setup leaves pods unable to start.
  • config.workloads.landlock: true (off by default) locks the coding agents (Claude Code, pi, herdr, Harf) in with Landlock. The agent, its terminal and every command they run may read and write only the app's project folder, the agents' own settings and caches (~/.claude, ~/.claude.json, ~/.pi, ~/.harf, ~/.config/herdr, ~/.javo/agent-prompts, ~/.cache, ~/.npm), the pod's scratch volume (/scratch, where the tools' caches and environments go), /tmp and /dev, and only read and run the system folders, the pod files and the installed environments (~/.javo/envs); git settings (~/.gitconfig, ~/.config/git), the clone of an app that runs from a repository (/srv/src) and the Nebi CLI and token are readable. The group folders (/shared) are refused: they hold other people's files. The rest of the home, other projects and dotfiles included, is refused, but for what the app's owner adds: a folder or file of their home, to read only or to read and change. They choose it in the New app form, so the agent starts with it, or later on the app's page ("What can the agent open?"), where saving a change restarts the agent. Only the owner, signed in in the browser, can add anything: an API token that sends folders, the agent's own included, is refused, on a change and on a new app alike. A hidden file or folder at the top of the home (a name that starts with a dot, or anything inside one) is added only after a warning that says what it holds and what follows from an agent reading it, since tools keep their settings and sign-ins there: keys and sign-ins (~/.ssh, ~/.gnupg, ~/.git-credentials, ~/.netrc, ~/.config/gh, ~/.aws, ~/.kube, ~/.docker), the files a shell runs at every start (~/.bashrc, ~/.bash_profile, ~/.profile, ~/.zshrc, ~/.zshenv) and every other such file or folder (~/.npmrc, ~/.local). The API takes such a grant only with risky: true on it, and the controller opens nothing for a stored grant without it. Never added, with or without the warning: the home itself, ~/.javo, ~/.config/javo (the owner's sign-in to Tapas: an agent that has it lifts its own lock) and a folder around one of those (~/.config as a whole; what else is in it is added one by one). What every agent has open already (its settings and caches above, and ~/.gitconfig and ~/.config/git to read) is not on the list to add. In a pod, an agent whose owner added ~/.ssh or a file in it sees the real folder in place of the one with public files only, and the lock opens just what was added of it; the ssh-agent beside the app stays. A hidden name inside a folder that is not hidden (~/projects/api/.github) can be added. An agent app with no folder works in ~/projects/<app name> instead of the whole home (Harf too, in place of ~/workspace). The folder, each of the agents' folders above and each folder the owner added must be a real folder all the way down from the home: when one of them is a symbolic link, or is reached through one, the agent does not start and its log names the link, since a link in the home may lead to any other part of it. An app or job that a coding agent's own API token created, or whose command, file or variables it changed, is held to that agent's limits, so an agent cannot get out by asking Tapas to run a command for it: it never sees the private SSH keys (its ~/.ssh is an empty folder, with the lock on or off, also when its agent was let into ~/.ssh), and with the lock on its command, or the whole run of the job, starts in that agent's lock, with the agent's folder and added folders, those added after a warning included, and nothing else of the home (a job also gets ~/jobs/<job name>, where its runs are kept). What cannot start inside the lock does not start (AgentLockUnavailable): the agent is gone, the template has none of the platform's files (an image of the person's own, a built site), or the app or job runs from a repository or brings an environment of its own. It stays so until its owner changes what it runs in the browser; no token, the owner's own included, lifts it. Only file access is locked, not the network. The nodes need Landlock version 3 (Linux 6.2 or later, with landlock in the kernel's lsm= list): on an older kernel the agent does not start, and its log says why.
  • config.auth.deviceLogin.enabled: true (the default) lets a coding agent on a person's computer sign in by showing them a link and a code that they approve in the browser (deploy from your computer); the agent gets a read-write token of that person for 8 hours, or config.api.tokens.maxLifetime when shorter. Anyone who reaches Tapas can start such a request and send its link to someone, so the approval page shows the code to check against the agent's, the address the request was started from (and says so when it is not the approver's own) and the name the agent gave itself. One address starts at most ten a minute, and all addresses together sixty and then one a second. Behind an ingress or load balancer, list it in gateway.trustedProxies: without that every request comes from the proxy's address, so the page shows no address and only the limit for everyone applies. Set enabled: false to turn the sign-in off: no /llms.txt, no /api/auth/device, and agents work only with tokens people make in Settings.
  • securityContext: the gateway and controller run as non-root with a read-only root filesystem and no capabilities. App namespaces are labelled for Pod Security "restricted".
  • networkPolicy.egress. The controller also keeps a limit-egress NetworkPolicy in every app namespace. By default app and job pods reach the public internet and, inside the cluster, only DNS (port 53 of the k8s-app=kube-dns pods in kube-system and of the name servers pods are given, for a node-local DNS cache), the gateway pods on their HTTP port (gateway.port; with SQLite the same pod serves the controller's metrics and health ports, which stay closed to apps) and the pods of their own namespace. Everything else in the cluster is blocked: pods in other namespaces (the database, the identity provider, the controller's metrics, Nebi), the private, carrier-grade NAT, link-local and loopback ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, 169.254.0.0/16, 127.0.0.0/8, fc00::/7, fe80::/10), where nodes, the API server and storage servers usually are, the reserved ranges some clusters run pods or services on (0.0.0.0/8, 192.0.0.0/24, 198.18.0.0/15, 224.0.0.0/4, 240.0.0.0/4, ::/128, ::1/128, ff00::/8), the IPv6 ranges that reach IPv4 addresses (NAT64 64:ff9b::/96 and 64:ff9b:1::/48, 6to4 2002::/16), and every node's own addresses and pod ranges even when they are public (a single machine, bare metal and many small clouds give nodes public addresses; traffic from a pod to its node never crosses a cloud firewall, so the node's SSH, kubelet and NodePorts would otherwise be open to apps). The controller follows the nodes: a node that joins is denied within moments. A Service range outside all of these must be added to denyCIDRs. denyCIDRs blocks more on top: by default the cloud metadata addresses (169.254.169.254/32, fd00:ec2::254/128, GCP's fd20:ce::254/128, Alibaba's 100.100.100.200/32) and Azure's WireServer (168.63.129.16/32), which stay denied with allowCIDRs too. To let pods reach chosen in-cluster services, list their namespaces in allowNamespaces (pods are matched by namespace, since some network plugins, Cilium, never match pods by address) or their private ranges (or a node's address, for a service that runs on the nodes) in allowClusterCIDRs. Apps with API access call the API at config.urls.uiHost: if that address leads to an ingress controller in the cluster rather than straight to the gateway pods, add the ingress controller's namespace to allowNamespaces. Set allowCIDRs to a list to let pods reach only those ranges (less denyCIDRs) instead of the public internet; DNS, the gateway, their own namespace and the two lists above stay reachable. File picker pods keep no egress at all either way.
  • controller.metricsFrom. The chart keeps a javo-ingress NetworkPolicy on Tapas's own pods in the release namespace: anyone may reach the gateway's HTTP port and the controller's health port, nothing else. The controller's metrics (plain HTTP, no authentication) are served on 127.0.0.1 only, which kubectl port-forward still reaches; list the namespaces of your metrics scraper in controller.metricsFrom (for example [monitoring]) to serve them on every address and admit those namespaces only. Other pods you place in the release namespace are not selected by this policy.
  • Admission policies on the controller (Kubernetes 1.30+). The controller holds cluster-wide rights to create RoleBindings and patch namespaces, because app namespaces are created later. The chart adds ValidatingAdmissionPolicies that make the API server refuse anything else from the components' service accounts. RoleBindings: only in namespaces labelled javo.nebari.dev/managed=true whose Pod Security level is restricted, only to the chart's two app ClusterRoles, and each only to its own component's service account. Namespace creation: only the names the placement produces (<config.namespaces.prefix>-... other than the release's own namespace, the probe namespace <release namespace>-netprobe, or in shared mode the workspace namespace), always labelled managed with all three Pod Security labels restricted. Namespace patches: only on managed namespaces (and in shared mode the workspace namespace), changing only javo.nebari.dev/ labels and annotations and setting Pod Security labels only to restricted. The controller never takes over a namespace someone else made, even one named like Tapas's: to have Tapas use a namespace you created yourself in per-user or per-team mode, label it javo.nebari.dev/managed=true and pod-security.kubernetes.io/enforce=restricted (and warn, audit) yourself. Neither component may create a kubernetes.io/service-account-token Secret, which Kubernetes would fill with a token that never expires. The RoleBinding policy is rendered only in per-user and per-team modes. The chart needs a cluster that serves admissionregistration.k8s.io/v1 ValidatingAdmissionPolicy (Kubernetes 1.30+) and refuses to render without it, in every mode: helm install and helm upgrade find that out themselves, but helm template (and Argo CD) must be told with --api-versions admissionregistration.k8s.io/v1/ValidatingAdmissionPolicy. With the default SQLite engine the one pod runs the internet-facing gateway as the controller's account, so these policies also bound what a compromised gateway could do there.
  • Admission policies on the gateway (Kubernetes 1.30+, database.engine: postgres). The internet-facing gateway may create pods in app namespaces for the file picker, and a pod creator there could mount any Secret or claim. Two more ValidatingAdmissionPolicies hold the gateway's service account to exactly the file pods it builds: named javo-files-<owner> and labelled only javo.nebari.dev/role=files and javo.nebari.dev/owner=<owner>; one container running files.image as rcd --rc-addr=:5572 --rc-serve with no command of its own and no init containers; claims mounted read-only and emptyDir volumes, except the owner's own home (home-<owner> or a generation home-<owner>-<n>); literal environment variables only, plus the rclone password from the pod's own Secret; no service account token; a uid in config.identity.uidRange (or 1000 when uids are fixed); no node name and no tolerations beyond the ones the API server adds. The only Secrets it may create there are those passwords (<pod>-rc-<16 hex>, owned by the pod, holding only the password), so it cannot plant a Secret another component reads. The policies cannot check that the uid is the owner's or read the home claim's owner annotation; the gateway checks that annotation itself. The file pod's password is in that Secret, not in the pod spec, so whoever may read pods in an app namespace does not learn it. With SQLite the one pod runs the gateway as the controller's account, which creates every kind of app pod, so the two are one trust domain: these policies are not rendered, and a flaw in the gateway has the controller's rights (still bounded by the controller policies above). Use Postgres where that separation matters.

Logs, traces and metrics

Value Default What it does
telemetry.logFormat json How the gateway and the controller write log lines: json, one object per line, for a log collector, or text. The Kubernetes client and the controller library write in the same format, to the same stream.
telemetry.logLevel info The least important lines written: debug, info, warn or error.
telemetry.otlpEndpoint empty An OpenTelemetry collector's OTLP/HTTP address, such as http://otel-collector.monitoring:4318. Every request to the gateway is then a trace span, sent there with the HTTP server metrics (request count, duration, sizes), and a log line written while serving a request carries its trace_id and span_id. A request that arrives with a W3C traceparent header continues that trace. Empty: nothing is sent, and log lines still carry the trace of a caller that sent one.

Each value is a flag of javo server, javo gateway and javo controller (--log-format, --log-level); the collector is the standard OTEL_EXPORTER_OTLP_ENDPOINT environment variable, and the other OTEL_EXPORTER_OTLP_* variables (headers, protocol details, a separate _TRACES_ or _METRICS_ endpoint), OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES and OTEL_SDK_DISABLED work as the OpenTelemetry specification says. javo local writes text.

Request limits

config.api.limits bounds what requests may hold in the gateway, so one person or a slow client cannot use up its connections or memory. The defaults suit most installs.

Value Default What it does
streamsPerPerson 8 How many followed logs (an app's live log, a startup step's log, a running job's log) one person may have open at once, all kinds together. Each holds a connection to the cluster. Another is refused with 429 until one is closed.
thumbnailDecodes 4 How many uploaded app pictures the gateway decodes at once, for everyone. Each may take up to 64 MB of memory. An upload beyond that is answered 503 with Retry-After, and the person tries again.
bodyReadTimeout 60s How long a request to the API, sign-in or MCP may take to send its body (an uploaded file, a saved file). A slower client is cut off. Folder uploads have their own limit, uploadReadTimeout. Requests without a body, such as log streams, and the traffic of apps themselves are not affected. Raise it if people upload files over very slow links.
uploadBytes 104857600 (100 MiB) The most a folder upload (PUT /api/files/archive, which a coding agent on a person's computer uses to deploy a folder) may unpack to, and the most its compressed body may be. A larger upload is refused with 413. Replacing a folder needs room for a second copy in the person's home while it runs.
uploadFiles 10000 The most entries (files, folders) one folder upload may hold. More are refused with 413.
uploadReadTimeout 10m How long a folder upload may take to send its body, in place of bodyReadTimeout. At 100 MiB, 60 seconds would cut off anyone uploading slower than about 1.7 MiB/s.

Paths in the file browser and editor may have at most 64 folders and names; deeper paths are refused.

Failure notices for jobs

notifications.enabled lets the controller send notices of failed job runs with notifications-engine: services, templates, triggers and subscriptions go in the ConfigMap named by notifications.configMapName, credentials in the Secret named by notifications.secretName. Set notifications.webhookURL and the chart renders an example ConfigMap that posts failed runs to it. A job's failure message and display name come from the job's owner, so before they reach a template they are cut to 500 characters and escaped for the service type: an @ that starts a word gets a zero-width space after it (no @channel or @here), links are written as evil[.]example/x and https[:]//, and &, < and > become entities. For a webhook, quotes become apostrophes, backslashes become slashes and line breaks become spaces, so the text is safe inside a JSON string written by hand or with toJson. One job sends at most one notice every 5 minutes; the failed runs in between are not sent.

Running without Kubernetes

The chart always runs apps on the cluster it is installed in. A javo server with a config file of its own can run them on one Docker daemon (deploy/compose/docker.yaml is such an install), or as plain processes of the machine it is on, with no cluster and no kubeconfig. The config file then names the executor at its top level:

Key Default What it does
executor kubernetes What runs apps: kubernetes, docker or process.
keysDir none For docker and process, required: the folder Tapas keeps its own keys in (secrets-key, sessions-key, secret-fingerprint-key), made on the first start. The folder must be mode 0700 and each key 0600, owned by the user Tapas runs as.
docker.socket /var/run/docker.sock The Docker daemon's unix socket. Whoever holds it is root on that host.
docker.gateway none Required: the name of the container Tapas itself runs in. Apps reach only that container, and apps of another Tapas on the same daemon are told apart by it. Tapas must run inside it: that container is on every app's network, which is how Tapas checks an app's port, reads people's files and serves the apps' proxy.
docker.pool 10.213.0.0/16 The private IPv4 range the apps' networks are cut from, 16 addresses each.
docker.runtime the daemon's own A container runtime every app runs in, such as runsc.
docker.proxyPort 3128 The port of Tapas's container where apps find the forward proxy that is their only way to the internet (HTTP and HTTPS, so git over SSH does not work). Do not publish it to the host.
process.stateDir none Required: the folder Tapas keeps the apps' logs, ports and secret files in (mode 0700).
process.homesDir none Required: the folder each person's home is a folder of (mode 0700).
process.pixi pixi on PATH The pixi binary that installs the apps' environments.
process.filesDir none The folder with the platform's files, laid out as the platform's image holds them.

Tapas does not start when it cannot keep such an install safe. With either executor: a key or a folder that its group or others can open, a flag that only means something on Kubernetes (--network-policy, --sessions-key-secret, --metrics-bind-address and the like: Tapas then listens on --listen only, and on Docker on docker.proxyPort), javo gateway or javo controller alone, and the sections namespaces, workloads (all of it but workloads.landlock), storage, limits.namespace, backup.s3, memory and source.previews.enabled. With docker: a daemon that does not answer or is older than Docker 28.0, a docker.runtime the daemon lacks, no container called docker.gateway, or a Tapas that does not run inside that container. With process, which isolates nothing from the account Tapas runs as and so serves one person on their own machine: running as root, a --listen address that is not loopback, auth.oidc, a second person, in the database at start or at sign-in, and the flags below that Docker reads.

On Docker a home is a named volume per person, the file browser reads it through a small rclone container per person (--files-image, --files-idle-after), and what apps may reach through the proxy follows --egress-deny-cidrs, --egress-allow-cidrs and --egress-allow-cluster-cidrs as a NetworkPolicy does on a cluster; the cloud metadata address, loopback, the Docker networks and Tapas's own container are never reachable. An app with no sign-in of its own starts once Tapas has measured that an app's network reaches nothing but Tapas's container (--netprobe-interval, --netprobe-timeout); it measures again at every start.

With process an app with no sign-in of its own starts without such a measurement. Tapas listens on loopback and serves one person, every app is told to listen on loopback, and an app that opens a port to the network is stopped. Other users of the same machine, and every program on it, can still connect to such an app's port directly, past Tapas's sign-in. A template that needs an image cannot run there, as an app or as a job.

workloads.landlock: true locks the coding agents in on either executor, as on a cluster (see config.workloads.landlock above). With docker the daemon's kernel must have Landlock version 3 and the daemon's seccomp profile must allow its system calls, which Docker's own profile does; under a docker.runtime without Landlock (gVisor) the agent does not start, and its log says why. With process the agent is locked in on Linux only, through bin/javo-sandbox of process.filesDir, to the folders of that machine (its project in the person's home, the platform's files, its environment), and ~/.ssh is refused as well, since nothing keeps the private keys apart there: Tapas does not start when that program cannot lock a command in, and on a Mac, where there is no Landlock, it does not start at all with the lock on rather than run the agents with every file of the person's in reach.

One binary on your own machine

javo local is javo server with executor: process and nothing to prepare: no config file, no flags, no folders and no javo user add. The binary carries the web UI, the built-in templates and the platform's files, and is built with make local (bin/local/<os>_<arch>/javo; make local LOCAL_PLATFORMS="darwin/arm64 linux/amd64" builds for other machines). The binary of the image and of the releases does not carry them, and its javo local says so.

Flag Default What it does
--port 8686 The port of 127.0.0.1 Tapas listens on; 0 picks a free one. It listens on no other address.
--dir $XDG_DATA_HOME/javo, else ~/.local/share/javo The folder everything is kept in, on Linux and macOS alike. It is made mode 0700, and Tapas does not start when it, or the files folder in it, belongs to another user or can be opened by anyone else, or when its path has white space in it.

In that folder: javo.db (the database), keys (Tapas's keys), homes (your home folder as apps see it, with the environments they installed under .javo), state (the apps' logs, ports and secret files) and files/<hash> (the platform's files, unpacked from the binary on the first start and again only by a binary that carries other ones, which also removes the old). Nothing is written anywhere else, and removing the folder removes everything.

On the first start Tapas makes one account, local, the platform's admin, with a random password that is kept nowhere. You sign in with the link it prints in the terminal, which works once; opening /signin prints the next one. Tapas answers only requests sent to 127.0.0.1 or localhost at its port, and only from its own pages: a page of another site, or of another port of the same machine, cannot call the API, open an app or a websocket with your session. Everything executor: process refuses is refused here too.

Environments are installed by pixi, which Tapas neither carries nor downloads: it uses the one beside its own binary, else the one on PATH. Without it Tapas starts and the UI works, and an app or a job that needs an environment fails and names pixi as the reason (a small script, no-pixi in the folder, stands in for it and says so). The templates that need an image (container, rstudio, static-site, harf, backup) are not in the binary, nor, on macOS, the two that need Julia. The terminal and the coding agents need the terminal page, which is generated from the ttyd binary and an npm package as the image build does (pod/terminal/page.mjs): pass it as make local TERMINAL_PAGE=<terminal.html>, or they show a page that says it is missing.

Not available without Kubernetes: group folders (a folder asked for says so), home sizes, backups and moves, the storage report and placement preview, previews and failure notices. The API answers these with 501, and javo home, javo storage and javo user remove --delete-home refuse; javo user remove forgets a person's home and leaves its volume or folder where it is.