Status 2026-11-29: the MVP stage of the roadmap is implemented, plus parts of v2/v3 (see “Beyond the MVP”), and tested end to end: the user journeys in 03-user-journeys.md run against real Postgres, Docker and WebAssembly. This page is the map from concept to code. It also lists where the build deviates from the concept docs, and why.
cargo build --release # Rust 1.89+; builds the JS guest for wasm32-wasip1
(cd console && npm install && npm run build) # optional: embeds the console UI (rebuild coloa after)
coloa init shop --template shop # or react-ts / blank
cd shop && coloa dev # Postgres (Docker), functions, gateway :4100, console :4001
coloa agent connect claude-code # agent gets its own identity over MCP
COLOA_ACTOR=agent:claude-code coloa deploy --preview pr-1
coloa promote pr-1 # human only; snapshot first
| Crate | Role | Docs section |
|---|---|---|
coloa-audit |
Hash-chained JSONL audit log, file-locked appends, verification | 02 (audit), 03 persona 2 |
coloa-config |
coloa.yaml (egress, secrets, budget, pricing; unknown sections preserved), secret store |
— |
coloa-gateway |
Default-deny egress proxy: allowlist, DNS/SSRF filter, secret injection, leak blocking, response redaction, LLM token metering, budget enforcement | 02, 04 §2, 05 |
coloa-sandbox |
Docker sandbox: internal network + one-port relay so the gateway is the only way out; secrets/policy/.git protected | 04 §2 (microVM/Docker fallback) |
coloa-meter |
Usage records, pricing, month-to-date totals across processes, caps, per-agent token budgets, cost reports | 05 |
coloa-schema |
schema.coloa parser → Postgres tables + row-level security; migration planner |
03 step 2, 04 §3 |
coloa-data |
Environment databases, coloa_app role, migrations, rule-enforced queries, sensitive-value taint, accounts, snapshots |
04 §3 |
runtime-guest/ |
Boa JS engine compiled to wasm32-wasip1 + the function API prelude (db, fetch, Response, auth, env) |
04 §2 |
coloa-runtime |
Wasmtime host: fresh instance per request, fuel/memory/time limits, single host-call import | 04 §2 |
coloa-build |
TypeScript → JS (oxc), import resolution, routes, pre-deploy policy + cost checks | 03 step 4, 05 §2 |
coloa-server |
App server, auth, environments/releases, deploy → promote → rollback, approvals, console API | 03, 04 |
coloa |
CLI + MCP server for agents | 03 |
console/ |
React console (embedded into the binary) | 03 persona 2 |
schema.coloa in one screentable tasks {
owner user @owner // set to the creator, can't be forged or changed
project ref(projects) // foreign key; rules can follow it once
title text
status text @default("todo")
assignee user @optional
note text @sensitive @optional // never in default selects; masked in responses/logs
index(project, status)
allow read: owner == auth.user || assignee == auth.user || auth.role == "manager"
allow create: project.owner == auth.user
allow update: owner == auth.user // any editable column
allow update(status): assignee == auth.user // only these columns
// no delete rule → nobody can delete
}
Types: uuid text int bigint float bool money timestamp date json user ref(t). Attributes: @primary @owner @sensitive @unique @index @optional @default(..). Conditions: == != < <= > >= in, && || !, auth.user, auth.role, auth.email, fields, one ref.field hop.
| Promise | Mechanism | Proven by |
|---|---|---|
| Nothing public unless declared | Tables get RLS + FORCE; coloa_app gets grants only for ops with allow rules; @owner forced to auth.user on create and immutable |
coloa-data/tests/postgres.rs (owner/other/staff/anon, raw SQL as coloa_app, forged owner) |
| Secrets never reach the browser or code | @sensitive excluded from default selects; values read are tainted and masked in responses + logs; secrets are placeholders injected by the gateway |
e2e: masked response, logs, function sees placeholder only |
| Agents can’t touch prod | agent:* actors can deploy previews only; promote/approve/rollback/egress/secret/budget changes are human-only and the refusal is audited; N-human rule for schema changes |
e2e: agent promote/rollback/egress denied; 2-person rule |
| Snapshot before every migration; one-click rollback | pg_dump before each prod migration; rollback restores data + release pointer (and snapshots current state first) |
e2e: data after the snapshot disappears, earlier data intact |
| Default-deny egress, DNS control | Gateway allowlist + own DNS + private/metadata address filter; Docker sandbox has no other route | gateway tests, docker_sandbox.rs escape suite |
| Tamper-evident audit | SHA-256 chain; verify in CLI and console | audit unit tests, e2e tamper check |
| Hard budget caps, cost per request | Every function invocation (fuel, DB queries), egress byte and LLM token is metered; caps enforced in gateway and server | meter tests, gateway budget tests, e2e cost |
| Pre-deploy checks | coloa check / deploy: sensitive reads, unknown tables/columns, ops without rules, egress outside allowlist, N+1 with cost estimate, module state |
coloa-build tests, e2e |
| Leave anytime | coloa export: code, pg_dump per env, audit, releases, manifest |
e2e: archive contents, pg_restore -l |
db.from("orders").select(..).eq(..)); Coloa builds every SQL statement and Postgres RLS enforces the rules. Reason: if app code could send raw SQL on a shared session, it could spoof the session variables RLS relies on (set_config('coloa.user', …)). A wire proxy for Prisma/Drizzle needs a SQL parser that rejects such statements. It moves to v2 (see open questions).cargo build. Trade-offs: slower than SpiderMonkey/QuickJS and some parser gaps. For example, export default async () => … is normalised by the transpiler. Measured ≈10 ms per invocation in a debug build, including instantiation. Benchmarking against StarlingMonkey/QuickJS stays an early spike.https:// fetches to the gateway as http://, so the gateway can inject secrets and originate TLS itself. Raw CONNECT tunnels (sandboxed processes using https://) get allowlist + audit but no injection..coloa/ JSON files with file locks plus Postgres. The 3-node Raft control plane is v2.lib/ only). Bundling is a v2 item.| Suite | Command | Needs |
|---|---|---|
| Unit + integration | cargo test --workspace |
— |
| Postgres rules | COLOA_TEST_DOCKER=1 cargo test -p coloa-data --test postgres |
Docker |
| Sandbox escapes | COLOA_TEST_DOCKER=1 cargo test -p coloa --test docker_sandbox |
Docker |
| S3 storage | COLOA_TEST_DOCKER=1 cargo test -p coloa-storage --test s3 |
Docker (rclone serve s3) |
| Attack demo (typical stack vs Coloa) | tests/attacks.sh [report.md] |
Docker, psql, python3 |
| End to end (163 checks) | cargo build -p coloa && tests/e2e.sh |
Docker, curl, python3 |
| Multi-app server (97 checks) | tests/e2e-server.sh |
Docker, curl, python3 |
| Item (roadmap stage) | Where | Notes |
|---|---|---|
| Services mode, any language (v2) | services: in coloa.yaml, coloa-server/src/services.rs, coloa-sandbox |
Containers on their own internal network, never the agent sandbox’s (coloa-<app>--services): read-only rootfs, no capabilities, memory/CPU limits, egress only via the gateway, one-port ingress relay; /svc/<name>/* with verified user headers, signed per service (see below) |
| Level 2 connectors (v2) | connectors:, coloa-data/src/connector.rs, db.connector(name) |
Postgres only so far; read-only transactions, table allowlist, secret-scoped credentials, egress-checked host, every query audited |
| Spike/bot detection, per-IP limits (v2) | protection:, coloa-server/src/traffic.rs |
Burst at N× the 10-min baseline limits the top sources for 10 min and audits traffic.spike |
| Per-team costs (v2) | owners: (path prefix → team) |
Shown in coloa cost and the console |
| Pre-deploy cost check (v2) | coloa check |
N+1 with monthly estimate |
| Cost advisor (v3) | coloa cost advise |
Rule-based: N+1 rates, hot read endpoints, LLM spend, missing indexes (pg_stat), idle previews, forecast vs cap. No automatic PRs yet |
| White-label console (v3) | console: { brand, color, tagline } |
Console name/colour only |
| App inventory (persona 2) | console | All projects initialised on the machine, with protection level |
| File storage (fixed decision: S3-compatible behind Coloa) | files <name> { … } in schema.coloa, coloa-storage, coloa-server/src/files.rs |
The file’s row in Postgres carries the rules (checked as the user); the contents live in a local folder (.coloa/files/, dev default) or any S3-compatible service (COLOA_STORAGE=s3://bucket/prefix?endpoint=…, SigV4 implemented in Rust and verified against the AWS example and a real S3-compatible server). Size/type limits, sandboxed downloads, metering of transfer (per_gb_files_transfer) and of stored bytes over time (per_gb_month_files, sampled hourly), previews delete their files, export includes them |
SSO for people (coloa server) |
org.yaml sso:, coloa-server/src/sso.rs |
OpenID Connect with PKCE; RS256 ID tokens checked against the provider’s keys; require_mfa checks amr; required makes managing apps (promote, approve, secrets, egress) SSO-only |
| Audit anchoring | coloa audit anchor [--to URL], coloa-audit anchors, coloa-server/src/anchoring.rs |
The head (entry count + hash) is recorded outside the project ($COLOA_ANCHOR_DIR or ~/.coloa/anchors/) at start and every 10 min (COLOA_ANCHOR_INTERVAL); verify fails if an anchored entry is missing or changed (log cut back, deleted or rewritten). org.yaml audit_anchor_url POSTs every app’s new heads to an outside witness. coloa audit reset-anchors is human-only |
Not built yet: cluster-wide rate limits (Valkey or Postgres counters), services on Kubernetes, the Kubernetes operator, multi-region with country pinning, a pre-booted CPython snapshot, Oracle/SQL Server/MySQL connectors, the Postgres wire proxy, npm bundling, monorepo ownership (agents_can_edit), and advisor-generated pull requests.
coloa server)# on the server (shared Postgres via COLOA_DATABASE_URL, or a managed container)
coloa server --listen 0.0.0.0:7700 --domain apps.company.vn
coloa server token lan # human token
coloa server token claude --agent # agent token
coloa server grant an admin # roles (see "Who may do what" below)
coloa server grant lan owner --app shop
# from a project
export COLOA_SERVER=http://apps.company.vn:7700 COLOA_TOKEN=…
coloa push --preview pr-1 # → http://pr-1.shop.apps.company.vn
coloa remote promote pr-1 # human token only → http://shop.apps.company.vn
coloa remote approve apr_0003 | reject | request-promotion | status | audit | apps
coloa remote egress api.stripe.com | secret STRIPE_KEY --host api.stripe.com # humans
<home>/apps/<app>/ with its own state, gateway, audit log, budget and database login (coloa_app_<app>, own password, CONNECT only to its own databases)..coloa/ state. An agent’s push may not change policy sections of coloa.yaml (egress, secrets, budget, pricing, promotion, connectors, protection, services, owners, console). Humans change policy by pushing or through coloa remote..coloa/ and .git/ are never accepted.http://<domain>:<port>/#token=<human token>: all-apps overview (protection, spend, approvals, audit integrity, org compliance), approvals across apps, merged audit log, costs by app and team, organisation policy; pick an app for its full console (policy, schema, environments, logs, report). Agent tokens are refused.<home>/org.yaml): admins, app owners/team, sensitive_fields (must be @sensitive), require_budget, min_approvals / min_schema_change_approvals (floors over each app’s own policy), egress_allowed_hosts, max_previews. Checked on push, egress changes and promotion.Who may do what (crates/coloa-server/src/access.rs):
| Role | Scope | May |
|---|---|---|
admin |
server | everything on every app; grant roles, issue and revoke tokens |
auditor |
server | read every app (status, audit, logs, cost, schema, org policy, members); change nothing |
owner |
one app | read; push; promote, approve, reject, roll back, secrets, egress |
developer |
one app | read; push previews; request a promotion |
viewer |
one app | read |
Grants live in server.json; org.yaml’s admins and owners count too. Once any admin exists, access is by role only: a person sees only the apps they have a role on (others answer “no app”), and creating a new app needs an admin, or an owner grant on the new name. A server with no admin keeps the original single-team behaviour, and the console says so. Manage roles on the machine (coloa server grant|revoke|members), remotely as an admin (coloa remote grant minh developer --app shop, remote revoke minh --all, remote token huy, remote revoke-tokens huy), or on the console’s Members page. The last admin can’t be removed (that would silently reopen the server). Role and token changes, and refused admin actions, go to a hash-chained server audit log (<home>/audit.jsonl, shown on the Members page); refused app actions go to that app’s audit log as access.denied. Agents aren’t given roles: their tokens are limited by --app, and they can never manage.
coloa server token claude --agent --app shop.tests/e2e-server.sh (209 checks: data-theft limits and decoys, passkeys, two apps, shared Postgres, cross-app isolation, agent and human rules, roles, org policy, services, Go and Python functions, zero-downtime rollouts, backups and restore, restart, HTTPS, audit witness).services: run under coloa server too; --tls-cert/--tls-key serves HTTPS.crates/coloa-server/src/backup.rs): one encrypted file per run with the server’s files (tokens, roles, org.yaml, server audit log), every app’s directory (code, releases, state, audit log, approved service code, rollback snapshots, local uploads; caches left out), a pg_dump of every environment database, and the machine key that seals the apps’ secrets. Gzipped, then encrypted in 1 MiB ChaCha20-Poly1305 chunks (counter and last-chunk flag in the nonce), so a modified, reordered or truncated backup is refused. The key is COLOA_BACKUP_KEY, else <home>/backup.key, created on the first backup and announced once: keep a copy off the machine.
coloa server --backup-every 24 --backup-to "s3://backups/coloa?endpoint=https://s3.example.vn" --backup-keep 14
coloa remote backup # now (admins)
coloa server backup --to /mnt/offsite # without a running server
COLOA_BACKUP_KEY=… COLOA_DATABASE_URL=… coloa server --home /srv/coloa restore s3://backups/coloa/coloa-backup-20261201T020000Z.cbk?endpoint=…
Scheduled and API backups hold each app’s lock while copying it, so no deploy runs halfway through. Destinations are a folder or S3-compatible storage (streamed, never held in memory); only the newest --backup-keep are kept there (tracked in coloa-backups.json), and the local copy is deleted once delivered. Restore goes into an empty --home: it unpacks, takes over the machine key (or re-seals every secret store to the new machine’s own key), points apps at the new Postgres, recreates logins and databases, loads the dumps, records restore in each audit log and verifies every chain. It refuses to replace a database that already exists (--overwrite-databases to do it on purpose). Files kept in S3-compatible storage are not copied; keep versioning on that bucket. e2e restores a server onto a new Postgres with a different machine key and checks data, sessions, roles, tokens, secrets and services.
services::LiveServices): a human push, a promotion or a new secret starts the new version of each service next to the old one (own container, own read-only code copy under .coloa/service-code/v<…>/), waits until it answers HTTP, switches requests over atomically, then stops the old version once its in-flight requests finish (at most 30 s). A version that crashes or doesn’t answer within 60 s is removed and the old one keeps serving; the failure and the service’s last output go to the audit log. An agent’s push or an egress change doesn’t touch running services at all. After a restart each service runs the last code that went live for it (service-code/current.json), never a version that failed. e2e sends requests throughout a rollout and requires every one to succeed. Limits: other services calling it by name may briefly reach either version; a coloa promote from another process (next to coloa serve) still restarts the containers.COLOA_CLUSTER_ADDR, crates/coloa-server/src/cluster.rs)Any number of coloa server processes (pods, VMs) share one Postgres and one S3-compatible bucket. Every replica serves app traffic; one, the leader (whoever holds a Postgres advisory lock), makes every change. Turn it on with COLOA_CLUSTER_ADDR (how the other replicas reach this one, e.g. http://10.1.2.3:7700); a replica refuses to start without COLOA_DATABASE_URL, the same COLOA_MASTER_KEY everywhere, COLOA_STORAGE=s3://…, and (with scheduled backups) COLOA_BACKUP_KEY.
coloa_control): the leader publishes changed files (tokens and roles, org policy, each app’s code, releases, environments, approvals, sealed secrets, compiled modules, audit logs) to state_files, each with a new version, app by app under that app’s lock so a deploy is never published halfway. Followers apply newer versions in order and reload what changed (new apps, config, secrets, database settings); new releases are picked up by the usual hot reload. Machine-local things are never shared: caches, CPython, backups, the backup key, uploads (they’re in S3)./_server/…), the console’s API, single sign-on and services to it, adding the client’s address to X-Forwarded-For; a forwarded request is never forwarded again. A change returns only once every live replica has applied it, so the next request anywhere sees it.streams), so logs, costs and budgets are cluster-wide. Audit events raised on a follower (e.g. a refused outbound call) are queued (audit_outbox) and sealed into the chain by the leader: each hash chain keeps exactly one writer, and every replica ends up with the same verified chain.coloa server token|grant|revoke change files, so they must run on the leader (others refuse and name it); restore happens on a single server before forming the cluster.tests/e2e-cluster.sh (25 checks, three local processes: login limits and passkeys across replicas, election, refusals, forwarded push served by every replica at once, shared sessions and data, logs and usage from every replica, one audit chain, failover, the old leader rejoining) and in Kubernetes by tests/e2e-k8s.sh.CREATE ROLE coloa LOGIN PASSWORD '…' CREATEDB CREATEROLE;. Coloa creates coloa_control (clusters), one database per app environment and one coloa_app_<app> login per app, alongside other projects’ databases. App logins are created with no elevated rights and checked afterwards: Coloa refuses to run app code as a login that has SUPERUSER, BYPASSRLS, REPLICATION, CREATEROLE or CREATEDB. Aurora PostgreSQL 13–17 (the image’s pg_dump is 17).COLOA_DATABASE_URL=postgres://coloa:…@<cluster endpoint>:5432/postgres?sslmode=require makes every connection (pools, the cluster, pg_dump) verified TLS: certificate chain and host name. Amazon’s RDS CA isn’t a public root: download https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem and point COLOA_DATABASE_CA at it (Helm: database.caSecret). Without sslmode=require connections stay plain, for Postgres on the same machine. Connection errors the server can’t outwait (TLS, refused logins, pg_hba) fail at once instead of retrying for a minute.COLOA_STORAGE=s3://bucket/prefix?region=ap-southeast-1. With no AWS_ACCESS_KEY_ID, credentials come from the EC2 instance’s IAM role (IMDSv2, refreshed before they expire; AWS_SESSION_TOKEN is honoured with fixed keys too). Pods reach the metadata service only if the instance’s hop limit is 2 (aws ec2 modify-instance-metadata-options --http-put-response-hop-limit 2 --instance-id …). The role needs s3:GetObject, PutObject, DeleteObject and ListBucket on that prefix.tests/e2e-aws-ready.sh (11 checks, locally): Postgres that refuses plain connections with a private CA, a non-superuser role, a fake IMDSv2; plain and unverified connections refused, every Coloa connection TLS, an app with row-level security on that role, S3 through the instance role, a backup’s pg_dump over verified TLS..github/workflows/)ci.yml (every push and pull request): builds the console, runs clippy with warnings as errors, the unit tests including the ones that start Postgres, S3 and sandbox containers (COLOA_TEST_DOCKER=1), and tests/e2e.sh.image.yml (master, v*.*.* tags, by hand): builds the image for amd64 and arm64 on two runners in parallel (Rust cross-compiled natively, see the Dockerfile; layer cache in GitHub’s cache), pushes both by digest to ECR, then publishes one multi-architecture tag set: sha-<commit> and master on master; 1.2.3, 1.2 and latest on a tag. A tag also packages the Helm chart at that version, pointing at that image, and pushes it to oci://<registry>/helm-chart.deploy/aws/github-ecr-role.sh sets it up: the account’s GitHub OIDC provider (once), a role that only this repository’s master branch and v* tags can assume, allowed to push to coloa and helm-chart/coloa and nothing else. Repository variables: AWS_ROLE_ARN, AWS_REGION, ECR_REGISTRY.deploy/helm/coloa, Dockerfile)coloa server with external Postgres, S3-compatible storage and an Ingress or a load balancer: one replica on a volume (default), or cluster.enabled for several replicas (above).
docker build -t registry.example/coloa:0.1.0 . && docker push registry.example/coloa:0.1.0
helm install coloa deploy/helm/coloa -n coloa --create-namespace \
--set image.repository=registry.example/coloa --set image.tag=0.1.0 \
--set domain=apps.example.com --set database.url=postgres://coloa:…@pg:5432/postgres \
--set ingress.className=nginx --set ingress.tlsSecret=apps-wildcard-tls \
--set storage.url='s3://files/coloa?endpoint=https://s3.example.com' --set storage.existingSecret=coloa-s3
kubectl -n coloa exec statefulset/coloa -- coloa server --home /data/server token minh # first admin token
Dockerfile): built from source (console, JavaScript guest, release binary) onto Debian slim with the PostgreSQL 17 client for backups; runs as uid 10001; everything it writes is under /data./_coloa/health (answered on any host, no token). Apps, tokens, roles, audit logs, compiled code and CPython live on the pod’s volume. The master key is generated on first install into a Secret that helm upgrade reuses and helm uninstall keeps (helm.sh/resource-policy: keep), or comes from your own Secret; back it up. Backups are the usual encrypted backups (backup.everyHours, backup.to, backup.existingSecret with COLOA_BACKUP_KEY).--public-https (COLOA_PUBLIC_HTTPS) makes a plain-HTTP server set Secure cookies, https links and HSTS because TLS ends at the proxy; COLOA_TRUSTED_PROXIES (addresses/CIDRs; the chart defaults to private ranges) makes per-address limits use the client’s address: the last X-Forwarded-For hop that isn’t a trusted proxy, never the forgeable first one. SIGTERM stops the server cleanly (services, then exit).<domain> and *.<domain>. Previews (<env>.<app>.<domain>) are two labels deep, which neither an Ingress wildcard nor a wildcard certificate covers: list *.<app>.<domain> in ingress.extraHosts (with certificates for them), or set ingress.catchAll to send every unmatched host of that ingress class to Coloa.--set cluster.enabled=true --set cluster.replicas=3, needs storage.url): a Deployment whose pods advertise their own IP, scratch space instead of a volume (state is in Postgres), a PodDisruptionBudget, optional CPU autoscaling (cluster.autoscaling.enabled). The first token is made on the leader (NOTES prints a loop that finds it).service.type=LoadBalancer (with externalTrafficPolicy: Local) sends traffic straight to Coloa, which routes by host name itself, so no Ingress hop; end TLS in Coloa (--tls-cert) or at the load balancer.services: (they need Docker; a Kubernetes backend is step 2), an operator (step 4).homePage: true (COLOA_HOME_PAGE=1) serves Coloa’s homepage at <domain>/ (built into the binary, docs links pointing at the published docs, a “Sign in” link) and moves the console to <domain>/console, where people paste a token an admin made with coloa server token <name>. The home page stays public even with a private admin listener.ingress.tls lists secrets and their hosts; ingress.certificates creates cert-manager Certificates for exactly the hosts given, so cert-manager renews those (e.g. <domain> over HTTP-01) and leaves other secrets on the same ingress alone (e.g. a wildcard issued by hand).ingress.tlsHosts lists the names the certificate covers (each app, and preview hosts); without it the certificate is for <domain> and *.<domain>. Example deployment: deploy/eks/values-eks-primary.yaml, with its one-time setup deploy/eks/setup.sh (namespace, database URL and RDS CA secrets, an IAM user limited to the bucket, a backup key).tests/e2e-k8s.sh (26 checks) in a throwaway kind cluster with its own kubeconfig: install, probes, non-root pod, first token through kubectl exec, coloa push from the developer’s machine, Secure cookies and HSTS, data in Postgres, restart on the same volume, clean SIGTERM, master key kept across upgrade and uninstall, reinstall; then three replicas with Postgres and S3 in the cluster: token only on the leader, a push through a follower served by every pod at once, deleting the leader pod, pushes still working and the replacement pod serving the new version.Coloa sends each request to a service with the signed-in user in x-coloa-user, x-coloa-role, x-coloa-email and x-coloa-env, plus x-coloa-signature: t=<unix seconds>,v1=<hex>. The signature is HMAC-SHA256, keyed with COLOA_IDENTITY_KEY (in the service’s environment, new on every start, different for every service), over these lines joined by \n:
v1
<t>
<method>
<path and query, as received>
<x-coloa-user>
<x-coloa-role>
<x-coloa-email>
<x-coloa-env>
<hex SHA-256 of the body>
Services that act on the user’s behalf should check it. Then nothing else can hand them a made-up user, not even another service of the same app, which shares their network but not their key. Accept a timestamp within 5 minutes and pass the path exactly as received.
Ready-made, dependency-free verifiers are in sdk/ (see sdk/README.md), all tested against one shared vector that the Rust signer must produce too:
# Python 3.8+: sdk/python/coloa_identity.py
from coloa_identity import verify
who = verify(self.command, self.path, self.headers, body) # None if not from Coloa
// Go 1.21+: sdk/go/coloaidentity (net/http middleware; 401 for unsigned requests)
http.ListenAndServe(":"+os.Getenv("PORT"), coloaidentity.Middleware(handler))
who, _ := coloaidentity.FromContext(r.Context())
// Node 18+: sdk/node/coloa-identity.mjs
import { verify } from "./coloa-identity.mjs";
const who = verify(req, body); // null if not from Coloa
tests/e2e-server.sh runs a Python service and a Go service (built with the Go SDK) under coloa server and checks both.
| Setting | Default | Why |
|---|---|---|
user |
the owner of the service’s dir, or 65534:65534 (nobody) when that’s root or there’s no dir; image keeps the image’s own |
an exploited service holds no root, and can still read its code |
memory |
512m, with no swap beyond it |
a leaking service is stopped, not left to slow the machine |
cpus |
1 |
one busy service can’t starve other apps on a shared server |
| filesystem | read-only, /tmp in memory, code mounted read-only at /app |
|
| network | the app’s own services network; egress only through the gateway |
Services start independently: one that fails (its last output is in the warning and the audit log as service.start, outcome error) doesn’t stop the others. Pushed files keep their executable bit (and nothing else), so compiled binaries run.
agents.require_sandbox, on by default). coloa run --sandbox docker issues a session token, and the gateway takes the agent’s identity from that token, so a sandboxed agent can’t pose as someone else. Agents use Coloa through MCP over HTTP at $COLOA_MCP_URL. On the host, agent-labelled CLI commands, stdio MCP and gateway traffic are refused. Turning this off is a human-only policy change and lowers the protection level..coloa/ and ~/.coloa/master.key. The guarantee holds for agents launched through Coloa; for a hard boundary against anything else on the machine, run it under another OS account. Giving an agent the Docker socket is equivalent to giving it the host.~/.coloa/master.key or COLOA_MASTER_KEY; anyone who can read that key file can decrypt them, so keep agents in the sandbox or on another OS account.COLOA_STORAGE_SAMPLE_SECS) each app server sums the size of its environments’ files tables and records storage <table> usage for the time since the last sample, priced per GB-month (730 hours). It counts rows, so bodies kept only for snapshots aren’t charged, and the time between the last sample and a restart isn’t either. coloa dev meters its dev environment; coloa serve and coloa server meter production and previews.COLOA_IP_LOGIN_LIMIT), audited as auth.limited when reached. In memory on one server; shared by every replica in a cluster (counted in the control database), so spreading attempts over replicas gains nothing.crates/coloa-server/src/passkey.rs, webauthn-rs): app users sign up and sign in with the device’s screen lock or a security key. POST /auth/passkey/signup/{start,finish} (new account, no password), /auth/passkey/login/{start,finish} (no email typed: the device offers its passkeys for this host), /auth/passkey/register/{start,finish} (add one while signed in), GET /auth/passkeys, POST /auth/passkey/delete (never the last way to sign in). User verification (PIN or biometric) is required; the challenge is kept in the app’s database for five minutes and answers once, so start and finish may reach different replicas. Each passkey only works on the host it was made for, which is what defeats phishing; counters are updated on every use. Apps add buttons with Coloa’s helper, <script src="/auth/passkeys.js"> (coloaPasskeys.signUp(email), .signIn(), .add(name), .list(), .remove(id)). auth: { passwords: false } in coloa.yaml turns password sign-up and sign-in off. Tested in tests/e2e-server.sh with a software authenticator (crates/coloa-server/examples/softkey.rs): sign-up and sign-in, one-time challenges, forged signatures and answers made for another site refused, adding a passkey to a password account, the passkeys-only policy; tests/e2e-cluster.sh runs a ceremony across two replicas.crates/coloa-server/src/guard.rs, protection: in coloa.yaml): every identity (a signed-in user, else a client address) has an hourly cap on rows and bytes read through functions, connectors and file downloads (default 20,000 rows and 200 MB; reads: { rows_per_hour, mb_per_hour, block }). Crossing it raises a security alert once per hour; with block: true further reads are refused until the hour has passed. Counts slide over the last hour and are shared by every replica. Decoys are bait nothing legitimate touches: tables (decoys.tables; any query is refused, raises an alert and signs that user out everywhere; coloa check refuses code that names one, so legitimate code never sets it off), app accounts (decoys.emails; sign-in and sign-up attempts get the usual answers and raise an alert), and server tokens (coloa server token old-ci --decoy; refused exactly like a wrong token, with an alert). Alerts go to the audit log (security.read_limit, security.decoy_table, security.decoy_account, security.decoy_token), the app’s log, and are POSTed to protection.alert_url (app) or alert_url in org.yaml (server). Tested in tests/e2e-server.sh./_server/…) and everything on the console’s host (console, its API, single sign-on) can be kept off the public entry point. --admin-listen 10.0.0.5:7701 (COLOA_ADMIN_LISTEN) serves them only on that listener, plain HTTP for a private address, VPN or tunnel (where any host name that isn’t an app’s is the console, so kubectl port-forward and http://localhost:<port> work), and the public listener answers not found for them, even with a valid token, so probing reveals nothing. COLOA_ADMIN_ALLOW=10.0.0.0/8,… answers management only for listed client addresses (resolved behind COLOA_TRUSTED_PROXIES; a forged X-Forwarded-For from an untrusted peer doesn’t help). Apps and /_coloa/health stay public. In a cluster, COLOA_CLUSTER_ADDR should name the admin listener (replicas forward management there). Helm: admin.port (an <name>-admin ClusterIP Service, never behind the Ingress) and admin.allow. Tested by tests/e2e-admin.sh (29 checks).~/.coloa/anchors/; for a hard guarantee, set audit_anchor_url to a witness on another machine. Entries written after the last anchor (up to 10 min) can still be cut silently.coloa.yaml edits via the CLI drop YAML comments.wizer-initialize, via wasmtime-wizer), and each request gets a fresh instance whose memory starts as a copy of that snapshot. A trivial function costs 0.63 ms and 1.8 M fuel (was 5.3 ms / 21.8 M); an app with 40 other 5 KB modules 1.6 ms / 5.8 M (was 119 ms / 525 M before lazy module parsing, then 9.7 ms / 25.5 M) (cargo test --release -p coloa-runtime --test runtime bench -- --ignored --nocapture). Every import traps while the snapshot is taken, so no random seed, clock reading or host data can be baked into it; Boa gets a clock that reads time only when asked. snapshot_is_used_and_shares_nothing checks the snapshot is in use, that one request can’t see another’s globals, and that Math.random and Date.now differ per request. If pre-initialisation fails, the runtime logs a warning and boots the engine per request as before. The compiled snapshot is cached next to the plain guest (guest-<key>-pre.cwasm).crates/coloa-build/src/go.rs, sdk/go/coloa): functions/rates.go serves /api/rates, functions/orders/[id].go serves /api/orders/:id, next to TypeScript ones. Each file is a standalone program (//go:build ignore, func main() { coloa.Run(handle) }); the coloa package mirrors the TypeScript API (coloa.From("orders").Select(…).Eq(…).All(), coloa.Fetch, coloa.Log, ctx.Auth, ctx.Env) and speaks the same host protocol, so access rules, egress, secret placeholders, masking, metering and audit apply unchanged. coloa dev, check, deploy and push compile with Go 1.24+ (GOOS=wasip1 GOARCH=wasm) into .coloa-build/go/ with a manifest of the sources’ hash; coloa init --template go writes go.mod and the SDK (copied into .coloa/sdk/go by every build). Servers never compile (COLOA_GO_COMPILE=0): they run the pushed modules, refuse them when the Go sources changed after the build or a module doesn’t match its hash, and keep them by content hash in .coloa/wasm/ (in releases and backups). The runtime links a compiled module only against WASI (no files, network or environment) and Coloa’s calls, so it can’t import anything else; each request gets a fresh instance under the same fuel, memory and time limits. A warm call takes about 0.74 ms and 5.8 M fuel (the Go runtime starting), against 0.63 ms and 1.8 M for TypeScript (cargo test --release -p coloa-runtime --test go -- --nocapture). Static checks (coloa check’s egress and sensitive-field analysis) read TypeScript only; Go code is held to the same rules at runtime.crates/coloa-runtime/src/python.rs, crates/coloa-build/src/python.rs, crates/coloa-server/src/python.rs, sdk/python/coloa): functions/rates.py serves /api/rates, functions/orders/[id].py serves /api/orders/:id; a file defines handler(req, ctx) or one function per HTTP method (get, post, …; others answer 405), and imports shared code from lib/ (from lib.money import vnd). The coloa module mirrors the other SDKs (db.table("orders").select(…).eq(…).all(), fetch, log, Response.json, ctx.auth, ctx.env); print goes to the function’s log. Python can’t be compiled ahead, so the interpreter is the WebAssembly module: the CPython 3.15.2 WASI build published for each release (github.com/brettcannon/cpython-wasi-build), pinned by the zip’s and python.wasm’s sha256. Servers and coloa dev install it on first use into ~/.coloa/python/3.15.2 (COLOA_PYTHON to put it elsewhere, COLOA_PYTHON_ZIP for a local copy or mirror; the hash is checked either way) and compile its standard library and the SDK to bytecode once, by running CPython itself in the sandbox with only that directory writable. Each request starts a fresh CPython under the usual fuel, memory and time limits, with the standard library and SDK mounted read-only and nothing else: no network, no environment, no other files. CPython only speaks WASI, so the app’s sources and Coloa’s calls travel over its stdin/stdout as JSON lines (sdk/python/coloa/_wire.py); the host answers db, fetch and log calls exactly as for the other languages, so access rules, egress, secret placeholders, masking, metering and audit apply unchanged. Sources ship as they are (no build step); coloa check only checks that each function file defines a handler and none is async. Only the standard library and pure-Python code in the project can be imported. A request costs about 20–25 ms and 120 M fuel (bare CPython start: 58 M; importing json adds ~15 ms, so the protocol avoids it), against 0.63 ms for TypeScript (COLOA_TEST_PYTHON=<unpacked zip> cargo test -p coloa-runtime --test python -- --nocapture). A pre-booted snapshot like the JavaScript one would bring that near 1 ms, but needs CPython built with an exported entry point (see open questions).COLOA_QUERY_TIMEOUT_MS) and waits at most 2 s for a lock; a request keeps at most 200 log lines; each environment’s log rotates at 50 MB (COLOA_LOG_MAX_MB, one older file kept, coloa logs reads the current one); every listener has a 10 s header timeout and at most 4096 connections.no-cache for pages, a year of immutable caching for content-hashed assets, gzip for text (cached in memory, 64 MB). API, auth and service responses aren’t compressed (BREACH).