Skip to main content

Threat Model

Status: stable · Scope: the Talon gateway/proxy request path and its evidence, secrets, and policy components.

This document lets a security reviewer map Talon's attack surface, trust boundaries, and key-management assumptions without contacting the maintainers. It uses a STRIDE-style framing. For the boundaries of what Talon claims, see LIMITATIONS.md; for the signed-record format, see the Evidence integrity specification.

One-line summary. Talon is a self-hosted network gateway that enforces policy and emits signed evidence on the request path. It reduces and records risk on that path; it does not harden the host, secure upstream providers, or make the operator's compliance determination.

1. System overview and data flow

flowchart LR
caller["Caller / SDK app"]

subgraph host [Operator-controlled host]
subgraph talon [Talon single binary]
gw["Gateway: auth, rate limit, PII scan, OPA policy, tool filter, redact/block"]
vault["Secrets vault (AES-256-GCM, SQLite)"]
evid["Evidence store (HMAC-signed, SQLite)"]
admin["Admin / dashboard plane"]
end
end

provider["Upstream LLM provider"]
tool["MCP tool / server"]
operator["Operator / auditor"]

caller -->|"Bearer key, request body"| gw
gw -->|"reads upstream key"| vault
gw -->|"forwarded request"| provider
gw -->|"filtered tool calls"| tool
gw -->|"writes signed record"| evid
operator -->|"X-Talon-Admin-Key"| admin
admin -->|"reads"| evid

Trust-boundary crossings (each is a point where data changes trust domain):

  1. Caller → Gateway — the caller is untrusted until authenticated by API key.
  2. Gateway → Upstream provider — a separate trust domain, possibly outside the EU.
  3. Gateway → MCP tool/server — tool execution happens outside Talon.
  4. Operator → Host/Process — everything inside the host is operator-controlled.
  5. Admin/auditor → Admin plane — privileged read/management access.
  6. At rest — the SQLite vault and evidence database files on the host disk.

2. Assets

AssetWhy it mattersPrimary protection
Upstream provider API keysSpend and data-egress authorityAES-256-GCM vault, per-agent/tenant ACL, audited access (internal/secrets/vault.go)
Evidence recordsThe audit/compliance value propositionHMAC-SHA256 signature (internal/evidence/signature.go)
PII in request/responseGDPR exposurePre-call input scan + output scan, redact/block (internal/classifier/pii.go)
Policy configurationDefines allow/deny, budgets, routingOperator-controlled config; embedded OPA (internal/policy/engine.go)
Signing & encryption keysRoot of evidence integrity and vault confidentialityOperator-managed secrets (see §5)

3. Trust boundaries and controls

3.1 Caller ↔ Gateway

  • Callers authenticate with Authorization: Bearer <key>; comparison is constant-time (crypto/subtle.ConstantTimeCompare) to resist timing attacks.
  • The caller identity selects tenant, team, and policy overrides; rate limits apply per-caller (token bucket).
  • Request bodies are untrusted input: parsed defensively, scanned for PII, and (for attachments) sandboxed and scanned for prompt-injection patterns.

3.2 Gateway ↔ Upstream provider

  • The upstream provider is a distinct trust domain. Talon forwards the request using the real key resolved from the vault; the caller never needs the upstream key.
  • Sovereignty/routing policy can deny a non-EU destination with signed evidence; in the proxy path this is allow/deny, not a silent reroute (see LIMITATIONS.md).
  • A compromised or misbehaving provider is out of scope — Talon cannot vouch for what happens after the request leaves it.

3.3 Gateway ↔ MCP tool / server

  • Tool governance today is request-body filtering: forbidden tools are stripped before forwarding (internal/gateway/tool_filter.go).
  • Talon does not intercept tool execution in another runtime, and does not prevent a tool from being invoked on a path that does not pass through Talon.

3.4 Operator ↔ Host / Process

  • Talon is a single binary applying process-level controls. It is not an OS/kernel sandbox. Host compromise, container escape, and lateral movement are out of scope and remain the operator's responsibility.

3.5 At-rest stores and admin plane

  • Secrets are encrypted at rest (AES-256-GCM); evidence is signed (HMAC-SHA256). The SQLite files themselves rely on host filesystem permissions.
  • Admin/control-plane and dashboard/metrics endpoints are gated by TALON_ADMIN_KEY (X-Talon-Admin-Key). If unset, those endpoints are unrestricted — set it in production.

4. STRIDE threats and mitigations

ThreatExampleMitigationResidual risk / out of scope
SpoofingCaller impersonates another tenantBearer-key auth, constant-time compare, per-caller identityStolen caller key (operator key hygiene)
TamperingEdit a stored evidence rowHMAC-SHA256 over canonical JSON; talon audit verify fails on any changeAttacker with the signing key can forge new records
Repudiation"That request never happened"Evidence-by-default: every decision (incl. denials/failures) is recorded and signedRecords created only for traffic that passes through Talon
Information disclosurePII leaks to provider or logsPre-call PII scan + redact/block; output scan; vault encryption; PII redaction in evidenceRegex/heuristic PII detection has imperfect recall
Denial of serviceCaller floods the gatewayPer-caller + global token-bucket rate limiting; context timeoutsHost/network-level DoS is out of scope
Elevation of privilegeUnauthorized secret/admin accessPer-agent/tenant secret ACLs with audit logging; TALON_ADMIN_KEY on admin planeHost compromise or leaked admin key

5. Key management

Talon uses three operator-managed secrets (see Configuration reference):

KeyPurposeFormatDefault
TALON_SIGNING_KEYHMAC-SHA256 evidence signing>= 32 raw bytes or 64+ hex charsAuto-derived per machine
TALON_SECRETS_KEYAES-256-GCM vault encryption32 raw bytes or 64 hex charsAuto-derived per machine
TALON_ADMIN_KEYAdmin/control-plane + dashboard authoperator-chosen stringunset (endpoints unrestricted)

Assumptions and guidance:

  • Location. Keys are read from the environment/configuration of the Talon process. They are never sent to callers or providers, and the signing key never leaves the host.
  • Set them explicitly in production. By default the signing and secrets keys are derived per machine; explicit, backed-up keys are required for reproducible verification across machines and for disaster recovery. The signing and secrets keys must differ.
  • Rotation. Rotating TALON_SIGNING_KEY means new records are signed with the new key; records signed with a previous key verify only under that previous key. Retain prior signing keys (or re-export) to keep historical evidence verifiable. Rotating TALON_SECRETS_KEY requires re-encrypting stored secrets.
  • Blast radius. A leaked signing key lets an attacker forge or alter records that still verify — evidence integrity depends entirely on its secrecy. A leaked secrets key exposes the vaulted provider credentials. A leaked admin key exposes the control plane.

6. What the HMAC signature does and does not prove

A valid signature proves that an evidence record was signed with the deployment's configured key and — assuming that key remains protected — has not been modified since signing. It does not prove that the policy decision, model response, tool result, or operator configuration was correct, and it does not attest anything about upstream or downstream systems. HMAC is symmetric: anyone holding the key can produce valid signatures, so this is integrity under the operator's key custody, not third-party non-repudiation.

7. Residual risks (operator responsibilities)

  • Host and OS hardening, network security, and container isolation.
  • Custody, rotation, and backup of signing/encryption/admin keys.
  • Filesystem access control on the SQLite vault and evidence databases.
  • Trust decisions about upstream providers and external tools.
  • The legal/compliance determination itself (Talon supplies supporting controls and evidence only).

8. Reporting

Report suspected vulnerabilities privately per SECURITY.md. Do not open a public issue for security reports.