Security Hardening
Semantic Router sits on the request path between clients and model providers. Treat it as part of the application's trust boundary: it can inspect prompts, choose providers, mutate requests, and optionally retain routing data.
This guide highlights the controls that need an explicit production decision. It does not replace the identity, network, secret-management, and data-governance controls of the surrounding platform.
Map the trust boundaries
Review each boundary separately:
- who can call inference endpoints;
- which identity claims the Router trusts;
- which models and tools each role may use;
- where provider credentials are stored;
- which requests may leave the local environment;
- what prompts, responses, and route metadata are retained; and
- who can change configuration or inspect stored data.
Protect the public listener
The standalone frontend strips untrusted identity and proxy-control headers. Configure listener API keys, Chat model allowlists, and native model grants separately; see Gateway Modes. Do not treat a Dashboard login as a public inference credential.
The maintained Envoy configuration also removes internal control headers. Keep that boundary when supplying a custom Envoy or gateway configuration. Internal examples include:
request_headers_to_remove:
- x-authz-user-id
- x-authz-user-groups
- x-vsr-delegated-credential
Do not expose Router management, metrics, ExtProc, or backing-store ports as public inference endpoints. Terminate client authentication at a trusted boundary and allow only that component to supply identity headers and the delegated credential described below.
Relevant Dashboard permissions include:
| Permission | Purpose | Default roles |
|---|---|---|
feedback.submit | Submit routing feedback. Read-role feedback is recorded on the replay without updating model experience. | admin, write, read |
replay.read | List replay records. | admin, write, read |
logs.read | Read bounded local-stack service logs. | admin, write |
The Router management API distinguishes replay metadata from replay detail. The Dashboard service can retrieve complete records, then removes captured bodies and tool payloads for users who do not have configuration-write access. It does not receive permission to reveal stored secret values.
See the management API reference for endpoints and response contracts.
Keep credentials out of configuration
Use environment references in canonical YAML:
api_key: ${MODEL_API_KEY}
Do not commit literal API keys, passwords, authorization headers, credential query parameters, or URLs containing user information.
A provider backend can also read its key from a file. The Router reads
auth.api_key_file at startup and at every configuration reload, so a file
only the Router's user can read keeps the key out of the configuration, its
history, and every export:
providers:
models:
- name: gpt
provider_model_id: gpt-4o-mini
backend_refs:
- name: openai-primary
provider: openai
endpoint: https://api.openai.com/v1
auth:
api_key_file: /etc/vllm-sr/provider-keys/openai
The path must be absolute and the file holds only the key, with mode 600.
A missing or empty file stops the configuration from loading, and a hot
reload then keeps the previous configuration. A check that resolves no
reference, such as vllm-sr config validate or the one vllm-sr serve runs
with the Router image before it restarts the stack, checks only the path, as
it leaves an environment variable unread: the file may be mounted only where
the Router runs. A listener's api_key_files are checked the same way.
A listener's client keys, the gateway keys clients send, take the same two
references. An api_keys entry written as "${NAME}" reads the key from that
environment variable, and api_key_files names files that each hold one more
key, read at every load:
listeners:
- name: public
port: 8899
api_keys: ["${GATEWAY_KEY}"]
api_key_files: [/etc/vllm-sr/gateway-keys/team-a]
Standalone mode reads api_key_files. --gateway extproc refuses them,
because the CLI writes the listener's keys into the Envoy configuration it
generates; it reads each "${NAME}" key from its environment when it renders
that configuration, and a key that expands to nothing stops it.
Every surface reads a reference the way the Router does when it loads the
configuration: ${NAME} and $NAME, ${NAME:-default} (the default when
NAME is unset or empty) and ${NAME-default} (when it is unset), where
NAME is uppercase letters, digits and underscores and does not start with a
digit, and $$ for a literal $. Any other text is a literal key, so
${gateway_key} is the literal key ${gateway_key}, and a save moves it out
like any other literal.
For vllm-sr serve --target kubernetes, the CLI places sensitive environment
values in an immutable Secret revision, scoped to the namespace and Helm
release:
- By name only. Helm values and the Deployment reference the Secret by name; they don't contain the credential value.
- Safe upgrades. A failed upgrade keeps the previous workload and Secret active.
- Cleanup. Release-owned old revisions are removed only once nothing references them.
Existing chart-native Secret references, such as a Dashboard JWT Secret, remain external objects and are not copied into the CLI-managed Secret. Use the same namespace and release ownership discipline for every manually managed Secret.
Keys saved from the Dashboard or the management API
A key you enter in the Dashboard, in Connect model or in a backend's
API key field, never lands in the configuration, and neither does one in a
file you apply with vllm-sr config apply (PUT or PATCH /api/v1/config).
Each save moves every literal backend api_key, and every literal listener
api_keys entry of a standalone Router, out of the document and writes a
reference in its place. The configuration, its history, and every version a
rollback can restore then hold only references. Your local file is sent as it
is and never rewritten. An environment reference such as ${OPENAI_API_KEY}
stays as written. The configuration file a save replaces keeps its mode,
owner and group, so a config.yaml you keep at mode 600 stays private. A
writer that cannot keep the owner, such as the Dashboard's own user replacing
a file the host user owns, writes it with mode 644, so that owner can still
read it.
- A local file. The key goes into a new mode
600file, in a directory created with mode700beside the configuration file the Router reads:provider-keys/for a Dashboard save,router-keys/for a management API save, so neither writer needs to write into a directory the other created. A backend names the file inauth.api_key_file, a listener inapi_key_files. A key already stored keeps its file, sovllm-sr config planof a file you applied reports no change. A save that fails to write the configuration removes the key files it created. vllm-sr serve. The directories are in.vllm-sr/of the stack's state directory, which the Router and Dashboard containers mount at the same path. The Router container saves as root and the Dashboard reads as its own user, soservesetsVLLM_SR_KEY_FILE_GROUPto the group the Dashboard's entrypoint gives that directory (65532). With that variable set, key files are mode640and their directories750, both of that group: the group reads the keys and can change nothing. Without it, nothing is shared.- Kubernetes. The Dashboard and the Router save to the ConfigMap, and the
key goes into the chart's
<release>-provider-keysSecret under a generated name such asVSR_KEY_3F2A…. The chart loads that Secret into the Router's and the Dashboard's environment, so a backend names the key inauth.api_key_envand a listener as a"${VSR_KEY_3F2A…}"entry inapi_keys; the Dashboard reads it there for model verification and Try it. Like the ConfigMap change itself, a new key takes effect when the pods restart. A Helm upgrade keeps the Secret's entries. The chart'srbac.creategrants both service accountsgetandupdateon that one Secret. - A ConfigMap without the key Secret. The manifests outside the chart
(OpenShift, Istio, KServe and the observability Dashboard) declare a
ConfigMap target but no key Secret (
VLLM_SR_K8S_KEY_SECRET_NAME). There, and wherever the Secret is missing or the pod may not read and update it (for example withrbac.create: false), a save keeps a literal key as written, logs it by path, and answers with aliteral_key_keptwarning per key. The key is never logged. Keep such keys in your own Secret and reference them withauth.api_key_env. --gateway extproc. A listener's keys stay inapi_keys, as written: the CLI writes them into the Envoy configuration it generates. Write them as"${NAME}"references to keep them out of the Router's configuration.- Your own file, copied as written.
vllm-sr serve, and the fallback ofvllm-sr config applywhen a change needs a restart, copy the file you give them into.vllm-sr/runtime-config.yamlas it is, so the Router loads it at its next start, and the Router's configuration history records that load. No key store runs on that path, so a literal key you wrote in your own file is in that copy and that history entry too, until the next Dashboard or management API save moves it. Keep keys out of your own file with${NAME}orauth.api_key_file.
A Dashboard user without the config.secrets.read permission, such as the
Write role, sees a reference but never what it reads, while the Router sends
what it reads. The Router expands every variable of its environment across the
whole document, not only a credential field, so an environment reference is a
value the writer cannot see wherever it sits: a backend api_key, a store
password, an auth.api_key_env, but also a chat_path, a header, a plugin
prompt or any other string. A reference is auth.api_key_file,
auth.api_key_env of any name, or an environment reference (${NAME} or
$NAME, with or without a default) in any value the Router expands, anywhere
in the configuration. Such a user can save a reference only where the saved
configuration already uses it, on the same destination (endpoint,
provider, protocol and the other fields a redacted key is checked on). A
listener's api_keys and api_key_files check what clients send and are not
included. Naming a new reference, moving the backend, plugin or store that
names one to another host, or naming a file the configuration does not use is
refused with 403. To send a value somewhere new, enter the value itself. A
user with config.secrets.read can name any reference.
A Recipe package carries its own configuration, which can bind an environment
reference the same way. Activating one makes the Router load and expand it, so
a user without config.secrets.read may not activate a Recipe whose
configuration binds any environment reference (such as a provider key in
auth.api_key_env), even one an operator allowlisted with --recipe-env. The
operator allowlist still bounds which names any Recipe may bind at all; this
adds that only a secret-reading user chooses to activate a Recipe that reads a
value with it. A Recipe that binds none activates with the Write role as
before.
Move an existing literal key
A configuration that still holds a backend's literal api_key loads as
before. To move the key out:
- From the Dashboard or the management API. Save once, for example after
changing any setting, or apply the file with
vllm-sr config apply. The save moves every literal key into the key store. - By hand. Write the key to a file only the Router's user can read, for
example with
install -m 600 /dev/stdin /etc/vllm-sr/provider-keys/openai(paste the key, then press Ctrl-D). Replaceapi_key: ...withauth: {api_key_file: /etc/vllm-sr/provider-keys/openai}and reload. Withvllm-sr serve, export the key before starting the stack and reference it withauth.api_key_envinstead:servepasses that variable to the Router container, which cannot see host paths outside its mounts.
Earlier configuration versions and backups still hold the old literal, so rotate any key that was ever saved in the configuration. To rotate a key kept in a file, replace the file's contents and reload the configuration.
Delegate the user's credential to an upstream
Some upstreams authorize each user themselves: a LiteLLM, one-api or similar
relay issuing per-user virtual keys, or a decision-model API metered per user.
When the Router sits behind an authenticating deployment layer, let the
authenticator hand the Router the credential it issued that user, and mark the
upstream's auth credential: delegated.
The credential that authenticates the client to the deployment and the
credential meant for the upstream are separate trust objects: the Router never
forwards the client's raw Authorization header.
global:
services:
authz:
delegated_credential:
enabled: true
header: x-vsr-delegated-credential # default; set by the authenticator
model_catalog:
deployments:
team-decisions:
provider: systemone
endpoint: https://decisions.example.com/v1/systemone
model: vllm-sr/d3-ultra
schema: vllm-sr/5.0
auth:
credential: delegated # a decision-model deployment
providers:
models:
- name: gpt-4o
provider_model_id: gpt-4o
api_format: openai
backend_refs:
- name: litellm
endpoint: https://litellm.internal/v1
provider: openai-compatible
auth:
credential: delegated # a provider backend
Every upstream the Router calls takes one auth block of the same shape: a
provider backend, a decision-model or remote embedding deployment, the judge
model of an escalate stage and an api_format: systemone target alike. It
has one of four modes:
| Mode | Set with | Calls carry |
|---|---|---|
| Static key | auth.api_key_env or auth.api_key_file, or a backend's api_key | the Router's own key |
| Delegated | credential: delegated | the requesting user's credential |
| Caller | credential: caller, on an Anthropic or OpenAI provider backend only | the login the client itself sent, see below |
| None | neither | no credential |
Whatever the mode, a call carries no other credential: a client's own
Authorization, api-key, x-api-key, x-goog-api-key,
api-subscription-key or Ocp-Apim-Subscription-Key header never reaches the
upstream, except the one a caller backend takes. A model declared without backends behind an external gateway
(listeners: []) keeps them for that gateway.
The delegated contract is disabled by default. Once it's enabled, the rules below apply.
Where the credential comes from
The delegated credential is an authentication output, like the identity headers:
- The shipped Envoy configurations (
vllm-sr serve --gateway extprocanddeploy/local/envoy.yaml) remove a client-supplied copy in a filter ahead of ext_proc. Thevllm-srtemplate removes a customheadertoo;deploy/local/envoy.yamlnames only the default. - Your authenticator goes after that filter. Neither configuration runs an
authenticator, so a deployment that issues the credential places its
authenticator after that filter and before ext_proc, as the
delegated-credentialE2E profile does. - A custom gateway must do the same:
request_headers_to_removeruns only after ext_proc. - A standalone listener drops the header, from Chat and System One
requests alike, unless
identity.trust_headersis set. - The user must be known. The Router keeps the value only when the request
also carries the authenticated user
(
global.services.authz.identity.user_id_header). - A dedicated header. Configuration rejects a
headerthat carries a client credential (Authorization,api-key,x-api-keyand similar) or an identity header.
Where it goes
- Removed from every other request. The Router removes the header from every upstream request, on every branch, and redacts it from logs.
- An internal secret. It's the one
x-vsr-*request header the Router reads from the authenticator instead of dropping, and the header registry records it as an internal secret: no response,x-vsr-tracemember, Router Replay record or cache key carries it. - Only delegated upstreams receive it, under that upstream's auth header
with its prefix (
Authorization: Bearer <credential>for an OpenAI-compatible backend or a System One API), replacing whatever the client sent there. - No other client credential. The client's other credential headers are
removed, so a backend that authenticates on
x-api-keydoesn't also receive the client'sAuthorization.
Which calls carry it
The principal is a property of the call:
- Calls made for a client request carry that request's credential: primary
dispatch, fallback attempts, Looper hops, System One decision-model calls,
escalatejudges,api_format: systemonetargets, response checks and recall embeddings. When the request carries none, the Router answers401before the call, and a fallback chain or Looper run that reaches such a call ends with that401instead of another model's answer. A guard that keeps true streaming makes its check only after the client received the answer, so a refused check does not refuse that answer, but no response cache, memory or stored Responses object keeps it. - Calls the Router makes on its own behalf never carry it, and a delegated
upstream refuses them: probes, model listings,
router_replay.shadowcopies, automatic-output render, store building and management diagnostics.
What configuration rejects
- a delegated upstream that also names a static key, so a shared key can never stand in silently;
- a delegated upstream without the contract enabled;
- a delegated upstream that only the Router's own calls reach, or that a
Router-own call must reach: vector store ingestion, memory storage, a
model_runtimeendpoint's health checks and preparation,router_replay.shadow, automatic output; - a delegated
openai_embeddingsdeployment withoutcapabilities.dimensions; - a delegated and a static backend in one cluster.
Answers stay with their user
- No sharing across users. An answer obtained with one user's credential is
served back only to that user. While any upstream is delegated, every
response_cachekeeps its defaultscope: user, and the Router keeps no decision-model answer or embedding of a delegated deployment for another request. - One request per call. The Router never puts two client requests in one upstream call, so a batched System One call carries one request's questions and that request's credential.
- Policy stays upstream. Caller attribution and any tenant, quota, budget or spend policy stay with the upstream.
Send the client's own login to its provider
A coding agent signed in to its provider sends the Router its own login:
Claude Code its Claude subscription, Codex its ChatGPT login. With
credential: caller on a backend of that provider, the Router routes the
request and presents that login in the header the client sent it in, so the
gateway holds no key and the plan behind that login pays for the calls. The
Dashboard's Requests page records every call as for any gateway traffic.
providers:
models:
- name: claude-sonnet-5-5
provider_model_id: claude-sonnet-5-5
api_format: anthropic
backend_refs:
- name: anthropic
provider: anthropic
endpoint: https://api.anthropic.com
auth: {credential: caller}
# or, for Codex on a ChatGPT login:
- name: gpt-6-luna
provider_model_id: gpt-6-luna
api_format: responses
backend_refs:
- name: chatgpt
provider: openai
endpoint: https://chatgpt.com/backend-api/codex
auth: {credential: caller}
Codex sends a ChatGPT login to ChatGPT's Codex backend at
https://chatgpt.com/backend-api/codex, and an OpenAI API key to
https://api.openai.com/v1, so the endpoint follows how Codex signs in. A
login is a person's, so the configuration fails to load wherever it could reach
someone else, or be used without the person's request:
- One provider, one payer per model. Every caller backend names one
provider, so a pool serves Claude Code or Codex, not both, and the backends
of one model share one credential, so failing over between them never moves
a request from the person's plan to a key. Other models may sit beside the
caller's, with a key of their own or none, such as a local model for easy
turns (mixing a login with other models).
They never receive the login, nor the
chatgpt-account-idthat names the ChatGPT account it acts for. - The issuer only. The endpoint is
https://api.anthropic.comforanthropic,https://chatgpt.comorhttps://api.openai.comforopenai, or an endpoint on this machine such as a test stub. - No listener keys. A listener's
api_keysread theAuthorizationheader, which here carries the login. - Only the client's request. A call the Router makes on its own behalf, an
in-process hop (an executor algorithm, context recovery), a
router_replay.shadowcopy and an automatic output render have no login and are refused for a caller model, and so isresponse_cache, which would answer one person with another's result. A decision whose models take no login may call them in process. - The client's system prompt. Both providers refuse the system message a
decision's
system_promptputs before the client's own on a person's login (measured: Anthropic answers 429 for a block put first and 200 for the same block put last, ChatGPT's Codex backend 400System messages are not allowed), so a decision that can reach a caller model cannot usesystem_prompt. A decision whose models all take no login can.
At dispatch a login reaches a backend only from a request on that provider's own
API: Messages for Anthropic, Responses or Chat Completions for OpenAI. A request
that reaches a caller backend without a login, or on another provider's API, is
answered 401 with caller_credential_missing, so a Claude login never reaches
OpenAI and a ChatGPT login never reaches Anthropic. A Responses backend is sent
store: false: the Router keeps response state itself, and ChatGPT's Codex
backend refuses a request without it. The Router keeps the login and the
chatgpt-account-id beside it for the request only, in memory, and sends the
account only to OpenAI: it does not log them, and takes both out of an upstream
error body or a stored response that echoes them. A caller backend's 401,
403 or 429 speaks of one person's login or plan, so it never opens the
circuit breaker other requests share.
A login is for its owner's own use, and the provider's terms for it apply to
every call made with it. Anthropic documents Claude Code on a gateway with only
ANTHROPIC_BASE_URL set: the saved Claude login stays the credential, and the
gateway forwards Authorization and the OAuth capability in anthropic-beta
(Subscriptions and gateways),
as a caller backend does. Its
credential policy
also forbids a third party to route requests through Free, Pro, Max or Ultra
plan credentials on behalf of its users. OpenAI documents
requires_openai_auth = true for Codex behind an LLM proxy, signed in with
ChatGPT or an API key
(Codex authentication). Serve a caller
backend on your own machine, or on your organization's gateway for its own
members, to the unmodified Claude Code or Codex, and do not offer it to other
people as a service.
Isolate sr-bench credentials
The Dashboard proxies a server-owned sr-bench origin and forwards authenticated user ownership:
- The service token.
SR_BENCH_TOKEN_ENVnames its environment variable (defaultSR_BENCH_TOKEN). Keep it separate from model API credentials and Router management credentials. - Fixed targets. Browser manifests can't change registered target endpoints, prices, credential references or execution harness options.
The managed core worker receives only the registered model credential references and its service token through inherited environment variables, not command-line values. Its private store and adjacent token file live outside the common Router and Dashboard mounts; the worker has no Docker socket or GPU passthrough. Dashboard receives the service token but not model credential values.
For code and agent evaluation, use an independently prepared worker host, and
set SR_BENCH_URL to an authenticated origin the Dashboard can reach. The
standalone service binds loopback by default and needs a service token to bind
anything else; keep its source, sandbox and model credentials on that host.
See sr-bench 1.0 for setup and limits.
Secure the local stack's storage credentials
vllm-sr serve provisions Redis and Postgres for the local stack, so it also
owns their credentials. Each stack generates its own on first start. No value
ships in this repository, and nothing falls back to a shared default.
Where the material lives:
| Artifact | Path under <state-root>/.vllm-sr/storage-secrets/ | Mode |
|---|---|---|
| Credential state | secrets[.<stack>].json | 0600 |
| Postgres password | postgres-password[.<stack>] | 0600 |
| Redis config | redis[.<stack>].conf | 0644 |
The directory itself is 0700 and owner-verified, so every file in it is
unreachable by other users. The Redis config is 0644 on purpose: the Redis
image drops to an unprivileged user before reading it, and the bind mount
resolves inside the container without traversing the host's private parent.
The values reach their consumers without entering any shared surface:
| Consumer | Gets the value from |
|---|---|
| Postgres | The mounted password file, via POSTGRES_PASSWORD_FILE |
| Redis | requirepass in its mounted config |
| Router | Inherited environment names; the generated runtime config carries only ${VLLM_SR_STACK_POSTGRES_PASSWORD} and ${VLLM_SR_STACK_REDIS_PASSWORD} |
| Dashboard | Never gets them |
They never appear in a docker command line, a generated config file, a log
record or a report artifact.
These credentials authenticate network peers. They do not constrain a caller
that can reach the container runtime directly: the Postgres image trusts local
socket connections, so anyone able to docker exec bypasses the password. Keep
container-runtime access restricted
accordingly.
Network layering
The local stack runs on two bridge networks.
| Container | vllm-sr-network | vllm-sr-data-network |
|---|---|---|
| Redis, Postgres, Milvus | no | yes |
| Router | yes | yes |
| Envoy, Dashboard | yes | no |
| Jaeger, Prometheus, Grafana | yes | no |
- Router is the only container on both. Requests reach it over the application network, and it reaches the stores over the data network.
- Per stack. A named stack prefixes both network names, so two stacks share neither.
- Milvus joins the data network, even though it has no credentials of its own yet.
This closes east-west reachability. A container on the application network,
such as a sidecar, cannot
open a connection to vllm-sr-redis:6379 or vllm-sr-postgres:5432 at all. The
storage ports remain published on 127.0.0.1 only, which closes the same
exposure from the host side.
It does not constrain a caller that can reach the container runtime. Such a caller can attach a container to any network, so the split is a boundary for workloads, not for the runtime socket.
A stack created before the split has its stores on the application network. The
next vllm-sr serve attaches each running store to the data network and
detaches it from the application network. If that detach fails, serve stops
rather than continuing: a stack that reports the isolation without having it is
worse than one that refuses to start.
Rotate
vllm-sr storage rotate
The command is scoped to one stack and follows VLLM_SR_STACK_NAME, like
serve and stop. Rotate each stack separately; there is deliberately no
cross-stack mode, because a partial failure would leave some stacks revoked and
others not.
Rotation has a short degradation window, so plan it for a moment when a brief Router restart is acceptable:
- Postgres changes its role password in place: existing connections continue, but new ones fail until the Router restarts.
- Redis is rebuilt against its named volume.
Recover
The credential state is missing or malformed. The CLI fails closed rather
than regenerating silently, because a regenerated credential would leave the
CLI believing it has access it no longer has. Delete the state file and rerun
vllm-sr serve. The stack is taken over in place: Postgres is re-keyed over
its trusted local socket, Redis is rebuilt against the same named volume, and
no data is lost.
Data from an older stack is not picked up. Storage data now lives in named volumes, and an existing container's volume is adopted by name when the stack is taken over. A container removed by an older CLI leaves its volume behind with no record of which container it belonged to, so it cannot be adopted automatically. Recover it manually:
docker system df -v --format '{{json .Volumes}}'
Look for volumes with Links: 0. Identify each candidate by its contents — a
Postgres data directory contains PG_VERSION, a Redis one contains
dump.rdb:
docker run --rm -v <volume>:/v:ro alpine ls /v
Then start a container against the identified volume, or copy its contents into
the stack's named volume (vllm-sr-postgres-data / vllm-sr-redis-data, with
the stack prefix for a named stack). The CLI does not guess which orphaned
volume is yours.
An older CLI is used against a rotated stack. It will fail to authenticate. That is the intended outcome. Either upgrade the CLI, or reset the passwords by hand through the container runtime.
Secure the local stack's management credential
The Dashboard calls the Router management API with one service credential, the
dashboard_control_plane role. When a Recipe turns on bearer authentication,
the Router accepts the Dashboard only with that credential. vllm-sr serve
creates both containers, so it owns the value:
- It uses
VLLM_SR_DASHBOARD_RECIPE_TOKENfrom its own environment when you set it (64 lowercase hexadecimal characters, such as the output ofopenssl rand -hex 32), and never writes that value down. - Otherwise the stack generates one on its first start and keeps it in
<state-root>/.vllm-sr/management-credential/dashboard[.<stack>].json, mode0600, in an owner-verified0700directory. - The Dashboard always receives it, and the Router whenever its runtime config
binds it, as an inherited environment name. It never appears in a
dockercommand line, a generated config file, the Recipe store or a log record, and the Dashboard keeps no copy on disk. A Recipe cannot bind the name as one of its environment inputs.
Who can read it: the user who runs vllm-sr serve, the Router and Dashboard
processes, and anyone who can inspect the containers through the container
runtime. To rotate it, delete the state file and run vllm-sr serve: it
generates a new value and recreates the Router and the Dashboard with it.
Recipe store permissions
vllm-sr serve reads the Dashboard's Recipe store before it starts the stack
and finishes interrupted activations, as the user who runs it. The store,
<state-root>/.vllm-sr/recipe-store/<stack>, is therefore shared with that
user's group: its files are group-readable and its directories group-writable.
.vllm-sr around it stays open to its owner and the Dashboard only, so other
host users cannot reach the store, and the store holds package and config
documents only, no credential.
A store written by an earlier Dashboard is private to the Dashboard's account.
If vllm-sr serve reports that it cannot read it, share it once with the
command it prints (chgrp -R to your group and chmod -R g+rwX); the Dashboard
keeps it shared from then on. Rootless Docker and Podman map container users to
other host IDs, so this sharing does not reach the host user there.
Review stored request data
Replay, response cache, memory, response history, service logs, and provider logs can all retain data derived from a request. Their settings are independent from the model's placement. A route to a local model can still write a prompt or response to a shared store.
For every enabled store:
- identify which routes write to it;
- inspect whether request or response bodies are captured;
- set a retention and deletion policy;
- restrict read and backup access;
- use encryption and transport security appropriate to the data; and
- test behavior when the store is unavailable.
Recipe Model Cards describe the checked-in replay and cache behavior for each maintained recipe. See Data and Storage for deployment guides.
Review what the decision model reads
Every routing judgment is a question to the decision model, so the model a question resolves to sees the parts of the request the question reads:
- Local by default. With nothing configured, every question asks the
local
primarydeployment, and personal-data rules run there. A binding or a rule'sdeploymentmoves a question elsewhere; bindpiiandhallucinationexplicitly when the decision model is remote. - Remote models receive what they judge. A
systemonedeployment receives the state parts its questions read: the request, the earlier turns, the tool results, the model's answer, a candidate, and the images of image questions. What leaves the host lists them per signal. A remote embedding provider receives the text it embeds. - Guards fail closed by default. A request-stage
jailbreakorpiirule whose model gives no answer matches, unless it setson_unknown: no_match. A long input is read in windows; when the deadline ends a scan early, the rule decides on the windows read, unless it setson_unscanned: match. - Masking covers the final request. The
maskingplugin replaces personal data in every text position of the provider-bound request, including retrieved documents and tool results, and fails closed when it cannot get spans. - Router-owned headers are protected.
header_mutationcannot write Router-owned headers or the route key, internal headers a client sends are dropped, and debug detail reaches only the callersglobal.router.headers.debugallows. - Authorization is a signal.
role_bindingsconditions decide who may reach which route and tools, from identity the gateway asserts; client-sent identity headers are trusted only withidentity.trust_headers: true.
Limit container-runtime access
vllm-sr serve is the only part of the local stack that uses the container
runtime. It creates, recreates and stops the stack's containers, and applies
every change saved in the Dashboard that needs them created anew.
- No socket in the stack. No stack container mounts the runtime socket, and the Dashboard image contains no container CLI.
- The Dashboard runs as a non-root user. It reads service status from the Router's and Envoy's HTTP probes and the files the CLI keeps beside the runtime config, and service logs from the bounded log spool.
Treat access to the runtime as administrator access to the stack. A caller who can reach it can read container environments, including the management credential, and bypass the storage passwords. Keep the socket to the runtime's administrators, and do not mount it into a stack container.
Production checklist
| Check | How | Details |
|---|---|---|
| Authenticate the public inference listener and the management surface | Listener API keys; bearer authentication on the management API | Protect the public listener |
| Strip internal control and identity headers at the trusted proxy | request_headers_to_remove; remove the delegated credential ahead of ext_proc | Delegate the user's credential |
| Bind Router management, ExtProc, metrics and store ports to private interfaces | Expose only the inference listener | Protect the public listener |
| Restrict model access and rate limits by role or tenant | Chat model allowlists, native model grants, role_bindings | Gateway Modes |
| Keep provider and store credentials in a secret manager or Kubernetes Secret | ${ENV} references or auth.api_key_file in YAML | Keep credentials out of configuration |
| Review every route's provider locality, tools and data retention | Where each question's decision model runs; which stores each route writes | Review what the decision model reads, Review stored request data |
| Grant replay detail, logs and configuration writes only to trusted operators | replay.read, logs.read, configuration-write access | Protect the public listener |
| Set strict failure behavior where bypassing a policy is unacceptable | on_unscanned: match on jailbreak and pii rules, which keep the default on_unknown: match | Review what the decision model reads |
| Rotate the local stack's storage credentials with every other credential | vllm-sr storage rotate | Rotate |
| Test backup, restore, credential rotation, upgrade and rollback | A rehearsal before each production change | Upgrade and Rollback |
| Keep the container-runtime socket out of every stack container | Only vllm-sr serve uses the runtime | Limit container-runtime access |