---
title: "Threat model"
description: "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."
url: "https://opod.io/docs/control-plane-security/threat-model/"
markdown_url: "https://opod.io/docs/control-plane-security/threat-model.md"
section: "Security"
last_updated: "2026-10-30"
---

# 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**

   ```bash
   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**

   ```bash
   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**

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

   `allow` or `require`. See [Worker identity](https://opod.io/docs/control-plane-security/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](https://opod.io/docs/control-plane-security/authentication/).

5. **B6: images are enforced**

   ```bash
   helm get values opodcp -n opodcp -a | grep -A2 '^images:'      # verify: enforce
   ```

6. **The record is intact**

   ```bash
   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

| Finding                               | Risk                                                     | Fix                                                                                                       |
| ------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| An endpoint with `requireKeys: false` | anyone who reaches it can call the model                 | mint a key, then require keys ([API keys](https://opod.io/docs/control-plane-endpoints/api-keys/))        |
| `identity` row red                    | the shared admin token is still a way in for people      | connect OIDC                                                                                              |
| `network-policy` *not enforced*       | a NetworkPolicy changes nothing; the pod network is open | a CNI that enforces policies, or treat the network as untrusted and turn on `endpoints.tls.embedded`      |
| `images.verify: warn`                 | an unsigned image runs, with an alert                    | `enforce`, after a trust entry for every mirror                                                           |
| `audit/verify` answers `false`        | a row was removed or changed                             | compare with your outside copy of the chain ([Audit](https://opod.io/docs/control-plane-security/audit/)) |

## What we protect

| Asset                                     | Where it lives                                                                 | Why it matters                                               |
| ----------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| Prompts and completions                   | only in flight: client → leader → worker → engine                              | the most sensitive data; **never stored**                    |
| Endpoint API keys                         | SHA-256 hashes in the endpoint's auth Secret; plaintext shown once             | the right to spend GPU time and read a model's output        |
| Join tokens and per-node HMAC secrets     | the endpoint's auth Secret                                                     | a token lets a process register as a worker of that endpoint |
| Worker certificates and the endpoint's CA | the auth Secret (keypair) and the auth snapshot (public half, revoked serials) | a worker identity that can be revoked while its pod runs     |
| Admin credentials                         | the admin Secret; local users (bcrypt) or your OIDC issuer                     | admin can change every endpoint                              |
| The control plane's state                 | your Postgres; nothing on the pod's disk                                       | plans, key hashes, users, the audit chain, usage in transit  |
| Connector credentials                     | your Postgres, sealed with the install key (a Kubernetes Secret)               | access to your sinks and services                            |
| Model weights                             | the node's cache, pulled from your source                                      | a swapped file is a swapped model                            |
| GPU capacity                              | the VRAM ledger                                                                | oversubscription 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

| Risk                                                                                          | What limits it today                                                                                                    | What would close it                                                                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A leaked API key works until revoked or expired                                               | keys expire in 90 days by default; revocation reaches the leader in one kubelet sync, with or without the control plane | by design: the leader verifies locally                                                                                                                                                                                                                   |
| A leaked join token lets a process register as a worker from anywhere that reaches the leader | per-endpoint scope; HMAC on every command; leader isolation; `workers.mtls=require`                                     | `require` by default, which needs per-pod identity at pod start                                                                                                                                                                                          |
| Anyone with write on the endpoint's Secret controls who may call it                           | Kubernetes RBAC; the chart grants it to the control plane only                                                          | your RBAC review                                                                                                                                                                                                                                         |
| A fail-static leader serves a key revoked in the store but not yet in its Secret              | the tombstone is written on every revoke; the endpoint page shows the snapshot's age                                    | `auth.maxSnapshotAgeSec`                                                                                                                                                                                                                                 |
| An unsigned or unexpected image runs                                                          | digest pins, signature verification, `enforce`; from 0.3.2 the SBOM attestation's signature too                         | `enforce` by default                                                                                                                                                                                                                                     |
| The bootstrap admin token is a long-lived bearer                                              | a mode-600 Secret; every action in the hash-chained audit                                                               | connect 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](https://opod.io/docs/control-plane-security/authentication/#retire-the-bootstrap-token)) |
| The install key and the database together open stored credentials                             | the install key is a Secret; k3s clusters built by `opodcp infra` encrypt Secrets at rest                               | your provider's Secret encryption on managed clusters                                                                                                                                                                                                    |
| Weights are swapped on a node                                                                 | atomic, exclusive fetches; a GGUF file of a signed repository is held to the Hub's sha256                               | digest checks for every unsigned source                                                                                                                                                                                                                  |

## Reporting

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