Skip to main content
CetiRun

Security

Trust boundaries, sign-in and ownership, administrator roles, workload isolation, credentials, network access, and data handling in CetiRun.

CetiRun Agents run tools, read the files in their HOME, and connect to external services. Platform administrators configure identity, workload isolation, network access, and data retention for their deployment. Each control on this page has prerequisites. Check them for your deployment before you give users access.

Warning: By default, CetiRun keeps conversation content in the AI Gateway database, in container logs, and in the memory notes of each Agent. CetiRun does not redact these stores. Before you onboard users, restrict who can read them. Data collection lists the stores.

PRIVACY.md is the detailed source for how the runtime collects, stores, and sends data. This page gives a summary. Make sure that the recipients, access controls, retention, and deletion settings are correct for each service that your deployment uses.

Security model

When a deployment uses the supplied configuration, CetiRun enforces these rules:

  • Users sign in with Microsoft Entra ID before they reach the Portal or an Agent.
  • Only the owner of an Agent can open its Agent UI, chat, terminal, and desktop through the ingress gateway. This rule needs a unique alias for each user who can sign in. Refer to Sign-in and alias.
  • Each Agent runs in its own namespace and Pod, with its own HOME volume, Secrets, and AI Gateway virtual key.
  • The operator configures each Agent to call models through the AI Gateway. The AI Gateway keeps the provider credentials, and the Agent Identity Broker keeps the credentials of connections.
  • A Sandbox Agent gets only what its Agent Policy allows.

CetiRun does not protect against these risks:

  • A person or a service that can write to the platform namespaces, to the CetiRun resources, or to the Secrets in Agent namespaces. Treat these permissions as cluster administrator permissions.
  • An Agent that misuses what it can reach: its HOME, its credentials, its connections, and the network destinations that its policies allow. Prompt injection can cause this.
  • Model calls that do not use the AI Gateway. The NetworkPolicy of a standard Agent allows public IPv4 traffic. Thus, tools in the Agent can call other model services with credentials that a user supplies.
  • What model providers, connected services, and websites do with the data that they receive.

Trust boundaries

BoundaryWhat enforces itWhat it depends on
Internet to the ingress gatewayOAuth2 Proxy signs users in with Microsoft Entra ID and admits only the groups in allowedGroupsThe Istio authentication chart
Ingress gateway to an AgentThe ownership filter asks the Portal if the signed-in user owns the AgentThe internal Portal listener on port 8081
Ingress gateway to the PortalThe Portal trusts the identity headers of the ingress gateway, and the Portal chart admits only the ingress gatewayIstio sidecar injection in the Portal namespace, and istio.internalAuthMTLS: true
Agent to modelsThe virtual key of the AgentThe AI Gateway
Agent to external accountsConnections MCP, with short-lived tokens from the BrokerThe connections that the owner authorized
Agent to the networkThe NetworkPolicy of a standard Agent, or the CiliumNetworkPolicy of a Sandbox AgentA network plugin that enforces these policies

Identity headers

Before OAuth2 Proxy runs, the ingress gateway removes these headers from each client request: x-auth-request-user, x-auth-request-email, x-auth-request-preferred-username, x-auth-request-groups, x-auth-request-access-token, x-forwarded-user, x-forwarded-email, x-forwarded-groups, x-internal-instance, and x-internal-alias. OAuth2 Proxy then sets the identity headers that the Portal trusts.

The Portal chart protects ports 8080 and 8081 with a STRICT mTLS PeerAuthentication, an AuthorizationPolicy, and a NetworkPolicy that admits only the ingress gateway namespace. These controls need Istio sidecar injection in the Portal namespace. The chart does not add the injection label. Its value istio.sidecarInjection: true, the default, only confirms that the namespace has injection. istio.internalAuthMTLS defaults to true. Only an explicit legacy false makes port 8081 use plain HTTP, with the NetworkPolicy protecting it. make deploy sets istio.internalAuthMTLS: true and labels the platform namespaces for sidecar injection.

After the ownership check, the ingress gateway removes the sign-in cookies: _cetirun_oauth2, its parts, and its CSRF cookie. It also removes the authorization header, which holds the ID token. Then it forwards the request to the Agent. The Agent still receives the x-auth-request-user, x-auth-request-email, and x-auth-request-preferred-username headers.

Entry points without sign-in

The ingress gateway sends these requests to their destination without the OAuth2 Proxy sign-in:

  • On the apex domain: /oauth2/*, /healthz, /readyz, and the GET and POST requests to the connection callback /api/v1/connections/callback. The Broker checks a one-time state on each callback.
  • POST requests to the paths in authPolicy.apexPostBypassPaths. The default list is empty.
  • Requests to a <prefix>.<domain> host for each prefix in authPolicy.authExemptPrefixes. The defaults are oauth2 and llmapi. No route of CetiRun uses these hosts. If you add a route for such a host, the route is public. For each deployment, remove the prefixes that you do not use.
  • With publicTLS.enabled of the platform chart, HTTP requests to the apex domain on port 80. The listener acme-http serves the HTTP-01 challenges of cert-manager and redirects all other requests to HTTPS.

The ownership filter defines its own fixed path exemptions. The Istio templates use authPolicy.aliasExemptPrefixes only to identify which hosts are explicit shared subdomain hosts and which are legacy subdomains of Agents. They do not use the authPolicy.adminAliases value that the deployment helper supplies. If you set this value, it does not configure an ownership bypass for Portal administrators. The shared subdomain hosts skip the ownership check, as Exemptions describes.

Other access paths

In entra-id mode, OAuth2 Proxy also accepts a valid Microsoft Entra ID bearer token instead of a session cookie (skipJwtBearerTokens: true by default). The ownership check still applies to these requests.

  • Tailscale adds a private access path to an Agent. Requests on the tailnet do not go through the Istio ingress gateway, OAuth2 Proxy, or the ownership check. The public routes stay in place. Configure the tailnet ACLs so that only the devices of the Agent owner can reach the Agent.

For the configuration of sign-in and ownership, read Authentication and ownership.

Sources: OAuth2 Proxy configuration, portal authentication middleware, ingress authorization policy, security headers, and ownership filter.

Authentication and authorization

Sign-in and alias

OAuth2 Proxy signs users in with Microsoft Entra ID. The ingress gateway admits only the members of the groups in allowedGroups. The Portal does not repeat the group check. The sign-in callback is https://<domain>/oauth2/callback on the apex domain, for example https://example.com/oauth2/callback. The OAuth2 VirtualService routes the apex /oauth2 requests.

The Portal derives an alias for display and Agent names. The alias is the lowercase part before @ of the preferred_username claim, or of the email address when that claim is empty. An alias must start with a letter, and it can contain only lowercase letters, digits, and hyphens, up to 63 characters. A sign-in name with a period, for example first.last@example.com, does not give a valid alias. For such a user, the Portal rejects each API request with HTTP 403 and the code invalid_identity. Before you install, check the names of your users as User names describes.

With verified Entra ID tokens, authorization uses the tenant and object IDs, not the alias or email address. Two accounts with the same alias do not share administrator privileges or Agent ownership.

Warning: Installations without a token verifier retain legacy alias-based authorization. In that mode, require unique, non-user-editable local parts among all allowed accounts and keep guest accounts out of allowedGroups.

Agent ownership

The Portal records the owner of each new Agent in spec.user. When the Portal verifies Microsoft Entra ID tokens, it also records the tenant ID and the object ID of the owner. It writes them in the annotations agentidentity.cetirun.microsoft.com/owner-tenant-id and agentidentity.cetirun.microsoft.com/owner-object-id. For such an Agent, the Portal API and the ownership check admit only that identity. The Portal verifies tokens when Entra tenant/client settings, istio.internalAuthMTLS, Agent Identity, or the Agent tools feature are configured. make deploy enables verification.

When verification is enabled, an Agent without both owner annotations is inaccessible through owner routes. A cluster administrator must establish the correct owner independently and set both annotations; a matching name does not claim the Agent. Existing bound Agents remain accessible after the owner changes their username. The Custom terminal uses the same owner IDs, passed by the gateway only after the Portal ownership check succeeds over mTLS. Upgrade the Portal, Istio chart, and terminal image together.

Only without a verifier, and only for unbound Agents, does the Portal API compare spec.user.alias; the ingress check and terminal also accept the full email address.

By default, each user can create one Agent (features.maxInstancesPerUser: 1 of the Portal chart). The Portal names new Agents <alias>-<suffix>.

Roles

RoleHow a person or a workload gets itWhat it can do
Agent ownerCreates the Agent in the PortalOpens and uses the Agent. Changes, suspends, resumes, and deletes it. Cannot open the Agents of other users
Portal administratorThe verified object ID is in admins.objectIDs of the Portal chart and the token matches agentIdentity.tenantId. make deploy adds the CetiAdmin owner’s object ID when enabled. The Portal reads the list when it startsSees all Agents with their status and events. Changes their image, display name, and model, and deletes them. Creates, changes, and deletes Teams, Agent Policies, and Sandboxes. Cannot open the Agent UI, chat, terminal, or desktop of another user’s Agent, and does not see Secrets in the Portal
Admission administratorsandboxAdmission.adminUsers and sandboxAdmission.adminGroups of the operator chart. The Portal service account is also oneWrites Sandboxes, Agent Policies, and policy-bound Teams through the Kubernetes API
Platform administratorThe Azure and cluster permissions of the deploymentInstalls, upgrades, and operates CetiRun. With Kubernetes RBAC, can also read the Secrets in Agent namespaces. By default, admission refuses kubectl exec in Agent namespaces, also for this role. Refer to Kubernetes exec restriction
CetiAdmin ownerThe user in cetiadmin.owner of the operator chart. With make deploy, this is the user in ownerAlias. CetiAdmin is on by defaultOpens CetiAdmin in the Portal and can tell it to use its access. In the namespace of each standard Agent, CetiAdmin can read all Secrets, use kubectl exec, and delete Pods. Refer to CetiAdmin
Agent workloadRuns in the Agent PodUses its HOME, its Secrets, its connections, and the network destinations that its policies allow

Any signed-in user can see and select any Team. CetiRun does not check Team membership. An Agent Policy limits the Agents of a Team. It does not limit which users select the Team.

Sources: portal claims, Portal administrator list, ownership checks, and Team selection.

Workload isolation

ControlStandard AgentSandbox Agent
RuntimeThe kata-vm-isolation RuntimeClass by defaultThe isolation type of the Sandbox: kata (the default) or container. The platform registration names the RuntimeClass. With container, the Agent shares the kernel of the node. Sandbox execution does not run gvisor
Root filesystem and privilegesA writable root filesystem and allowPrivilegeEscalation: true in the Agent containerA read-only root filesystem by default (security.readOnlyRootFilesystem). The containers run as non-root, drop all capabilities, and cannot escalate privileges
Inbound trafficFrom the ingress gateway namespace to the Agent portsThe same by default. network.ingress.mode: disabled stops inbound traffic, and network.ingress.requireMTLS adds ingress mTLS
Outbound trafficThe NetworkPolicy of the agent chart. Refer to Network accessA CiliumNetworkPolicy from the network rules of the Agent Policy, which allows public internet addresses by default, and a proxy in the Pod for blocked host names. Refer to Policy-bound Teams
Write checksSandbox admission, when it is onSandbox admission. Only admission administrators can write policy-bound configuration
HOMEThe agent chart defaultsThe HOME storage of the Sandbox

The chart defaults also enable the desktop and the ttyd terminal. The desktop launcher starts Chrome with --no-sandbox. Before you run untrusted workloads, check the complete Pod, runtime, and access boundary.

The trust boundary of an Agent Pod

All containers of an Agent Pod share one trust boundary:

  • For OpenClaw and Hermes, the ttyd terminal runs in the Agent container. A terminal user can read HOME and the credentials in the environment of the Agent, for example the virtual key and the OpenClaw gateway token. A Custom Agent uses a separate terminal workload.
  • The Agent controls the desktop browser through the Chrome DevTools port 18800. As a result, the Agent can use each website session that a user opens in the desktop.

Do not sign in to a website in the desktop if the Agent must not use that session.

Kubernetes exec restriction

execRestriction.enabled defaults to true. The admission template renders an admissionregistration.k8s.io/v1 ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. The cluster must support these APIs (the chart documents Kubernetes 1.30+). The installer must have permission to create these cluster-scoped resources.

The policy denies CONNECT requests to pods/exec across the release namespace. The chart template has no fixed exception. When CetiAdmin is enabled, the operator adds an exception for the CetiAdmin service account to the policy of each standard Agent. Refer to Exec exception. For the Custom terminal of a Custom Agent, the policy applies the prepared exec rule of the terminal.

The policy covers only pods/exec. For a standard Agent, Kubernetes RBAC alone controls other Pod operations, for example pods/attach, pods/portforward, and ephemeral containers. In the namespace of a Sandbox Agent, Sandbox admission refuses these operations and pods/exec, except the exec of the Custom terminal. These operations use the Kubernetes API directly, not the ingress gateway. Give these permissions in Agent namespaces only to trusted platform administrators.

This policy applies to the Kubernetes exec API, not to every route to command execution. The enabled ttyd terminal and the agent tools are separate access paths. After installation, make sure that the cluster accepts and enforces the policy.

Platform component privileges

The platform components have more privileges than any Agent:

  • The Portal service account can get, create, and update the Secrets in all namespaces. It can also create, change, and delete the CetiRun resources, and it can create namespaces.
  • The operator service account can create, change, and delete Secrets, namespaces, Roles, RoleBindings, ClusterRoles, ClusterRoleBindings, and ValidatingAdmissionPolicies. It can also read the AI Gateway master key. When CetiAdmin is on, the ClusterRole cetirun-cetiadmin-delegation also gives it pods/exec in all namespaces. Kubernetes RBAC lets the operator give CetiAdmin only the permissions that the operator has.
  • The AI Gateway master key can create and change virtual keys. It also gives access to the request records in the AI Gateway database.
  • When connections are on, the Broker can get, list, create, update, and delete all Secrets in the namespace of each Agent.
  • When CetiAdmin is on, its service account can read all Secrets and use kubectl exec in the namespace of each standard Agent. It can also delete Pods there and change Secrets, ConfigMaps, Services, and workloads. Refer to CetiAdmin.

A person who controls the Portal or the operator can read the credentials of all Agents. The owner of CetiAdmin can make CetiAdmin read the credentials of all standard Agents.

Sources: Portal ClusterRole, operator ClusterRole, and CetiAdmin delegation.

Credentials

CredentialWhere it isWho reads it
OpenClaw gateway token, Hermes API key, and the session-signing key CETIRUN_AUTH_KEY of the Hermes WebappSecret gateway-token in the Agent namespace, and the environment of the Agent containerThe Agent. The Portal shows the token and the API key only to the owner
Virtual key of the AgentSecret ai-gateway-virtual-key, and the environment of the Agent containerEach process in the Agent container
GitHub token of the owner, for GitHub CopilotSecret github-copilot-token in the Agent namespace. The operator creates it, and the Portal writes the token after the owner signs inThe GitHub Copilot proxy of the Agent
Key of the GitHub Copilot proxySecret ai-gateway-copilot-proxy in the Agent namespaceThe AI Gateway and the proxy
Tailscale auth keySecret tailscale-auth in the Agent namespaceThe Agent. The Portal shows it only to the owner
AI Gateway master key, salt key, and console passwordThe Secrets that the AI Gateway values auth.*.existingSecret name, as make deploy requires. Without them, the chart creates the Secret cetirun-ai-gateway-authThe AI Gateway. The operator reads the master key from the Secret that its value aiGateway.masterKeySecret names
AI Gateway database passwordsThe PostgreSQL Secret cetirun-ai-gateway-postgresql, which the chart creates, and the Valkey Secret that redis.passwordSecret.existingSecret names, as make deploy requiresThe AI Gateway, PostgreSQL, and Valkey
Model provider credentialsSecrets of the AI GatewayThe AI Gateway
Sign-in sessionsThe cookie secret in oauth2-proxy-credentials. The sessions, with refresh tokens, in the Valkey session store on the PVC oauth2-proxy-sessions, and the password of that store in the Secret oauth2-proxy-sessionsOAuth2 Proxy
OIDC client secretOnly in the oidc mode of the Istio chart: the Secret that oauth2Proxy.oidc.existingSecret names. The entra-id mode, which make deploy uses, needs no client secretOAuth2 Proxy
Connection credentialsEncrypted records of the Broker. A key in Azure Key Vault protects their encryption keys. The personal connections of owners are in the Broker namespace. The Azure connections and the connection bindings of an Agent are in the Agent namespaceThe Broker
OAuth client secrets of GitHub and Google, and the private key and client secret of the GitHub AppThe Secrets that providers.github.credentialsSecretName, providers.github.app.credentialsSecretName, and providers.google.credentialsSecretName of the Broker chart name, in the Broker namespaceThe Broker
Skill Marketplace repository credentialThe Secret that skillMarketplace.repository.existingSecret of the operator chart names, in the operator namespace: a token, or an SSH key with known_hostsThe Skill Marketplace worker
CetiAdmin Slack tokensThe Secret that cetiadmin.monitor.slackSecretName of the operator chart names, in the namespace of CetiAdmin. CetiAdmin gets SLACK_BOT_TOKEN and SLACK_APP_TOKEN in its environmentCetiAdmin
TLS private keyscetirun-tls in the ingress gateway namespace. The Secrets that sandboxAdmission.tlsSecretName of the operator chart, tls.secretName of the Broker chart, and tls.secretName and broker.clientTLSSecretName of the Connections MCP chart nameThe ingress gateway, the Sandbox admission server, the Broker, and Connections MCP
Registry credentialsSource Secrets in the cetirun-registry-credentials namespace, and a pull Secret registry-pull-<uid> in the Agent namespaceThe kubelet, to pull the image

Provider sign-in state and agent configuration can persist under /home/vibe. The uninstallation of the Istio authentication chart keeps the session PVC and its password Secret.

Keep browser access, terminal access, model credentials, and Kubernetes Secret permissions consistent with Agent ownership. Some platform identities have wider Secret access, for example CetiAdmin and the Broker. Never include token files, cookies, private keys, complete Helm values, browser profiles, or unreviewed browser network captures in public diagnostics. A UI that masks a secret does not encrypt the value of that secret.

Network access

A standard Agent uses the NetworkPolicy template of the agent chart. By default, it allows this traffic:

DirectionAllowed traffic
InboundFrom the ingress gateway namespace (aks-istio-ingress with the operator) to the Agent ports, the desktop on 6080, and the terminal on 7681
OutboundDNS to the k8s-app: kube-dns Pods in kube-system (networkPolicy.dnsPodLabels). istiod on 15012. The AI Gateway on 4000. Connections MCP on 8443, when connections are on. The ranges in networkPolicy.allowedInternalCIDRs, which is empty by default. All other IPv4 addresses except 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, and 168.63.129.16/32 (networkPolicy.blockedCIDRs)

The rules cover IPv4 only, so the policy denies IPv6 traffic. The outbound rule has no port restrictions. The isolation between Agents depends on Pod, Service, and node address ranges inside the blocked ranges, and the infrastructure template uses such ranges. Add an allowedInternalCIDRs entry only for an internal destination that you approve.

The Sandbox Agents of policy-bound Teams use compiled Cilium policies instead. These policies also allow public internet addresses by default. Refer to What changes for Agents.

The Istio ServiceEntries and access-log settings are audit configuration, not a destination allowlist. Source configuration and access logs do not prove that unlisted destinations are blocked.

Data collection

By default, these stores can contain conversation content:

StoreDefault contentControl
AI Gateway database (LiteLLM_SpendLogs)The request and the response of each model call, for seven days by defaultspendLogs.storePrompts and spendLogs.retention of the AI Gateway chart
AI Gateway content database (optional)With content.enabled: true, the complete request and response of each call, in the Azure Data Explorer database CetiRunContent, for seven days in the cluster template. The spend log then keeps no contentcontent.enabled of the AI Gateway chart, and the readers with the Viewer role on that database
Container logsThe conversations of the Agents, which the session logger copies, and what the Agents print. The ADX-Mon collection copies them to the Azure Data Explorer database CetiRunAgentslogger.enabled of the agent chart, and logs.agents.enabled of the cetirun-observability chart
MemoryThe notes of each Agent, in its HOMEmemoryContext.enabled of the operator chart, true by default
HOMESessions, files, configuration, and the browser profile of the desktopThe Agent lifecycle
Portal Chat historyThe conversations of an owner with a Custom Agent in Portal Chat, in the IndexedDB database cetirun-portal-chat of the owner’s browserglobal.portalChat.enabled of the platform chart. make deploy sets it to true

The cluster template turns Container Insights and managed Prometheus off. make deploy installs the ADX-Mon collection, which collects the container stdout and stderr of the platform and the Agents into Azure Data Explorer. The Agent output, which can contain conversation text, goes to a database of its own, CetiRunAgents, with readers of its own.

If you turn Container Insights on yourself, it also copies the environment variables of containers by default, and these copies include Secret values. The agent settings disable that copy. The cluster helper creates these settings, or examines them on a cluster that has its own. Some CetiRun containers, for example the Agent runtime container, keep credentials in their environment and do not disable the copy for themselves. For the list, refer to PRIVACY.md.

The Azure Data Explorer template sets the retention of each database: 90 days for logs, 30 days for metrics, and 14 days for Agent logs. Databases that already exist, exports, and other stores can differ.

egress.accessLog.enabled of the Istio chart is true by default. The access log applies to each proxy in the mesh, including the ingress gateway. It records the client address and the request path of user requests. When the AI Gateway metrics are on, as in the platform chart, their port has no authentication. Their labels include key aliases, user IDs, and Team names.

For the details of each path, read PRIVACY.md. Document the retention, redaction, and deletion procedures of each store. If you disable one logger, the other collection paths continue.

Persistent data and deletion

When you delete an Agent, the operator deletes its namespace and the HOME volume claim in it. With the AKS default StorageClass, whose reclaim policy is usually Delete, this also deletes the disk and its data. persistence.retainPolicy: Retain keeps the volume claim only when the StatefulSet is deleted or scaled to zero, for example during suspension. Before you delete an Agent, make a backup of HOME. For the details, read Storage.

The deletion of an Agent does not erase the other copies of its data. Copies can stay in logs, the AI Gateway database, backups, kept volumes, browser devices, and external providers. The personal connections of the owner also stay in the Broker, with their encrypted GitHub and Google tokens. The owner can remove them on the Connections page. CetiRun has no global erasure schedule. Define the retention and the deletion for each store.

External services

Configured model providers and tools can receive prompts, conversation context, files, and tool output. Connected services receive the requests that an Agent makes through its connections. GitHub Copilot sign-in and model discovery connect to authentication and catalog endpoints, separately from inference requests.

Microsoft Entra ID and Tailscale add their own service boundaries. Skills, plugins, CLI tools, package registries, and browsed sites create more routes. Check the terms, retention, training-use settings, and region of each service. No single CetiRun setting disables all third-party telemetry or network activity.

Deployment checklist

  • Enable verified Entra identity and bind each Agent to its owner’s tenant and object IDs before admitting users.
  • Keep admins.objectIDs of the Portal chart to the people who manage the Portal. Migrate the old alias allowlist before upgrading.
  • Give write access to the platform namespaces, the CetiRun resources, and the Secrets in Agent namespaces only to cluster administrators.
  • Keep Istio sidecar injection in the Portal namespace, and keep istio.internalAuthMTLS: true.
  • Remove the unused prefixes from authPolicy.authExemptPrefixes, and review networkPolicy.allowedInternalCIDRs.
  • Before you onboard users, decide the values of spendLogs.storePrompts, spendLogs.retention, and the log retention.
  • Review the permissions of CetiAdmin, or disable it.

Report a vulnerability

Report suspected vulnerabilities privately to the Microsoft Security Response Center (MSRC). Follow the instructions at https://aka.ms/SECURITY.md, which SECURITY.md also links. Do not report vulnerabilities, exploits, or sensitive reproductions through public GitHub issues or pull requests. This rule applies even after you remove credentials or deployment identifiers.

For non-security questions, use the channels in SUPPORT.md. For the privacy of this documentation site, read Theme and third-party assets.