Firecall v2 threat model
Date: 2026-08-25
Amended: 2026-09-02
Status: Accepted supporting contract for ADR-0012
Scope: Development Firecall v2 only
1. Purpose
This document states what Firecall protects, where credentials exist, how an attacker can cross a boundary, and what authority remains after compromise.
The implementation plan defines the exact schemas, permissions, limits, tests, and activation order. ADR-0012 defines the durable architecture decision. A conflict fails closed and needs an ADR or plan amendment before implementation continues.
2. Security outcome
Firecall gives one verified human temporary browser access to one debug box. Only that box receives Kubernetes access. Its managed identity receives only the reviewed dev profile roles and namespaces.
Firecall must:
- Keep Kubernetes credentials out of the browser and long-lived web services.
- Keep Azure session authority out of the broker and proxy.
- Keep infrastructure-repository authority out of the control repository.
- Deny access before resource deletion starts.
- Enforce expiry in the browser path and on the box.
- Keep capacity occupied until cleanup has proof.
- Preserve reduction when creation controls fail.
- Record session lifecycle without recording terminal or application content.
- Admit only exact, verified release inputs.
Firecall cannot revoke information that a developer already copied. It cannot identify which collaborator typed one command in a shared terminal.
3. Protected assets
| Asset | Required property |
|---|---|
| Human identity | Cloudflare-verified canonical @openmined.org email; current Cloudflare session |
| Session request | Authentic, fresh, one-use, exact profile and requester |
| Capacity | Maximum three after cutover; atomic reservations; no false release |
| Lifecycle status | One authorized writer; monotonic; no route substitution |
| Terraform state | One session per key; Azure AD access only; no browser read |
| Box identity | One session; exact cluster and profile namespaces; deleted at cleanup |
| Kubernetes credential | Box-local only; never returned through the browser |
| Browser control | Separate origin; strict host, path, cookie, CSRF, and CSP rules |
| Terminal and logs | Available to authorized session users; never centrally recorded |
| Preview content | Separate registrable domain; no Firecall or Cloudflare credential |
| Private keys | Non-exportable where possible; otherwise one consumer and fixed slot |
| Release inputs | Exact source, digest, signature, provenance, SBOM, and scan result |
| Audit | Create-once, ordered, independently verified, and content-minimized |
| Cleanup proof | Exact state, resource, assignment, disk, and token-path absence |
| Reduction paths | Available during normal creation and observer failures |
4. Trust boundaries
flowchart LR
human[Verified developer] --> cf[Cloudflare Access]
cf --> tunnel[Dedicated tunnel]
tunnel --> broker[Portal broker]
tunnel --> proxy[Terminal proxy]
broker --> github[firecall-control Actions]
github --> runner[Ephemeral control runner]
runner --> azure[Azure management and state]
proxy -->|private mTLS :8443| agent[Box agent]
agent --> local[Root session supervisor]
agent --> kubeproxy[Loopback Kubernetes proxy]
kubeproxy -->|box managed identity| aks[Dev AKS API]
proxy --> preview[Untrusted preview response]
Every arrow is a trust-boundary crossing. Authentication on one arrow does not authorize a later arrow.
4.1 Boundary rules
| Boundary | Authentication | Authorization source | Failure rule |
|---|---|---|---|
| Browser to Access | Cloudflare email one-time PIN | Exact email-domain and login-method policy | Deny |
| Access to broker | Signed Access JWT with portal audience | Durable subject, profile, owner list | Deny |
| Access to proxy | Signed Access JWT with workspace or preview audience | Session owner or bound invitation | Deny and close stream |
| Broker to GitHub | Installation token from broker App | Fixed workflow and protected ref | Reject request |
| Broker to storage | Azure workload identity | Exact Blob paths and operations | Block create or access |
| Runner to Azure | Exact GitHub OIDC claims | Fixed custom roles and Policy | Fail before mutation |
| Proxy to agent | Mutual TLS and pinned route facts | Status, acknowledgement, revocation state | Deny and close stream |
| Agent to local root | Fixed Unix protocol | Fixed method and typed fields | Reject method |
| Box to AKS | Managed identity and loopback token proxy | Exact resolved Reader or Writer assignments | Deny Kubernetes request |
| Credentialed service to Internet | Credentialless DNS and HTTPS gateways | Closed destination and method policy | Deny egress |
| Session box to Internet | Azure DNS and direct public TCP 443, normally HTTPS |
Host firewall, NSG, exact port policy | Permit public TCP 443; deny other public ports |
5. Credential placement
The complete credential inventory is in section 23 of the implementation plan. These placement rules are mandatory:
| Holder | May hold | Must never hold |
|---|---|---|
| Browser | Access cookies; host-only Firecall session cookies | Kubeconfig, Azure token, GitHub token, box key |
| Broker | App key; request and CSRF signing access; bounded storage identity | Terraform state, Kubernetes credential, proxy client key, tunnel token |
| Terminal proxy | Session token key; proxy client leaves; bounded storage identity | GitHub credential, Terraform state, kubeconfig, broker signing key |
| Readiness worker | Probe storage identity; one readiness client leaf | Kubernetes, GitHub, Terraform, or broker credential |
| Controlled gateways | No credential | Application, Azure, GitHub, Cloudflare, or Kubernetes credential |
| Control runner | Short-lived OIDC tokens and one verified request | Infrastructure state or repository credential; Cloudflare credential |
| Debug box | One managed identity; box keys; optional requester public key | GitHub, Cloudflare, Terraform state, Key Vault credential |
cloudflared |
One tunnel token | Any other Firecall credential |
| External Secrets | Firecall vault read through workload identity | Session, Terraform, or GitHub authority |
Exportable private keys use files with read-only mounts. They never use environment variables. Non-exportable keys stay in Key Vault. Components use separate ServiceAccounts and separate Secrets.
6. Attacker model
Assume an attacker can:
- Send arbitrary HTTP/1.1, HTTP/2, WebSocket, JSON, and browser input.
- Obtain a valid OpenMined identity or compromise one developer browser.
- Learn a session hostname or steal an unused join URL.
- Run arbitrary commands after authorized terminal access.
- Use Reader or Writer permissions in each resolved namespace.
- Select Writer for one or more services without human approval.
- Race requests, retries, status writes, workflow runs, and cleanup.
- Compromise one runtime component, one GitHub job, or one session box.
- Control one dependency source, package registry response, or mutable tag.
- Cause storage, GitHub, Cloudflare, Azure, DNS, and AKS partial failures.
- Delay scheduled jobs and preserve a stale browser connection.
Assume Cloudflare, corporate email, Azure, GitHub, AKS control plane, Argo CD, and the AKS node plane are external or higher-authority systems. Firecall checks their observable contracts. It cannot technically constrain their administrators.
7. Mandatory security invariants
- Only the ephemeral box receives Kubernetes access.
- Pull-request code receives no Firecall Azure credential.
- Only protected control
maincan receive normal session authority. - One signed envelope is the only normal open input.
- The runner validates the envelope before Azure login.
- One session uses one Terraform state and one reservation slot.
- Unreadable authoritative data never means empty, absent, or allowed.
- Status accepts only monotonic transitions through conditional writes.
readyneeds an independent live route and Kubernetes proof.- Close revokes browser access before deletion.
- Expiry applies at the proxy, box agent, and cleanup controller.
- Failed cleanup stays
rollback_failedand consumes capacity. - Close, sweep, and reduction survive creation-verdict failure.
- Every browser route binds a canonical host, path, audience, and Origin.
- A collaborator needs a random capability and an explicit scope acknowledgement.
- No Firecall service records terminal input, output, or Kubernetes logs.
- No mutable image or unverified release input reaches a Firecall workload.
- Classic and v2 never share ownership of one resource or state key.
8. Threat analysis
8.1 Identity forgery and confused authorization
Threats
- A caller forges Cloudflare forwarding headers.
- A token for one origin is replayed on another origin.
- Cloudflare changes
subafter an Access identity is removed and restored. - An email rename or mailbox reassignment changes development authorization.
- An administrator-created alias or shared mailbox creates a sibling identity.
- Authentication is mistaken for permission to list, close, or join a session.
Controls
- Validate the signed Access JWT directly with the exact issuer and current key.
- Accept exactly one bounded ASCII audience in an array of length one.
- Require the exact canonical
@openmined.orgemail from the final JWT. - Reject plus addresses and routing forms. Require the primary corporate address.
- Derive durable development identity from that canonical email.
- Bind browser cookies to the current Cloudflare subject and exact host.
- Recheck requester, owner-list revision, invitation, and offboarding state.
- Require Origin, fetch-site, CSRF, and scope acknowledgement independently.
- Use one global identity marker for immediate offboarding.
Residual
A Cloudflare administrator or corporate-mail administrator can change development access. Mailbox reassignment can transfer a durable development identity. An enabled alias or shared mailbox can have a separate durable key. Offboarding must revoke all known addresses and disable every related mailbox address. Cloudflare terminates browser TLS and can observe browser traffic.
8.2 Request forgery and broker compromise
Threats
- A user changes a profile, namespace, lifetime, address, or key after review.
- A stale or duplicated request creates another session.
- A compromised broker impersonates a requester or dispatches destructive work.
Controls
- The broker accepts only checked-in profile identifiers and bounded fields.
- The request envelope uses strict canonical JSON and a non-exportable key.
- It binds request, session, requester, profile, expiry, source, key proof, source commits, image evidence, and one nonce.
- The runner verifies signature, freshness, canonical form, protected sources, receipt, and replay state before Azure login.
- The broker App targets only
OpenMined/firecall-control. - The App can dispatch only fixed control workflows on protected
main. - Close writes a durable revocation before workflow dispatch.
Residual
A compromised broker or broker App can impersonate users, dispatch fixed profiles, close sessions, disrupt control workflows, and deny service.
8.3 Workflow, OIDC, and Azure authority misuse
Threats
- A pull request obtains Azure access.
- A workflow or repository reuses one OIDC credential.
- A runner assigns an approved role to an unrelated principal.
- A generic Terraform workflow plans or applies a Firecall root.
Controls
- Bind every federated credential to the supported exact subject, repository IDs, owner ID, and reusable-workflow commit.
- Make the pinned reusable workflow reject the wrong caller, event, attempt, or protected-source commit before Azure login.
- Use a separate identity for each operation class.
- Give pull requests credentialless validation only.
- Exclude every Firecall root from generic Terraform discovery and dispatch.
- Use Azure Policy, closed role and scope sets, deterministic assignments, independent assignment audit, and short token lifetimes.
- Keep trust-root, policy-definition, budget, and bootstrap changes behind the bounded authenticated-owner path.
Residual
Azure role conditions cannot prove that a target principal belongs to one session. A compromised normal control runner can assign approved AKS roles to another principal at its allowed scopes until detection and token expiry.
8.4 Capacity race, state confusion, and lifecycle rollback
Threats
- Concurrent opens exceed the limit.
- A state read error is treated as no active session.
- A delayed workflow overwrites a newer lifecycle state.
- A close releases capacity before resources and access disappear.
Controls
- Use one leased capacity ledger with generation, ETag, and operation binding.
- Reserve before creation and keep the reservation through verification.
- Use one state key and lock per session.
- Require monotonic status sequence and an allowed transition graph.
- Create a permanent replay tombstone only after zero-resource proof.
- Release capacity only after exact resource, assignment, and state proof.
- Keep
rollback_failedoccupied and visible.
Residual
Storage or Azure failure can deny all new sessions. This fail-closed outcome is intentional.
8.5 Status poisoning and proxy route substitution
Threats
- A status writer sends the proxy to an attacker endpoint.
- A stale certificate or private address connects to another session.
- The proxy trusts a changed box after restart.
Controls
- Only the control writer can change lifecycle status.
- Strict schemas bind session, request, workflow, profile, image, address, protocol, certificate, root bundle, and expiry.
- Accept only addresses in the exact Firecall private subnet and port
8443. - Use mutual TLS, current root locks, selected SPKI values, and per-session box certificate facts.
- Require the first real network route proof for each protected generation.
Residual
A compromised status writer can publish malicious route data inside the fixed private subnet. Mutual TLS and agent protocol checks remain independent.
8.6 Browser injection, origin confusion, and untrusted previews
Threats
- Terminal or preview content invokes portal controls.
- A malformed Host or path selects another audience or session.
- A preview sets parent cookies, redirects, frames, or forwards credentials.
- A service worker or cached response survives close.
Controls
- Use separate portal, workspace, and preview origin classes.
- Put previews on a different registered domain and Cloudflare zone.
- Parse raw hosts and paths before JWT, route, cookie, redirect, or CSP choice.
- Reject ambiguous HTTP framing, duplicate security headers, invalid encoding, ports, trailing dots, IDNA, mixed case, and cross-route authority.
- Use host-only cookies,
Cache-Control: no-store, private, HSTS, CSP,frame-ancestors 'none', no service worker, and no external browser assets. - Strip cookies, Access headers, and Firecall headers before the agent.
- Block upstream
Set-Cookieand restrict preview redirects.
Residual
An approved preview can send encrypted content and timing through an approved public endpoint. Applications that need inline scripts, external APIs, frames, cookies, or workers are unsupported in v2.
8.7 SSRF, DNS rebinding, and uncontrolled egress
Threats
- A workload from a write-selected namespace reaches private services through a preview.
- DNS changes an approved name to a private address.
- A box sends data to an arbitrary public endpoint.
Controls
- Validate preview targets from Kubernetes discovery, reviewed kinds, ports, namespaces, and one active session.
- Route credentialed Firecall services through the credentialless DNS policy proxy and HTTPS egress gateway.
- Resolve, pin, and recheck approved public destinations.
- Reject private, loopback, link-local, metadata, cluster, carrier-grade NAT, and Firecall ranges.
- Default-deny network policy permits only exact control and telemetry paths.
- Give each session box direct public TCP
443egress for development tools. - Deny session-box private-network and other public ports with its NSG and host
firewall. These controls do not enforce TLS or HTTP on port
443.
Residual
A write-selected namespace lets Writer deploy an allowed proxy Pod. Target checks cannot make a Writer-controlled namespace safe from server-side request forgery. Reader cannot create that Pod.
A compromised session box can send secrets or tunnel another protocol to an
arbitrary public TCP 443 endpoint. Read scope still permits exfiltration of
readable data. Write scope also exposes Secrets and ServiceAccount authority.
This accepted risk needs audit and a distinct public source address. The
credentialless gateways do not control session-box egress.
8.8 Box, Kubernetes, and optional SSH compromise
Threats
- A user obtains root or bypasses the box-local token proxy.
- A copied Kubernetes token outlives the browser session.
- Provider-required SSH bootstrap material persists.
- Optional SSH permits shell, exec, SCP, and SFTP through a shared requester key.
Controls
- Isolate interactive users from IMDS and the cached Kubernetes token.
- Bind the Kubernetes token to the loopback proxy and enforce fixed APIs.
- Give root operations to one fixed local supervisor protocol.
- Generate a per-VM Ed25519 provisioning key in locked runner memory.
- Remove every provisioning and default key before readiness; lock its account.
- Accept an optional requester key only with proof, one
/32,restrict, and PTY allocation. Deny every forwarding mode. Disablesshdwhen SSH is not requested. - Stop local interactive processes at revocation and absolute expiry.
Residual
Root on one box can use its resolved Reader and Writer assignments until cleanup or issued-token expiry. An exported managed-identity token can remain useful for up to 24 hours from its issue time, even after identity deletion. A copied Secret or ServiceAccount token from write scope can remain useful outside Firecall. Optional SSH permits shell, exec, SCP, and SFTP within the same local-user authority. Key sharing can transfer that access until cleanup. Kubernetes changes are not automatically reverted.
8.9 Runtime isolation and cluster-controller compromise
Threats
- A Firecall Pod reaches tenant or preview nodes.
- An unreviewed image or binding reaches the Firecall node.
- A node, Argo CD, cert-manager, or External Secrets compromise exposes keys.
Controls
- Use a dedicated tainted node pool, exact labels, admission tuples, resource limits, digest admission, default-deny network policy, and node monitoring.
- Run an independent Binding validator for scheduler bypass attempts.
- Use fixed Secret names, narrow ServiceAccounts, and one consumer per key.
- Block creation on a missing or stale node, policy, certificate, or security verdict.
Residual
AKS node root can read Pod memory and mounted material. Argo CD can alter Firecall workloads. External Secrets can read every exportable Firecall secret. Cert-manager keeps its existing cluster certificate authority.
8.10 Supply-chain substitution
Threats
- A mutable tag, package index, action, base image, module, browser asset, or scanner database changes between review and build.
- A build downloads an unreviewed executable.
- A signed artifact omits a transitive dependency or license.
Controls
- Use closed acquisition, action, executable, OCI, package, and toolchain locks.
- Store exact bytes under digest paths and use create-once cache publication.
- Build containers and VM images without network access to package sources.
- Trace executed files and reject an executable absent from the lock.
- Generate SBOM, provenance, signature, malware, vulnerability, and license evidence for every release subject.
- Use keyless protected-workflow signing and offline verification.
- Admit only exact digests from the merged evidence set.
Residual
A compromised image builder can publish arbitrary shared-registry content. Independent seal, scan, pin review, Policy, and admission must all pass before that content can run.
8.11 Audit forgery, privacy, and evidence deletion
Threats
- One producer hides, changes, or forges an event.
- Logs expose identity, reason, tokens, terminal data, or Kubernetes content.
- Retention deletes evidence still referenced by a session or release.
Controls
- Give each producer create-only authority under one fixed prefix.
- Use canonical payloads, deterministic logical IDs, digest paths, and create-once writes.
- Use locked retention and an independent read-only verifier.
- Use a closed telemetry attribute allowlist at the SDK and collector.
- Build an exact reference graph before eligible evidence deletion.
- Never record terminal bytes, Kubernetes logs, secrets, tokens, or private keys in central audit or telemetry.
Residual
A compromised producer can append false events. Azure lifecycle processing has no bounded completion guarantee. LRS storage has a single-region durability residual accepted through the spend and retention approval.
8.12 Cleanup failure and denial of service
Threats
- Azure deletion fails after access revocation.
- An attacker exhausts terminal, log, preview, process, disk, or capacity resources.
- A compromised component blocks close or sweep.
Controls
- Deny access first, then destroy resources.
- Enforce actor, session, stream, byte, CPU, memory, process, descriptor, disk, and idle limits at the proxy, agent, and OS.
- Reserve control resources through cgroup v2.
- Keep close, sweep, and reduction identities separate from creation verdicts.
- Keep one replay-safe, two-person, reduction-only break-glass path.
- Alert on
rollback_failed, sweep lag, storage failure, and cleanup residuals.
Residual
A compromised broker can disrupt workflow control. A compromised proxy can deny
data access. A retained rollback_failed disk can contain session material
until reduction succeeds. GitHub, Azure, or storage outages give cleanup no
fixed completion bound.
8.13 Human bootstrap and manual credential handling
Threats
- A standing human role can read state or secrets outside one operation.
- A wrong user, scope, role, or duration activates privileged access.
- A manual credential value enters shell history, arguments, logs, or evidence.
- A temporary assignment ends while its previously issued token remains valid.
Controls
- Keep development user sessions separate from infrastructure credentials.
- Use protected, short-lived workload identities for routine automation.
- Bind each manual development bootstrap to one reviewed operation, exact credential, action, role, scope, duration, and audit record.
- Remove each temporary assignment after the operation.
- Pass secret values through locked process descriptors. Never store values in Git, state, arguments, logs, or evidence.
- Remove membership and temporary assignments, then wait for issued tokens to expire before routine automation starts.
- Publish a signed zero-authority postflight and retain operation evidence.
Residual
An authorized human can misuse the exact active role during its token lifetime. A GitHub-hosted privileged runner can export every credential loaded into its one job. Development uses no PIM or Conditional Access gate. Staging and production require separate stronger controls and reviewers.
9. Component compromise ceilings
These ceilings are design facts, not guarantees that correct code can enforce after the component loses its credential.
| Component | Maximum intended compromise result |
|---|---|
| Broker or broker App | Impersonate requesters; dispatch fixed profiles; alter request metadata; revoke known users; disrupt control |
| Terminal proxy | Read requester subject keys, profiles, namespaces, expiry, box addresses, certificate, image, protocol, request, plan, managed-identity, role-assignment, cleanup, and bounded audit metadata; enter active boxes; use their identities; alter invitations; forge proxy receipts; deny service |
| Normal control runner | Create allowed session resources; run root on boxes; assign approved AKS roles at allowed scopes; hide assignments |
| Break-glass runner | Delete Firecall session resources and approved assignments only |
| Trust-root workflow | Add credentials to owned Firecall apps and assume their combined authority until revocation |
| CA-root workflow | Replace the four fixed trust roots and publish altered public trust metadata |
| Certificate rotator | Sign arbitrary Firecall leaves and replace serving or readiness leaf Secrets |
| Cloudflare apply | Change Firecall Access, tunnel routing, and exact-zone DNS in both zones |
| Zone-policy apply | Replace both complete cache phases and affect account rulesets or filter lists |
| Image builder | Push any shared-ACR repository and create Policy-constrained build resources |
| Privileged GitHub-hosted runner | Export every token, App key, state value, or secret loaded into its one job |
| Status writer | Route a session to a malicious endpoint inside the Firecall subnet |
| Box | Use the session's resolved namespace Reader and Writer authority until cleanup or token expiry |
| Root session supervisor | Obtain root on its one session box |
| DNS or HTTPS gateway | Poison approved responses, bypass its policy for reachable callers, or deny service |
| Audit producer | Append false events under its prefix, but not change retained events |
| Retention reconciler | Delete only old unreferenced eligible evidence after retention; deny historical analysis |
| Cloudflare edge | Observe identity, terminal, log, preview, and forwarded application traffic |
| External Secrets | Read all exportable secrets in the dedicated Firecall vault |
| Argo CD | Alter Firecall workloads and use namespaced exportable Secrets |
| AKS node plane | Read Firecall Pod memory, volumes, and mounted exportable Secrets |
Section 23.1 of the implementation plan is the complete per-identity ceiling inventory. Implementation reviews must use that complete table.
10. Explicitly accepted residual risks
- Namespace Reader cannot view Secrets, roles, or role bindings.
- Namespace Writer includes Secret read and ServiceAccount use.
- Write wins when read and write services share a namespace.
- Copied data and tokens can outlive a Firecall access path.
- Firecall does not revert developer Kubernetes mutations.
- Co-debugging provides session-level, not command-level, attribution.
- Cloudflare can observe browser traffic.
- A higher-authority cluster controller or node can read runtime credentials.
- The normal control runner has a bounded but high-impact assignment residual.
- The trust root combines the authority of every Firecall application it owns.
- A compromised proxy can use active box identities.
- A compromised audit producer can add false events.
- LRS storage does not survive every regional loss.
- Azure lifecycle deletion targets are not guaranteed maximum times.
- An approved endpoint can receive encrypted content and timing.
- Firecall remains development-only.
The portal must show each service mode and effective namespace mode. It must show Reader limits, Writer Secret and ServiceAccount authority, mutation, shared-shell, and attribution residuals before workspace entry.
11. Incident containment
| Suspected compromise | First containment action |
|---|---|
| Broker or control runner | Disable creation; revoke the exact app or FIC; keep reduction identities available |
| Terminal proxy | Scale proxy to zero; close sessions through control; rotate proxy leaves and session keys |
| Cloudflare | Disable Access and tunnel routes; close sessions; rotate edge and application credentials |
| Trust root | Disable every owned Firecall service principal; revoke trust FIC and Graph consent; inventory all credentials |
| Argo CD | Disable creation; stop Firecall synchronization; revoke repository or cluster access; rotate namespaced secrets |
| AKS node | Disable creation; close sessions; cordon and replace the node; rotate all mounted credentials |
| One box | Revoke its browser path; close or break-glass delete the session; verify role and resource absence |
| Supply chain | Quarantine the digest; block profile pins; preserve evidence; rebuild from a new verified input set |
| Audit or storage | Block creation where authoritative data is unreadable; keep close and reduction available |
Resume creation only after live inventory, token expiry, credential rotation, signed evidence, and the complete positive and negative canaries pass.
12. Verification contract
Section 36 of the implementation plan is normative. It covers:
- Unit and schema tests.
- Lifecycle, terminal, Kubernetes, and preview integration tests.
- Raw HTTP/1.1 and HTTP/2 parser tests.
- Identity, offboarding, invitation, and SSH tests.
- OIDC, role, storage-condition, machine-identity, and trust drift tests.
- Supply-chain, malware, vulnerability, signature, and admission tests.
- Network, certificate, node, quota, cost, and retention tests.
- Classic cutover and three-session depleted-credit qualification.
No security claim becomes accepted from a successful deployment alone. The matching signed evidence and live negative test must also pass.