Skip to main content

Security

Orka's security model rests on one idea: each credential lives only with the component that needs it, for only as long as it needs it. For coding-agent Tasks, model keys stay behind a proxy, Git credentials go to a separate publisher one operation at a time, and the agent — the part most exposed to prompt injection — holds neither. Native type: ai Tasks are different: Orka's own AI worker receives its Provider's API key from a Secret and calls the model directly, so that worker is part of the trusted platform (see Native worker Pods). On top of that, every API call is authenticated and authorized, Tasks carry verified provenance, and work is scoped to a namespace.

This page describes each boundary. For the permissions behind every API route, see API authorization; for the trust boundary around external runtimes, see AgentRuntime security operations.

The boundaries at a glance​

On the ACP runtime and Workspace/Publisher path, the agent has no Git credentials and the Publisher has no model credentials. The controller brokers credentials for specific operations. The diagram below covers this path; native worker Pods have their own RBAC permissions.

What the picture is telling you:

ComponentCan reachCannot reach
ACP runtime PodDNS, the provider auth proxy, the controller API (prompt MCP and artifact brokers)the Kubernetes API, Git remotes, any other host — egress is default-deny
Workspace/PublisherDNS, the controller API, the SCM egress proxyLLM providers, arbitrary internet hosts — its identity has no MCP broker access
Controllereverything above, plus the Kubernetes API— it is the trusted core, so protect it accordingly

The runtime Pod never holds a Git credential, and the Publisher never holds a model credential. That is deliberate: a prompt injection that fully captures the agent still cannot push code, and a compromised publisher still cannot exfiltrate through your model provider.

Execution workloads​

Native worker Pods​

Container and native ai Tasks run in per-Task worker Pods with a hardened security context:

  • non-root user;
  • read-only root filesystem;
  • all Linux capabilities dropped;
  • RuntimeDefault seccomp;
  • optional RuntimeClass, node selector, tolerations, and affinity through spec.execution.

These workers use dedicated ServiceAccounts bound to orka-ai-worker-role, orka-vendor-worker-role, or orka-container-worker-role. Include these identities when auditing Kubernetes access.

Container Tasks are untrusted compute. A Task's spec.secretRef is mounted only when an operator sets ORKA_AGENT_DIRECT_SECRET_MOUNTS=true; without it the mount is omitted and the Task still runs. A spec.env entry that reads a Secret or ConfigMap through valueFrom is refused outright: without the opt-in the Task fails before its Pod is created. Task env never reaches the workspace preparation init container, which holds the clone credential; only HTTP_PROXY, HTTPS_PROXY, and NO_PROXY pass through to it. See Container tasks.

ACP RuntimePool Pods​

Built-in type: agent Tasks run as private RuntimeSessions inside one controller-owned ACP RuntimePool Pod per trust domain/profile. The Pod:

  • uses a digest-pinned immutable runtime image and profile digest;
  • disables service-account token automount and has no Kubernetes RBAC;
  • uses a read-only root filesystem and default-deny egress that allows only cluster DNS (UDP and TCP 53 to k8s-app=kube-dns Pods in kube-system), the provider auth proxy (TCP to --acp-provider-proxy-pod-labels Pods in --acp-provider-proxy-namespace, on the --acp-provider-proxy-base-url port, or 80 for http and 443 for https when the URL has no port), and the controller API (TCP to orka.ai/network-role=controller Pods in the controller namespace, on --api-port);
  • runs the supervisor as root with only the documented process/identity capabilities;
  • launches ACP children with no capabilities, private HOME/TMPDIR/XDG/workspace paths, and distinct non-reused UIDs/GIDs;
  • tracks, terminates, and reaps the full process tree; cleanup uncertainty poisons and recycles the pool;
  • carries no Git read or publication credential and has no direct SCM publication egress.

A shared pool is a same-administrative-trust-domain density boundary, not a hard tenant sandbox. Users who can mutate or exec into the runtime Pod, namespace administrators, node administrators, and sibling sessions in the same pool are trusted relative to that boundary.

ACP Tasks reject per-Task container settings and custom resource requests. Runtime isolation and resources come from the reviewed RuntimePool profile. For built-in runtimes, spec.execution.workspace can bind a dedicated RuntimePool through a sandbox provider when the operator enables the workspace provider API and --acp-workspace-dispatch-enabled, with required admission webhooks and an admitted external provider and class. That runtime gets the same egress rules. For Pod-backed providers, Core's NetworkPolicies select the runtime Pod, and Core does not admit the runtime if another NetworkPolicy in its namespace widens them. Native-process providers such as Agent Substrate receive the rules in the workload request and are responsible for enforcing them; Core does not verify that enforcement. External runtimeRef dispatch rejects execution workspaces. Other per-Task execution placement fields fail closed.

Workspace/Publisher​

The separate Workspace/Publisher identity has no provider-session or prompt-broker access. The controller credential broker releases frozen source-read, target-read, target-write, or forge values only for the exact active operation. The artifact broker issues short-lived capabilities bound to method, path, identity, operation, digest, size, media type, and expiry. The Publisher holds neither the artifact signing key nor a global Git credential.

It creates sanitized source artifacts, prepares deterministic commits from validated deltas, performs exact-ref publication, independently verifies the remote, and optionally reconciles a PR.

The Publisher cannot open arbitrary public connections. Kubernetes egress permits only DNS, the controller API, and the authenticated SCM egress proxy. That proxy accepts only exact lower-case SCM/forge hostnames, permits only HTTPS/CONNECT on port 443, re-resolves and validates every outbound connection, and rejects private, loopback, link-local, metadata, reserved, and mixed public/private DNS answers. Redirects are disabled in both the Git/forge clients and the proxy's terminating forward mode; an encrypted CONNECT redirect to a different host still requires a new allowlisted proxy connection.

Command-based Publisher startup is production-safe by default: artifact authorization and credential material must come from the controller brokers, and the validated SCM proxy must be enabled. Local artifact-HMAC signing, filesystem credential roots, and proxy-less startup are accepted only when ORKA_PUBLISHER_ALLOW_DEVELOPMENT_FALLBACKS=true is set explicitly. Supported Helm and Kustomize manifests never set that development escape hatch.

The runtime child's .git directory, remotes, hooks, filters, refs, and history are untrusted for publication.

SCM proxy NetworkPolicy limits​

The SCM proxy NetworkPolicy excludes RFC 1918 and reserved address ranges, but Kubernetes does not define whether Service destination NAT runs before or after ipBlock evaluation. Some CNI and cloud combinations can therefore reach the kubernetes.default transport through its ClusterIP despite those exclusions. This does not grant API authorization: the SCM proxy Pod and ServiceAccount do not mount a service-account token, service links are disabled, Orka grants that identity no API RBAC, and the proxy refuses to start if the conventional Kubernetes service-account token path exists. The proxy itself accepts only exact configured SCM hostnames and rejects non-public DNS answers and connected peers. Clusters requiring TCP-level API denial must add and validate a CNI- or cloud-native pre-DNAT or Service-aware egress control; standard NetworkPolicy cannot guarantee this portably.

Provider and prompt brokers​

Built-in RuntimePools reach Vekil through the central authenticated provider proxy. The supervisor's per-session loopback proxy validates provider routes and the model against the immutable session profile. The central proxy checks the shared current or previous bearer credential and forwards requests to Vekil. config/acp-production applies the cross-namespace Vekil ingress policy required to prevent direct runtime access.

Every RuntimeSession also exposes a credential-protected loopback MCP proxy. The controller broker revalidates Task, attempt, prompt, lease generation and expiry, exact runtime fences, the canonical tool allowlist, and approval evidence for every call. Settlement, cancellation, expiry, poisoning, and deletion revoke authorization and cancel in-flight broker calls. Consequential operations reserve a durable ExternalEffect identity before execution.

Current ACP constraints​

  • External AgentRuntime v2 dispatch is admitted only for a current-generation ready, strict-governed registration. Orka freezes and revalidates the endpoint, authentication authority, profile, and observed runtime identity before each mutation; drift fails closed.
  • Non-empty write delivery uses the clean-room publisher and is successful only with a terminal independently verified status.delivery receipt.
  • Codex, Claude, Copilot, and OpenCode are supported built-in RuntimePool profiles.

Controller​

The controller runs with:

  • Non-root user (uid 65532)
  • Read-only root filesystem
  • Seccomp profile: RuntimeDefault

Authentication​

Every client request to the REST API and the compatibility endpoints authenticates with one of three credentials. Health probes, gateway ingress, and signed GitHub webhooks authenticate differently; the API reference lists them.

  • Kubernetes ServiceAccount tokens, the default, validated with the TokenReview API. Validated tokens are cached for 60 seconds by SHA-256 hash, so a revoked token can keep working for up to a minute. The cache is in memory only.
  • OIDC JWTs, when an issuer and audience are configured. Orka checks the issuer, audience, time claims, and RS256 signature, using the configured JWKS URL or issuer discovery. See External OIDC callers.
  • Transaction tokens, when the transaction-token profile is configured. They are read from the Txn-Token header by default, and can carry operation scopes and signed tctx constraints that Orka enforces. See Transaction tokens.

orka dashboard creates a 24-hour ServiceAccount token with your kubeconfig and opens the dashboard signed in with it.

Provenance​

  • OIDC- and context-token-authenticated Task creation stamps the verified identity into immutable spec.requestedBy; context-token-authenticated Task creation also stamps immutable spec.transaction metadata for audit correlation. Client-supplied requestedBy and transaction fields are rejected
  • Task provenance admission rejects untrusted direct Kubernetes Task creates/updates that set or modify Orka-managed provenance fields, including spec.requestedBy, spec.transaction, and transaction metadata labels/annotations. Helm enables it automatically. The opt-in Kustomize webhook bundle already uses failurePolicy: Fail; apply it only after completing the readiness, TLS, CA injection, and trusted-identity checks in Task provenance admission hardening

Tokens in delegated and workspace Tasks​

  • Delegation tools can exchange a mounted subject token for a child-scope TxToken when ORKA_CONTEXT_TOKEN_TTS_ENDPOINT, ORKA_CONTEXT_TOKEN_SUBJECT_TOKEN_FILE, and ORKA_CONTEXT_TOKEN_CHILD_SCOPE are configured; the requested child scope must be a subset of the parent transaction scopes, and the child token is stored in an ephemeral Secret that is referenced by Task annotation, adopted by the child Task after creation, and mounted into the child worker as a token file
  • Worker HTTP Tool CRD calls can propagate a TxToken from a mounted file using ORKA_TRANSACTION_TOKEN_FILE; when ORKA_CONTEXT_TOKEN_TTS_ENDPOINT and ORKA_CONTEXT_TOKEN_SUBJECT_TOKEN_FILE are configured, workers exchange the subject token for an operation-scoped outbound TxToken before calling the tool. Token values are read at request time and are not stored in Task spec/status; downstream services must still verify incoming TxTokens and enforce their own policy
  • Workspace-backed agent Tasks run through controller-owned acp-ws-* RuntimePools; the controller never forwards mounted transaction/context-subject token files into the workspace, and raw TxTokens are still not written to Task spec/status/logs.
  • Workspace-backed Tasks select only execution.workspace.classRef. A separate provider receives a frozen public runtime request and reports infrastructure evidence through workspace.orka.ai. Core independently checks the exact Pod or native worker, completes sealed bootstrap, verifies the authenticated boot, and authorizes retirement after drain. Provider readiness cannot authorize prompts or replace core admission. Shared ownership policies separate provider status from core conditions and private attachment credentials. Raw transaction tokens never enter retained workspaces or provider child environments.

API authorization​

For Kubernetes TokenReview callers, every external API route requires a SubjectAccessReview for the requested resource, operation, and resolved namespace. Only the authenticated /api/v1/auth/validate and /api/v1/auth/whoami routes omit resource authorization. Missing authorization infrastructure, denied decisions, and evaluation errors fail closed before the operation runs.

Stored records such as sessions, memory proposals, security findings, and gateway deliveries have explicit RBAC resource names. OIDC subject allowlists and namespace bindings, transaction-token scope modes, workspace-class use checks, and Gateway identity checks retain their existing policies. See API authorization for every route's permissions, namespace precedence, and grant examples.

Agent use​

Creating a Task authorizes the Task, not the Agent it runs as. With --agent-use-authorization-enabled (Helm: controller.agentUseAuthorization.enabled), running work as an Agent also needs the use verb on that Agent, the way workspace classes already need it. The API checks its caller, and ValidatingAdmissionPolicies check direct writes to Tasks, RepositoryScans, RepositoryMonitors, and GatewayBindings that newly name an Agent. The Helm value installs those policies; without Helm, also apply config/agent-use-policy, or direct Kubernetes writes go unchecked. Its bindings match every namespace, so on a cluster with more than one installation, first scope them to this installation's namespace as that directory's README describes. Orka's own components (the controller, API, gateways, monitors, and workers) hold use broadly. Callers are checked only when a request newly names an Agent: a RepositoryMonitor run starts with no Agent use check, and Agent references an object already names, including ones set before the check was enabled, are not checked again on edit. Review existing configurations and who may patch RepositoryMonitors before you enable the check. Delegation is the exception: a worker creates a child Task for any Agent the parent Agent's owner listed in spec.coordination.allowedAgents, without checking the root caller's use on the child Agent. Whoever may use a parent Agent can therefore run the Agents its owner listed, so list only Agents its callers may run. The check is off by default, because turning it on denies every caller without a use grant.

Provider use​

A Provider holds a model credential and decides where prompts, and any transcripts a run reads, are sent. With --provider-use-authorization-enabled (Helm: controller.providerUseAuthorization.enabled), naming a Provider also needs the use verb on it: in a Task's spec.ai.providerRef, which overrides the Agent's Provider, in an Agent's providerRef or model fallbacks, and in every chat or OpenAI- or Anthropic-compatible request, which spends the Provider's credential directly. The API checks its caller, and ValidatingAdmissionPolicies check direct writes to Tasks and Agents that newly name a Provider. The Helm value installs those policies; without Helm, also apply config/provider-use-policy. Its bindings match every namespace, so on a cluster with more than one installation, first scope them to this installation's namespace as that directory's README describes. A Task that runs its Agent's own Provider needs only Agent use, except that an ai Task is refused when it would take a Provider from an Agent in another namespace. Without either check, anyone who may create Tasks, Agents, or chats in a namespace may use any Provider there, and, unless namespace isolation is enforced, any Provider in another namespace. Orka's controller and workers hold use on every Provider, so delegated child Tasks and agent-created Agents are not checked against the root caller. Providers an Agent named before the check was enabled were never checked, and running that Agent needs only Agent use, so review existing Agents' providerRef and fallbacks before you enable it. The check is off by default, because turning it on denies every caller without a use grant.

Agent identities​

An Agent can name one external identity in spec.identity, starting with a Microsoft Entra agent identity (ADR 0039). Binding it requires bind on agentidentities/<issuer> for that exact ID, granted with a Role that lists resourceNames, so an Agent editor cannot claim another team's identity. One identity belongs to one Agent: the first Agent the controller grants it to records it in status.identityClaim, and any other Agent naming it is not Ready. An Agent that stops naming an identity keeps the claim until every Task bound to it has finished, and a deleted Agent's identity stays taken by its bound Tasks until they finish. A claim records when it was granted, by the API server's clock, is granted only while --agent-use-authorization-enabled is set, and binds only Tasks created after that second. A Task Orka creates from a scheduled Task, RepositoryScan, or RepositoryMonitor also needs that object created after it, and GatewayBinding Tasks cannot use an identity-bound Agent. Create Tasks and these objects once the Agent is Ready. An identity-bound Agent also requires --agent-use-authorization-enabled with the config/agent-use-policy policies installed (the Helm value does both; the controller trusts the flag and does not detect a missing policy) and a runtime.ceiling.allowedTools, and a delegated child Task can use it only when it is the parent's own Agent. Task bindings freeze the identity and the issuer instance, and spans carry the Agent UID as gen_ai.agent.id. The Agent's IdentityVerified condition turns True once the controller has obtained a token for the identity from its issuer, and the controller asks again at least hourly; a refusal sets it False, makes the Agent not Ready, and stops its identity-backed calls; an issuer that cannot answer sets it Unknown instead. Tokens for the identity are issued only by the controller, through agentIdentity-mode outbound access policies, and never reach the runtime. In Delegated mode the Agent acts for the Task's requester with their own linked grant: only the provider's curated tools, only on built-in RuntimePools, only within maxDelegationAge of the requester's last action, and every write needs the requester's own approval.

The controller's blueprint credential is a projected token on the node that runs it. AI workers can create Jobs in the release namespace, and a privileged Pod, or one with a hostPath volume, can read any token on its node, this one included, whichever ServiceAccount it runs as. Before you turn on agent identities, enforce at least the baseline Pod Security profile on the release namespace (pod-security.kubernetes.io/enforce: baseline), or an equivalent admission control; the chart does not label a namespace it does not create. Admission checks only new Pods and evicts none, so also delete any running Pod that breaks the profile before you turn identities on. A server-side dry run of the label lists them: kubectl label --dry-run=server --overwrite ns <namespace> pod-security.kubernetes.io/enforce=baseline.

The release namespace's profile covers only Pods admitted there. A privileged or hostPath Pod from any other namespace that lands on the controller's node can read the credential too, and a taint does not keep one off: its author can add the toleration, or set spec.nodeName and skip the scheduler. So either every namespace whose Pods can run on that node enforces at least baseline as well, or admission control stops every Pod but the controller from tolerating the controller nodes' taint or binding to them by name. Only then do the chart's nodeSelector and tolerations, which apply to the controller Deployment, give it nodes of its own.

The controller ServiceAccount's own policy admits Pods running as that ServiceAccount only for the controller Deployment's own ReplicaSets, which are named after it, so no other ReplicaSet running as it can create Pods, even when scaled up, and none can be created or given a new template. It evicts nothing, though, so before you turn identities on, delete any Pod already running as that ServiceAccount that the controller Deployment did not create, since it keeps the identity: kubectl get pods -n <namespace> -o jsonpath='{range .items[?(@.spec.serviceAccountName=="<controller ServiceAccount>")]}{.metadata.name}{"\n"}{end}' lists them. Also delete, or move to another ServiceAccount, any other Deployment or ReplicaSet whose Pod template runs as it, which the policy now leaves unable to run: kubectl get deployments,replicasets -n <namespace> -o jsonpath='{range .items[?(@.spec.template.spec.serviceAccountName=="<controller ServiceAccount>")]}{.kind}/{.metadata.name}{"\n"}{end}' lists them.

Secret management​

  • Provider-proxy, source-read, publication-read, publication-write, forge, prompt-broker, publisher-auth, artifact, and operation-capability roles are separate.
  • Task.spec.workspace.readCredentialRef, publicationReadCredentialRef, publicationCredentialRef, and forgeCredentialRef store only same-namespace Secret references; the selected UID/resourceVersion is frozen at reservation and values never appear in Task status.
  • Git credentials are resolved by the clean-room boundary and are never mounted into ACP runtime Pods.
  • Known Orka-supplied secret values are redacted before logs, events, results, transcripts, and traces; raw prompt/repository content still requires RBAC, encryption, retention, and content-capture policy.

Namespace scoping​

  • Every controller requires one non-empty --watch-namespace and the fixed harness-v2 installation identity
  • The watched namespace carries the matching orka.ai/controller-mode label. The controller claims an unlabeled namespace on first start; a mismatched claim fails startup, and a per-release ValidatingAdmissionPolicy keeps the claim immutable and lets only that controller add it
  • Separate installations use distinct namespaces, ServiceAccounts, RBAC, Leases, stores, Services, Secrets, and execution data planes
  • Chat endpoint blocks operations in kube-system and kube-public namespaces
  • The web dashboard is off by default. When enabled with --dashboard-enabled, it is served on the API port, with no separate listener

Multi-tenancy​

Orka supports soft multi-tenancy using Kubernetes namespaces as tenant boundaries.

Namespace isolation​

Enable --enforce-namespace-isolation to restrict users to their ServiceAccount's namespace:

  • API requests are rejected (403) if the target namespace differs from the caller's SA namespace
  • Tasks cannot reference Agents or Providers in other namespaces (cross-namespace agentRef.namespace and providerRef.namespace are rejected)
  • Workers cannot submit results to namespaces other than their own
  • All access denials are logged with caller identity and IP address

External OIDC callers​

When OIDC API authentication is enabled, configure an explicit subject allowlist and namespace binding. For GitHub Actions, allow only the trusted repository, branch, environment, or workflow subjects that should call Orka; issuer and audience validation alone is not an authorization policy. Authorized OIDC callers are assigned --oidc-namespace (default default) so --enforce-namespace-isolation=true prevents them from selecting arbitrary tenant namespaces.

--oidc-issuer=https://token.actions.githubusercontent.com
--oidc-audience=orka-ci
--oidc-allowed-subjects=repo:my-org/my-repo:ref:refs/heads/main
--oidc-namespace=ci
--enforce-namespace-isolation=true

Per-namespace Task limits​

Use --max-tasks-per-namespace to cap the number of active (Pending/Running) tasks per namespace. Tasks exceeding the limit are requeued with backoff. Set to 0 (default) for unlimited.

For multi-tenant deployments, enable both isolation and limits:

--enforce-namespace-isolation=true
--max-tasks-per-namespace=50
--controller-mode=harness-v2
--watch-namespace=team-v2

Data isolation​

Most ACP control CRDs are namespace-scoped, and their status transitions use Kubernetes resourceVersion compare-and-swap. Controller-epoch and Session mutation Leases fence cross-controller writes. SQLite payload/read-model data (including transcripts, deferred outbox projections, and artifacts) is also keyed by namespace, and queries filter by namespace. The controller, API server, Publisher, brokers, and workers enforce namespace and exact-identity boundaries at their respective layers. CRD schemas remain cluster-scoped and have one platform lifecycle owner; schema sharing does not grant either controller access to the other installation's resources.

Audit logging​

Security-relevant events are logged at the API layer:

  • Authentication failures (missing/invalid tokens)
  • Namespace access denials (isolation violations, watch-namespace mismatches)
  • Cross-namespace worker access attempts
  • Every call made with an Agent identity, issued or refused, on the agent-identity-audit logger: the Agent, identity, issuer instance, mode, Task, policy, Tool, a digest of the arguments, the outcome, and for a refusal a reason category. Records hold no tokens, request bodies, or error text, and a Delegated call's requester appears only as a keyed pseudonym. The controller's log level does not filter this logger. Route and retain it in your log pipeline.

Generic gateway trust boundary​

Generic gateways keep provider credentials and raw provider requests outside Orka. Adapters submit only the bounded orka.gateway.v1 envelope. Orka stores normalized text, stable external identity, allowlisted string metadata, and safe correlation; it never stores the original provider request or authorization header.

Inbound and outbound traffic use separate Gateway-bound bearer Secrets. Secrets must explicitly opt in and bind to the Gateway name; outbound Secrets also bind to the exact resolved adapter endpoint. Direct and serviceRef endpoints require HTTPS. Direct endpoints are restricted to public unicast addresses on every dial, with local/private/link-local/reserved addresses, Kubernetes Service names, proxies, redirects, and DNS rebinding fail-closed. For serviceRef, the adapter certificate must be trusted by the controller and valid for the resolved Service DNS name, so changing a Service selector or Pod label cannot redirect bearer credentials to an unauthenticated workload.

Unknown contexts, unauthorized senders, capability mismatches, unsafe endpoints, missing references, and equal-priority binding conflicts fail closed. Denial and terminal error replies are generic and do not expose stack traces, endpoints, tokens, provider identifiers, or controller internals. Queue, payload, retry, expiry, and retention bounds limit replay and exhaustion risk.