# Security and isolation This page says what Kilby does to keep one customer's code and data away from another's. It lists what is true today and nothing more. ## One namespace per workspace Every workspace gets its own Kubernetes namespace, named `kt-`. Its services, databases, secrets and domains live there and nowhere else. Every query Kilby makes for the dashboard and the API is scoped to the workspace of the signed-in person or the API key, so one workspace cannot read or change another's data. ## What a service can reach A network policy named `kilby-isolation` is applied to every workspace namespace. It allows: - Traffic **in** from the other services of the same workspace and from Kilby's public proxy only. - Traffic **out** to the same workspace, to the cluster's DNS and to the public internet (on Hobby and in the beta, without the email ports 25, 465 and 587: see [Sending email](/docs/limits.md#sending-email)). It blocks the private network ranges, the other workspaces, Kilby's own database, the Kubernetes API and the cloud metadata service. A new instance cannot start until Kilby has confirmed this isolation works for it: a small `net-guard` step runs first and waits until the Kubernetes API cannot be reached, and, for every version deployed since this check was added, the cloud metadata service neither. A private service, a database and a Key Value instance are reachable only from inside their workspace. A web service is also reachable from the internet through its public address and any custom domain you add. ## How a container runs - **Its own user namespace.** Root inside your container is an unprivileged user on the machine. - **No privilege escalation**, no privileged mode, and every Linux capability is dropped except the few a typical image needs to start: change user, own its files, bind a low port. - The default **seccomp** profile of the container runtime filters system calls. - **A read-only filesystem, if you want it.** Off by default; when you turn it on in a service's settings, the container can write only in `/tmp` and on its disk. See [Services](/docs/services.md#settings-every-service-has). - **No access to the cluster.** Your service gets no Kubernetes credentials, and cannot call the Kubernetes API. - The namespace enforces the Kubernetes **Pod Security `baseline`** standard, so the cluster itself refuses privileged pods, host networking and host paths there. - A **resource quota** caps what a workspace can use in total, so one workspace cannot starve another. - Only Kilby's control plane may create or change objects in a workspace namespace; an admission policy rejects everyone else. ## How a build runs A service built from a Git repository is built outside your cluster, in the AWS CodeBuild project that Kilby uses for every customer. - **A new container for each build**, deleted when the build ends. What a build leaves behind, and for how long, is in the [Privacy Policy](/docs/privacy.md). - **Not in Kilby's network.** The build service is not attached to any network of Kilby's, and its AWS role can write its own log and nothing else. - **A push credential for one repository.** The credential a build pushes with is limited to the registry repository of that service in your workspace. Kilby also refuses to deploy an image from the repository of another workspace. - **Privileged mode.** Building container images needs it, so a build is **not** confined the way a running service is: it has none of the container limits described above, and it can reach the public internet. The code that is built runs there, with the rights of a build container on infrastructure shared with other customers' builds. Do not give a build a secret that the code being built must not read. ## Encryption and secrets - Environment variable values, secret files and registry credentials are encrypted with AES-256-GCM before they are stored. API keys, deploy hook URLs and session tokens are stored only as hashes, so Kilby cannot show them again. Kilby never receives your password: Neuramorphic sign-in (Amazon Cognito) keeps it. - Disks (service disks and database disks) are encrypted volumes, and database backups are encrypted copies in Amazon S3. - Traffic to your service's public address and to Kilby is HTTPS. - Roles limit who can see a secret value: a Viewer cannot. See [Workspaces, roles and 2FA](/docs/workspaces.md). - Every sign-in asks for a password and a code from an authenticator app, for everyone, and sensitive actions ask you to sign in again. - **Activity** records who did what: deploys, settings changes, members, API keys, shells opened. Variable changes show names, never values. - Webhook endpoints must be public HTTPS addresses. Kilby refuses to send to private or internal addresses, and does not follow redirects. ## What Kilby does not claim - Kilby does **not claim any security certification** or audit report, such as SOC 2 or ISO 27001. - A database runs as a single instance and a service disk is not backed up, so plan your own copies of data you cannot lose. See [Databases](/docs/databases.md) and [Disks and scaling](/docs/disks-scaling.md). - Customers share machines. The isolation above is what separates them, and containers share a kernel with the machine they run on. - A build from Git is not confined like a running service: see [How a build runs](#how-a-build-runs). - Kilby AI sends redacted text about a failure to Google when a workspace turns it on. See [Kilby AI](/docs/kilby-ai.md). ## Related - [Workspaces, roles and 2FA](/docs/workspaces.md): roles, 2FA, sessions. - [Kilby AI](/docs/kilby-ai.md): what is sent, and what never is. - [Custom domains](/docs/domains.md): how HTTPS certificates are issued. - [Use Kilby from an AI agent](/docs/agents.md): the safety model for agents.