Skip to content
Opod

Security

Threat model

For a security reviewer — what the control plane protects, the trust boundaries and what enforces each, outage behaviour, what it does not claim, and the residual risks.

Scope: the control plane (opodcp, its console and its Helm chart) and the endpoints it runs — one core leader and its workers per endpoint, all inside your Kubernetes cluster.

In short

This page is for a security reviewer. It lists what the control plane protects, the seven trust boundaries and what enforces each one, what keeps working when the control plane is down, and the risks that remain. The checklist below turns each boundary into a setting you can confirm on a running install. Prompts and answers are never stored: they exist only in flight.

When you need it

  • Before a production go-live, or for a vendor security questionnaire.
  • When you decide whether the pod network is your trust boundary.
  • When you decide between availability and fast revocation during an outage.

Do it: review a running install

  1. Read the doctor

    kubectl -n opodcp exec deploy/opodcp -- /opodcp doctor

    The rows identity, north-tls, network-policy, leader-isolation, images-signed and auth-snapshots map onto boundaries B4, B1, B2, B2, B6 and B1.

  2. B1: every endpoint requires keys

    for id in $(curl -s -H "$H" https://cp.example.com/api/v1/endpoints | jq -r '.[].id'); do
      curl -s -H "$H" https://cp.example.com/api/v1/endpoints/$id/auth | jq -c --arg id $id '{id: $id, requireKeys}'
    done
  3. B2: workers carry certificates

    curl -s -H "$H" https://cp.example.com/api/v1/endpoints/<id>/worker-identities | jq .mtls

    allow or require. See Worker identity.

  4. B4: people sign in as themselves

    Connect OIDC, so the shared admin token no longer signs people in. Give programs scoped machine tokens. See Users, roles and SSO.

  5. B6: images are enforced

    helm get values opodcp -n opodcp -a | grep -A2 '^images:'      # verify: enforce
  6. The record is intact

    curl -s -H "$H" https://cp.example.com/api/v1/audit/verify | jq .ok

Check it worked

A good review ends with: every endpoint requireKeys: true, doctor's identity row green, network-policy reading enforced with leader-isolation on for fronted endpoints, images.verify: enforce, and audit/verify answering true. Each row that is not so is one line in the residual-risk table below.

If it fails

FindingRiskFix
An endpoint with requireKeys: falseanyone who reaches it can call the modelmint a key, then require keys (API keys)
identity row redthe shared admin token is still a way in for peopleconnect OIDC
network-policy not enforceda NetworkPolicy changes nothing; the pod network is opena CNI that enforces policies, or treat the network as untrusted and turn on endpoints.tls.embedded
images.verify: warnan unsigned image runs, with an alertenforce, after a trust entry for every mirror
audit/verify answers falsea row was removed or changedcompare with your outside copy of the chain (Audit)

What we protect

AssetWhere it livesWhy it matters
Prompts and completionsonly in flight: client → leader → worker → enginethe most sensitive data; never stored
Endpoint API keysSHA-256 hashes in the endpoint's auth Secret; plaintext shown oncethe right to spend GPU time and read a model's output
Join tokens and per-node HMAC secretsthe endpoint's auth Secreta token lets a process register as a worker of that endpoint
Worker certificates and the endpoint's CAthe auth Secret (keypair) and the auth snapshot (public half, revoked serials)a worker identity that can be revoked while its pod runs
Admin credentialsthe admin Secret; local users (bcrypt) or your OIDC issueradmin can change every endpoint
The control plane's stateyour Postgres; nothing on the pod's diskplans, key hashes, users, the audit chain, usage in transit
Connector credentialsyour Postgres, sealed with the install key (a Kubernetes Secret)access to your sinks and services
Model weightsthe node's cache, pulled from your sourcea swapped file is a swapped model
GPU capacitythe VRAM ledgeroversubscription crashes a co-tenant

Trust boundaries

B1 · Caller → endpoint. When the endpoint requires keys, the leader checks the key's hash against its mounted snapshot and honours each key's expiry locally. The leader never asks the control plane whether a key is valid. TLS from outside the cluster terminates at your Gateway or Ingress; in-cluster TLS per endpoint is available (endpoints.tls.embedded) and off by default.

B2 · Leader ↔ worker. Leader-to-worker commands are HMAC-signed per node. A worker may also hold a certificate signed by its endpoint's own CA; revoking one stops the worker while its pod still runs. Engine ports bind to 127.0.0.1 in the worker.

B3 · Control plane → leader. The control plane is never on the request path. It writes the leader's plan, auth snapshot and policy into Kubernetes objects; the kubelet syncs them into the pod and the leader applies them without a restart. A leader's admin surface always requires a key.

B4 · Operator → control plane. Every route declares a minimum role and a tenancy scope, and a test walks the whole route table as a scoped operator. Sign-in is local users with bcrypt and server-side sessions, or OIDC with PKCE. The console sends credentials as a header, never a cookie, so a cross-site request carries none. A credential in a URL is refused.

B5 · Control plane → Kubernetes. Server-Side Apply under its own field manager, only in its namespace, on objects it labels. Its RBAC is a namespaced Role plus a small ClusterRole, and a test fails when the chart grants more or less than the code uses. It cannot read a Secret, exec into a pod or create a workload outside its namespace.

B6 · Registry → node. Every image is pinned by digest and its keyless signature is verified offline against a trust list. images.verify=enforce refuses an invalid, absent or unverifiable signature; the default warn records it. Model signatures are checked at prefetch; an invalid one holds the rollout for an admin.

B7 · Pods → host. The control plane and leaders meet Pod Security restricted. Workers mount the model cache as hostPath; vendor probes read the host driver tree read-only. The one privileged path, an AMD fallback for hosts without the device plugin, is opt-in and off by default.

Behaviour under a control-plane outage

A leader serves from the plan, auth and policy it has mounted, so serving and key checks continue. Revocation does not need the control plane either: the snapshot is a Kubernetes Secret, so anyone with RBAC on it can append a tombstone (opodcp key revoke --direct), and the kubelet delivers it within about a minute. A revoked key is never un-revoked by a later snapshot.

By default a leader serves from whatever snapshot it holds, for as long as it holds it. An owner who prefers revocation to availability sets auth.maxSnapshotAgeSec; past that age the leader refuses keyed traffic and says why.

What we do not claim

  • We do not record request content. Prompts and completions are not logged, stored or exported. Usage carries counts.
  • We do not isolate tenants on one GPU. Two endpoints sharing a card share its memory and fault domain. Time-slicing does not isolate memory either.
  • opod enforces no per-key limit. A key is an identity. Rate limits, quotas and budgets per key, user or team are your gateway's. A caller who skips the gateway skips them, so admit only the gateway: require keys and add a NetworkPolicy.
  • The pod network is your boundary. In-cluster TLS is off by default; HMAC still authenticates every leader-to-worker command.

Residual risks

RiskWhat limits it todayWhat would close it
A leaked API key works until revoked or expiredkeys expire in 90 days by default; revocation reaches the leader in one kubelet sync, with or without the control planeby design: the leader verifies locally
A leaked join token lets a process register as a worker from anywhere that reaches the leaderper-endpoint scope; HMAC on every command; leader isolation; workers.mtls=requirerequire by default, which needs per-pod identity at pod start
Anyone with write on the endpoint's Secret controls who may call itKubernetes RBAC; the chart grants it to the control plane onlyyour RBAC review
A fail-static leader serves a key revoked in the store but not yet in its Secretthe tombstone is written on every revoke; the endpoint page shows the snapshot's ageauth.maxSnapshotAgeSec
An unsigned or unexpected image runsdigest pins, signature verification, enforce; from 0.3.2 the SBOM attestation's signature tooenforce by default
The bootstrap admin token is a long-lived bearera mode-600 Secret; every action in the hash-chained auditconnect OIDC, which stops the token signing people in, and give automation scoped machine tokens; emptying the token does not remove it (Users, roles and SSO)
The install key and the database together open stored credentialsthe install key is a Secret; k3s clusters built by opodcp infra encrypt Secrets at restyour provider's Secret encryption on managed clusters
Weights are swapped on a nodeatomic, exclusive fetches; a GGUF file of a signed repository is held to the Hub's sha256digest checks for every unsigned source

Reporting

Report a vulnerability privately to the address in core's SECURITY.md. Do not open a public issue.

Last updated · Source: content/docs/control-plane-security/threat-model.mdx · View as Markdown