[Docs] Warn that --api-key does not gate all endpoints (#51999)
Signed-off-by: Russell Bryant <rbryant@redhat.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9035151d6c
commit
8151f2ad43
@@ -2,6 +2,17 @@
|
||||
|
||||
vLLM provides an HTTP server that implements OpenAI's [Completions API](https://platform.openai.com/docs/api-reference/completions), [Chat API](https://platform.openai.com/docs/api-reference/chat), and more! This functionality lets you serve models and interact with them using an HTTP client.
|
||||
|
||||
!!! warning "API key authentication does not protect every endpoint"
|
||||
The `--api-key` option (or `VLLM_API_KEY` environment variable) only
|
||||
authenticates requests to endpoints under the `/v1`, `/v2`, and
|
||||
`/inference` path prefixes. Other endpoints on the same HTTP server are
|
||||
**not** authenticated — most notably `/invocations`, which exposes the same
|
||||
inference capabilities as the `/v1` endpoints. Do not rely on `--api-key`
|
||||
alone to secure vLLM. See
|
||||
[API Key Authentication Limitations](../../usage/security.md#api-key-authentication-limitations)
|
||||
for the full list of protected and unprotected endpoints and recommended
|
||||
hardening, such as deploying behind a reverse proxy.
|
||||
|
||||
## Supported APIs
|
||||
|
||||
We currently support the following OpenAI APIs:
|
||||
|
||||
@@ -282,7 +282,15 @@ class FrontendArgs(BaseFrontendArgs):
|
||||
"""Allowed headers."""
|
||||
api_key: list[str] | None = None
|
||||
"""If provided, the server will require one of these keys to be presented in
|
||||
the header."""
|
||||
the header.
|
||||
|
||||
Warning: this only authenticates endpoints under the `/v1`, `/v2`, and
|
||||
`/inference` path prefixes. Other endpoints on the same server, including
|
||||
`/invocations` (which exposes the same inference capabilities as `/v1`),
|
||||
remain unauthenticated. Do not rely on `--api-key` alone to secure vLLM;
|
||||
see
|
||||
https://docs.vllm.ai/en/latest/usage/security.html#api-key-authentication-limitations
|
||||
for what it does and does not protect."""
|
||||
ssl_keyfile: str | None = None
|
||||
"""The file path to the SSL key file."""
|
||||
ssl_certfile: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user