vLLM authentication and SSO

vLLM's --api-key option covers only some endpoints, so user access needs an authenticating gateway or reverse proxy with OIDC or SAML SSO, per-team keys, endpoint allowlists and usage attribution. This page covers the decisions, build sequence, effort and verification.

On this page

Why vLLM authentication needs a layer in front of the server

Your teams want to reach a vLLM server through company single sign-on and separate keys, but the server itself does not provide that. The built-in --api-key option protects only the endpoints under /v1, /v2, /inference and /cohere. The /invocations, /pause, /resume, /abort_requests, /metrics and /health paths are not covered by it, and the vLLM security documentation warns against relying on that option alone. A single shared key also cannot tell you which person, team or application made a request. Before any design work, list every route the server exposes and confirm which ones answer without a key in your build. Treat /pause, /resume and /abort_requests as operator controls, since an unauthenticated caller could disrupt serving.

The harder problem is identity. The vLLM server checks a key and passes the request through. It has no concept of a user, a group or a department, so it cannot enforce a rule such as "the data science team may call this model but not that one" or revoke one person's access without changing the key everyone shares. Per-team keys, SSO sessions and group membership all have to be resolved before a request reaches the server. Usage attribution has the same gap: token counts and request metrics from the server are aggregated per deployment, so the mapping from a request to a team or person must be recorded by the component in front of it. Plan for that logging from the start, and confirm with your security team which identifiers, retention period and access controls your audit requirements call for.

Which vLLM endpoints and settings the access layer must control

vLLM serves more than one kind of traffic from the same process: inference calls, control actions, health and metrics, and traffic between nodes. The built-in API key does not cover all of it, so the access layer needs an explicit decision for each group. The cards below set out what to allow, what to block, and what to verify before users reach the server.

OpenAI-compatible inference endpoints

The user-facing endpoints are /v1/completions, /v1/chat/completions, /v1/responses, /v1/embeddings and the audio transcription and translation routes. These are the endpoints applications call, so the access layer should authenticate every request, map each caller to an identity and team, and forward only the paths users need. Check that streaming responses and large request bodies pass through the proxy unchanged, and that the proxy logs the model name and token counts for usage attribution.

Online serving docs

The --api-key flag and its gap

The --api-key option protects only some paths, including /v1, /v2, /inference and /cohere. It holds one shared secret, so it cannot tell teams apart or revoke one caller without rotating the key for everyone. Treat it as a second layer behind the gateway, not as the access control itself. Confirm which paths your vLLM version protects by testing each route with and without the key.

Unprotected control endpoints

The /pause, /resume and /abort_requests endpoints act on the running engine and are not covered by --api-key. Any caller that reaches them could halt serving or cancel other users' requests. The access layer should return an error for these paths to every client except a named operations identity, and the network policy should block them from application subnets as well.

Metrics and health endpoints

The /metrics and /health endpoints are also outside the API key. Metrics expose request counts, token throughput, latency and KV cache use, which reveal load patterns and model usage to anyone who can read them. Allow the Prometheus scraper by network address or a dedicated credential, and deny public access. Keep the health route available to the load balancer only, so probes do not depend on user credentials.

Multi-node traffic between nodes

The security docs state that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. This traffic is not user traffic, so an SSO gateway does not protect it. Place all nodes on an isolated network segment that only the cluster can reach, and confirm with your platform team how the chosen backend, Ray or the built-in multiprocessing, is restricted before any node joins.

vLLM security docs

How a user login reaches vLLM through the gateway

The flow starts with a user signing in to an OIDC or SAML identity provider, which issues a token the gateway checks. The gateway maps the verified identity to a team key, applies an endpoint allowlist, and forwards only permitted /v1 calls to vLLM on the isolated network. Check that /metrics, /health and control endpoints sit behind the trust boundary and never appear on the user path, since the --api-key option does not protect them.

Trust boundary between the gateway-facing side and the isolated vLLM nodes.

Choosing the gateway, the identity model and the key scheme for vLLM SSO

This table compares the main decisions behind controlling access to a vLLM server: where authentication happens, how keys are issued, and how identity reaches the logs. Read each row for when the option fits and what it costs to run, then confirm each product capability with the vendor before choosing.

DecisionOptionTrade-off and operational costWhen it fits
GatewayReverse proxy with OIDC or SAML supportLowest moving parts in front of vLLM. The proxy's OIDC or SAML module, version and token validation must be patched and tested. Confirm the exact SSO protocols and claim mapping with the proxy vendor or project.Small number of endpoints, one identity provider, and a team comfortable running proxy configuration as code
GatewayCommercial API gateway productUsually brings built-in key management, quotas and usage dashboards, with licensing and vendor upgrade cycles to manage. Confirm SSO support, key scoping and log export for your identity provider with the vendor.Many consumer applications, existing gateway estate, or a need for quotas across several model services
GatewayCustom auth serviceFull control over logic, but your team owns security review, token handling, key storage and every failure path. Expect ongoing maintenance for each identity library upgrade.Unusual policy needs that no proxy or gateway can express, and staff able to own security-critical code
Key schemePer-team API keys issued at the gatewaySimple to rotate and revoke by team, with coarse attribution. A leaked key exposes every user on that team's integration.Service-to-service callers and batch jobs owned by one team
Key schemePer-user keys or SSO-bound sessionsStrongest attribution and revocation at the individual level. Requires lifecycle tooling for joiners, leavers and key expiry, which recurs with staffing changes.Interactive tools where a person's actions must be traceable to them
Identity to vLLMPass identity to vLLM as a trusted headervLLM does not verify user identity itself, so any header it trusts must be set only by the gateway and stripped from client requests. Misconfigured header stripping is a common failure mode. Check how the proxy overwrites inbound headers.Teams that need identity visible in vLLM logs or custom middleware, with network paths locked so only the gateway can reach the server
Identity to vLLMLog identity only at the gatewayKeeps vLLM simple and avoids trusting headers at the model server. Audit depth stops at the gateway, so per-request correlation with vLLM metrics needs a shared request ID. Confirm that the gateway logs the endpoint, model and token counts you need.Assessments that accept gateway-level audit logs as the system of record, with metrics correlated by time and request ID
Endpoint scopeAllowlist user endpoints at the gatewayVendor docs state the --api-key option does not cover /invocations, /pause, /resume, /abort_requests, /metrics or /health, so an allowlist is required, not optional. Each new endpoint vLLM adds in a release needs review before it is exposed.Every deployment that serves users, paired with a release review step described in your upgrade process

Build sequence for vLLM authentication and SSO

This sequence moves vLLM from an open serving endpoint to one where every user request passes through an identity-checked gateway, each team holds its own key, and usage is attributed to a team and key. Each step ends with a check you can run before moving on.

  1. Place vLLM on a private network

    Put the vLLM server and any multi-node worker nodes on a network that users cannot reach directly. The vLLM security docs state that communication between nodes in a multi-node deployment is insecure by default, without authorization or encryption, so isolation is the control that protects it. Your network or platform engineers make this change in the cloud network, cluster or data center fabric. It is done when a host outside the gateway cannot open a connection to the vLLM port or to the node-to-node ports, which you confirm with a connection test from a user subnet.

  2. Start vLLM with a second-layer API key

    Start the server with the --api-key option so that the endpoints under /v1, /v2, /inference and /cohere require a bearer token. Treat this as a second control, since the vLLM docs warn against relying on it alone and it does not protect /invocations, /pause, /resume, /abort_requests, /metrics or /health. Store the key in your secrets manager and give only the gateway the value. It is done when a request to /v1/models with no token is refused and the same request with the gateway-held token succeeds.

  3. Validate OIDC or SAML sessions at the gateway

    Configure the reverse proxy or API gateway as the only public entry point. It should validate OIDC tokens or SAML assertions from your identity provider, reject expired or unsigned sessions, and forward requests to vLLM with the server-side key. Platform engineers and the identity team own this work, and they confirm the mapping of claims to the gateway's supported auth method, since the exact configuration depends on the gateway product you choose. It is done when a request with no session is redirected or refused, and a request with a valid session from an authorized user is served.

  4. Map identity groups to team API keys

    Create one API key per team at the gateway, not one shared key for all users. Map each identity provider group to the team keys it may use, so membership changes in the directory change access without editing vLLM. Record the group-to-key mapping in version control so reviewers can see who can reach which models. It is done when a user in group A receives a key for team A only, and a user with no group receives a refusal.

  5. Set an endpoint allowlist

    Configure the gateway to forward only the user-facing paths you intend to expose, such as /v1/chat/completions, /v1/completions, /v1/responses and /v1/embeddings if those are in use. Deny everything else by default. Confirm the list against the vLLM online serving docs for the version you run, since endpoints change between releases. It is done when a request to an allowed path succeeds and a request to an unlisted path, such as /pause or /abort_requests, returns a denial from the gateway.

  6. Keep metrics, health and control endpoints internal

    Move /metrics, /health and the control endpoints to an internal path reachable only by your monitoring and orchestration systems. The vLLM metrics docs describe Prometheus output that exposes request counts and latency, which should not reach end users. Your platform team configures the scrape and health probes to use the internal network or a separate listener. It is done when an external user cannot reach /metrics through the gateway, while your Prometheus server and the orchestrator's health checks still succeed.

  7. Add usage logging keyed by team and key

    Enable access logging at the gateway that records the team, key identifier, identity subject, path, model name and token counts for each request, without storing prompt content unless your policy requires it. Send these logs to the same store your security team uses for audit. The key identifier, not the key value, should appear in logs. It is done when a test request from each team appears in the log with the correct team and key identifier, and a denied request is also recorded.

How the access design changes by deployment model

On a single node, the simplest pattern is one reverse proxy on the same host or a dedicated machine in front of the vllm serve process, with the API server bound only to localhost or a private interface. The proxy handles OIDC or SAML sign-in through an identity provider, maps users or groups to per-team keys, and forwards only the endpoints meant for users. The vLLM --api-key option should be treated as a second layer, not the main control, because it does not cover /invocations, /pause, /resume, /abort_requests, /metrics or /health.

  • Gateway location: Run the proxy on the same host or a separate machine that is the only network path to the vLLM port.
  • Key rotation: Rotate per-team keys by editing the proxy configuration or secret store and reloading it, then restart vllm serve only if its own --api-key value changes.
  • Endpoint allowlist: Expose /v1/chat/completions, /v1/completions, /v1/responses and /v1/embeddings to users, and block the control and metrics paths at the proxy.
  • Firewall rules: Block direct access to the vLLM port from user networks so the proxy cannot be bypassed.
  • Usage attribution: Log the authenticated identity and team with each request at the proxy, since vLLM itself does not attribute usage to a user.

Confirm the proxy's log retention and reload behavior with your own security team before go-live.

What drives vLLM SSO effort and how to keep each driver down

This table lists the factors that change the work of putting SSO, team keys and endpoint allowlists in front of vLLM, and how to reduce each one. Read the one-time rows as build work and the recurring rows as work that continues after go-live. The main takeaway is that most effort comes from how many identity providers, teams, models and environments you carry, so standardizing those early lowers both build and upkeep.

DriverWhy it changes effortHow to keep it downOne-time or recurring
Users and teamsEach team needs group mapping, a key or role, and an offboarding path, so headcount and team count set the access model size.Map identity provider groups to a small set of team roles and issue keys per team, not per person.One-time setup, recurring as people move
Identity providers and group mappingsEach OIDC or SAML connection needs its own claim checks, group names and test cases.Reuse an identity provider your organization already runs and keep one mapping table under version control.One-time, recurring when groups change
Served models and endpoints to allowlistThe vLLM --api-key option does not cover /invocations, /pause, /resume, /abort_requests, /metrics or /health, so each exposed route needs an explicit gateway rule.Write one allowlist template covering only the user-facing endpoints, then reuse it for every model route.One-time, recurring when models or routes are added
Multi-node topologyInter-node traffic is insecure by default with no authorization or encryption, so node isolation is needed alongside the gateway.Place nodes on an isolated network so only the gateway and the serving API are reachable, and keep that rule in infrastructure code.One-time, recurring with topology changes
Environments (dev, staging, production)Each environment needs its own identity client, keys and allowlist, and the rules must be tested in each one.Generate all environments from the same templates with different identity client settings and secrets.Set up once per environment, recurring on every change
Audit and retention requirementsUsage attribution needs gateway logs tied to a team or user identity, and retention periods set how long those logs must be stored and searched.Agree the log fields and retention period before build, and send gateway logs to the store your security team already uses.One-time design, recurring storage and review
Custom gateway logicPer-team rate limits, header rewriting or token translation are code that must be tested and patched with each change.Keep custom logic to the minimum and prefer standard proxy features, since every custom rule adds upgrade and test work.Build once, recurring maintenance
Key rotation and access reviewsTeam keys and group memberships expire or change, and reviews must confirm that access still matches policy.Automate key rotation and tie access reviews to the identity provider's group export rather than manual lists.Recurring

Controls that keep unauthenticated paths closed

The vLLM API key covers only some endpoints, so access control depends on what sits in front of the server and on the network around it. The cards below cover the controls that close the paths the key does not protect, and the checks that show they hold after every upgrade.

Fail-closed endpoint allowlists

Configure the reverse proxy or gateway to forward only the endpoints meant for users, such as /v1/chat/completions and /v1/embeddings, and to reject everything else by default. Do not rely on the proxy's default pass-through behavior. After each vLLM upgrade, compare the endpoint list against the release notes, because new routes can appear that the allowlist does not yet cover. Test the allowlist from outside the cluster to confirm that blocked paths return refusals.

vLLM security docs

Blocking control endpoints from user networks

The /pause, /resume and /abort_requests endpoints change server state and are not covered by the --api-key option. Block them at the proxy and at the network layer for every client network, so that no application or developer can pause the engine or cancel other users' requests. Keep them reachable only from a restricted operations path, and log any call that reaches them.

Scraping metrics only from the monitoring network

The /metrics endpoint exposes request counts, latency and KV cache data that reveal usage patterns and capacity. Permit scraping only from the Prometheus server's address and deny it from user and internet-facing networks. Confirm the rule with a request from a user network, which should fail, and one from the monitoring network, which should succeed.

API key storage, rotation and revocation

Keep each team's key in the gateway's secret store, not in application configuration files or source control. Issue one key per team so that a leaked key can be revoked without disrupting other teams. Set a rotation schedule that your security policy defines, and test revocation end to end, since the vLLM --api-key option does not itself track owners or expiry.

TLS between gateway and vLLM

Traffic from the gateway to the vLLM server carries prompts, responses and bearer tokens, so encrypt it even inside the cluster. Terminate TLS at the gateway for clients, then re-encrypt to the vLLM service, or use a service mesh with mutual TLS. Verify certificate validation on the gateway side, because a proxy that skips checks defeats the control.

Firewall rules for node-to-node traffic

The vLLM security docs state that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. Place those nodes on an isolated network and allow traffic only between peers that need it, such as Ray or multiprocessing ports among GPU nodes. Keep these ports unreachable from the gateway subnet and from user networks.

vLLM parallelism docs

How to test that vLLM fails closed for unauthorized users

The core test is simple: every request that should be refused must be refused at the gateway, and every refusal must be provable. Start with unauthenticated and revoked access. Send a request with no token, a request with an expired team key, and a request with a key that was revoked a few minutes earlier. Each should return an authentication error from the gateway, and none should reach the vLLM process. Then test a user who signs in successfully but belongs to no mapped group, or to a group mapped to a different model. The gateway should deny that user too. Confirm the revocation path end to end, because a key that stops working only after a cache expires is a finding, not a pass. Record the time between revocation and the first denied request, and confirm your identity provider's session lifetime and the gateway's token validation interval with your own security team, since those values come from your configuration rather than from vLLM.

The second group of tests checks paths that must stay closed. Vary the path, not only the credential. Call /v1/chat/completions with a valid key to confirm the allowed path works, then call /invocations, /pause, /resume, /abort_requests, /metrics and /health from a user network with a valid key and again with none. The vLLM security documentation notes that the --api-key option does not protect several of these paths, so the expected result is a denial from the proxy for every path not on the allowlist. Repeat the test directly against the vLLM server address from a user subnet to confirm that a direct call bypassing the gateway is blocked by network rules, not by the API key alone. Treat any unexpected success as a failed control and retest after the fix.

The last check is attribution. For each test team, send a request through the gateway and then find that request in the gateway access log and in whatever audit record your platform keeps. Confirm that the team identifier, key identifier and model name match the caller, and that no request is logged under a shared or default identity. Do the same for a revoked key, which should appear as a denied event. Ask your team to confirm which fields the gateway logs by default and which need configuration, because the vLLM server itself does not attribute requests to teams. Keep the test evidence, including request IDs, timestamps and the configuration version tested, so an auditor or internal reviewer can reproduce the result.

vLLM SSO questions buyers ask before hiring help

Does vLLM itself support OIDC or SAML single sign-on?

The supplied facts do not confirm that vLLM has built-in OIDC or SAML login, so confirm this against the current vLLM docs and release notes for the version you plan to run before you design around it. What the security docs do describe is the --api-key option, which protects endpoints under /v1, /v2, /inference and /cohere but not /invocations, /pause, /resume, /abort_requests, /metrics or /health, and which the docs say not to rely on alone. In practice, most teams put an authenticating gateway or reverse proxy in front of vLLM and handle SSO there, so the identity logic does not depend on the serving engine. Ask any partner to show you the exact vLLM version and the documented mechanism they plan to use.

How long does vLLM SSO integration take, and what sets the duration?

The duration depends mainly on how many identity sources, applications and teams are involved, and on how quickly your identity provider team can grant access. The main drivers are whether you use OIDC or SAML, how many groups map to API key tiers, how many endpoints must be allowlisted, whether usage attribution is required from day one, and whether the gateway must run in your private network with no outbound calls. Testing the proxy against every allowlisted endpoint, and confirming that blocked paths such as /metrics stay unreachable from user networks, adds time. Ask for a written schedule that lists these milestones separately, with the dependencies on your team named.

What does our team need to provide before integration starts?

Expect to provide four things: access to the identity provider with an administrator or delegated app-registration rights, a clear group structure that maps people to teams and roles, network details for the vLLM hosts and the gateway, and a decision on who owns API key issuance and rotation. Also provide the list of endpoints that users really need, since the allowlist is built from that list. Network details should cover the subnets that can reach the gateway, the DNS names, the TLS certificate process and any egress restrictions. Missing items usually delay the work more than the technical build does.

Can an internal team set up SSO for vLLM without outside help?

Yes, if your team already runs a reverse proxy or API gateway, operates your identity provider and has someone who understands the vLLM endpoint surface. The work needs skills in OIDC or SAML configuration, proxy policy, TLS, and testing that unauthenticated routes are blocked. Teams with no experience in those areas often spend time on the parts that are easy to get wrong, such as token validation, group claims, and making sure /metrics and control endpoints are not reachable through the proxy. A short review by an outside engineer can help even when the team builds the system itself. Decide based on the skills you have on staff and how many releases you expect to keep current.

What does a fixed-scope DeployOpen engagement cover for vLLM SSO?

DeployOpen works from a written scope agreed before work starts. For this topic, that scope can include planning the gateway or reverse proxy design, configuring the identity integration with your provider, setting per-team API keys and endpoint allowlists, testing blocked endpoints, and documenting the setup for your operators. DeployOpen implements and hardens these systems inside your own infrastructure, including your cloud accounts, data centers or air-gapped networks. Security testing of the finished setup can be added as separate work. The written scope should list each deliverable, the environments covered, the systems you must supply access to, and the acceptance checks.

Can we attribute vLLM usage to individual users, and what does that require?

Per-user attribution is possible when the gateway authenticates each request and passes a user or team identifier to the logs or metrics pipeline, because vLLM does not know who called it unless the layer in front of it records that. You will need the gateway to log the authenticated identity, a consistent team mapping from your identity provider, and a place to store and query those logs. vLLM exposes Prometheus-format metrics at /metrics, which cover request counts and token throughput, but those metrics should stay on an internal network and are not a per-user record by default. Confirm with the vLLM docs for your version which request fields are available for your logging design.

What cost components should we expect for vLLM SSO integration?

Costs fall into one-time work and recurring work. One-time work includes design, identity provider configuration, gateway policy, endpoint allowlisting, testing and documentation, and is paid to whoever builds it, whether your staff or a partner. Recurring work includes operating the gateway, rotating API keys, reviewing group membership, renewing certificates, and updating allowlists when vLLM releases change endpoints. vLLM itself has no license fee, and the open-source license is Apache-2.0. When you request a quote, ask for each component as a separate line, the assumptions behind it, which items are one-time and which recur, and who is responsible for ongoing operations.

What to monitor, back up and document after go-live

The first thing to watch after go-live is what the gateway refuses. Log every denied request with the caller identity, the requested path and the reason (missing token, expired token, key not mapped to an endpoint, or path not on the allowlist). A sudden rise in denials on one team's key usually means a misconfigured client or a rotated credential that was not updated, while denials against /metrics, /pause or /abort_requests from outside the admin network deserve immediate investigation. Track usage per key as well, so that token volume and request counts can be attributed to a team and a named model. Set alert thresholds with the team that owns each key, and confirm that gateway logs are retained for as long as your audit policy requires.

vLLM's own telemetry belongs on the internal network only. Its Prometheus endpoint at /metrics covers request counts, token throughput, latency histograms and KV cache use, and the vLLM production metrics documentation describes what each series reports. Have Prometheus scrape the vLLM server directly over the private network, never through the public gateway, and confirm that the gateway does not forward /metrics to users. Each vLLM upgrade is also a moment to review the allowlist. Minor releases arrive about every two weeks (v0.31.0 was dated October 5, 2026), and new or renamed endpoints can appear without anyone noticing. Diff the served paths against the allowlist after every upgrade and block anything not explicitly approved.

Document the controls well enough that a new engineer or an auditor can rebuild them. Back up the gateway configuration, the OIDC or SAML mapping from identity groups to teams, and the team-to-key mapping, stored in version control or a configuration backup with restore tested at least once. Record the identity mappings in writing, including which claim or group grants which team, and who approves a change. Write the key rotation procedure with steps, timing, the overlap window for old and new keys, and the owner for each team's keys. Finally, name one owner for each allowlist entry and require a ticket that records who requested the change, who approved it and the business reason. Confirm these owners and retention periods with your security and compliance teams before go-live.

How DeployOpen scopes, builds and hands over vLLM access controls

DeployOpen plans and builds the access layer in front of your vLLM server inside your own infrastructure, so only the endpoints meant for users are reachable and every request is tied to a person or team. The work covers identity provider integration, per-team keys, endpoint allowlists and usage attribution, documented so your security and compliance teams can review it.

How we scope

  • Inventory which vLLM endpoints applications and users need, and which control endpoints stay internal.
  • Confirm the identity provider, OIDC or SAML settings, and the group mapping that decides team access.
  • Agree in writing the gateway or proxy product, logging destinations and retest scope before work starts.

How we build

  • Place a reverse proxy or gateway in front of vLLM that allowlists only user-facing paths such as the OpenAI-compatible routes.
  • Configure per-team API keys, rotation procedures and request attribution so usage can be reported by team.
  • Test that /metrics, /pause, /resume, /abort_requests and /invocations are unreachable from user networks.

How we hand over

  • Deliver configuration, access matrix, endpoint allowlist and identity mapping documentation for your records.
  • Provide test evidence showing blocked endpoints, failed unauthenticated calls and working SSO login flows.
  • Walk your operations and security staff through key issuance, revocation and log review before closing the engagement.

How we support

  • Review access controls again when vLLM minor releases change endpoints or the --api-key behavior.
  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Ask any provider for a written retest plan so access changes are checked after each update.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.