Security & Administration

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

By default a Qdrant node accepts unauthenticated requests over plain HTTP/gRPC — fine for a local trial, not for anything reachable over a network you don’t fully trust. This page covers the built-in API-key authentication and TLS options for a self-managed node, points to Qdrant Cloud’s managed RBAC, and covers the /metrics and /telemetry endpoints every node exposes for observability.

flowchart LR C["Client request"] --> T{"TLS enabled?"} T -->|"no"| X["Plaintext on the wire"] T -->|"yes"| K{"API key or JWT present and valid?"} X --> K K -->|"no"| E401["401 Unauthorized"] K -->|"read-only key, write request"| E403["403 Forbidden"] K -->|"JWT without access to this collection"| E403 K -->|"allowed"| OP["Operation runs"]

Every example on this page was run against Qdrant 1.20: a container with QDRANT__SERVICE__API_KEY set, a second one with TLS enabled, and a third with JWT-based access control.

API keys

A self-managed node can require a static API key on every request. Set it in config.yaml under service.api_key, or with the QDRANT__SERVICE__API_KEY environment variable — the environment variable takes precedence and is the usual way to inject it in a container without baking a secret into the image. Once set, every REST and gRPC request must present it or the node rejects it with an authentication error. See Security.

# config.yaml
service:
  api_key: ${QDRANT_API_KEY}          # read-write key
  read_only_api_key: ${QDRANT_RO_API_KEY}   # optional, read-only key (1.x)

On more recent 1.x versions a second, read-only API key (service.read_only_api_key / QDRANT__SERVICE__READ_ONLY_API_KEY) can be configured alongside the read-write one. A client authenticating with the read-only key can perform search and retrieval but is rejected on any operation that creates, updates, or deletes a collection, point, or index — useful for handing a key to a read-only consumer (a dashboard, an analytics job) without granting it write access.

A REST client sends the key as the api-key header; a gRPC client sends it as call metadata under the same key name. Qdrant also accepts the same value as a standard bearer token (Authorization: Bearer <key>), which matters for tools that only know how to send that header.

The behavior, observed against a container started with -e QDRANT__SERVICE__API_KEY=rw-demo-key -e QDRANT__SERVICE__READ_ONLY_API_KEY=ro-demo-key:

Request Status Body

GET /collections with no key

401

Must provide an API key or an Authorization bearer token

GET /collections with the read-write key

200

the collection list

GET /collections with the read-only key

200

the collection list

PUT /collections/c2 with the read-only key

403

Forbidden: Global manage access is required

GET /collections with Authorization: Bearer rw-demo-key

200

the collection list

GET /healthz, /readyz, /livez with no key

200

the probe text

The probe endpoints stay open on purpose, so an orchestrator can check liveness without holding the secret, and the /dashboard web UI’s static files also load without a key (the UI then asks you to type one to talk to the API). Everything else, including /metrics, /telemetry and /cluster, returned 401 without the key.

With the Python client, pass the key to the constructor; a client built without it fails on the first call with UnexpectedResponse: 401 (Unauthorized). Note that the client warns when a key is sent over plain http://, for the reason given in the TLS section.

from qdrant_client import QdrantClient

client = QdrantClient(url="https://qdrant.internal.example:6333", api_key="rw-demo-key")
print(client.get_collections())

Treat these keys as a coarse gate, not as user identity: there is one read-write key for everyone who holds it, and no way to revoke one holder without rotating the key for all. For anything finer, use the JWT tokens described below.

curl -s http://localhost:6333/collections \
  -H "api-key: ${QDRANT_API_KEY}"
# gRPC (grpcurl), key sent as call metadata instead of an HTTP header
grpcurl -plaintext \
  -H "api-key: ${QDRANT_API_KEY}" \
  localhost:6334 qdrant.Collections/List

TLS

TLS for both the REST (HTTP) and gRPC listeners is enabled under the tls section of config.yaml, pointing at a certificate and private key (PEM files); service.enable_tls turns it on. Once enabled, clients must connect with https:///a TLS-wrapped gRPC channel and, if the certificate is not publicly trusted, must be configured with the CA used to sign it. See Security.

# config.yaml
service:
  enable_tls: true

tls:
  cert: ./tls/cert.pem
  key: ./tls/key.pem
  # ca_cert: ./tls/ca.pem   # only needed if clients must verify a private CA

Combine enable_tls with api_key so credentials are never sent over an unencrypted channel — an API key alone only authenticates the request, it does not protect it in transit.

The setup can be reproduced in one step. A self-signed certificate for localhost is enough for a test (a real deployment uses a certificate from your CA):

openssl req -x509 -newkey rsa:2048 -nodes -days 30 -keyout tls/key.pem -out tls/cert.pem \
  -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1"

docker run -d --name qdrant-tls -p 6333:6333 -v "$PWD/tls:/qdrant/tls:ro" \
  -e QDRANT__SERVICE__API_KEY=rw-demo-key \
  -e QDRANT__SERVICE__ENABLE_TLS=true \
  -e QDRANT__TLS__CERT=/qdrant/tls/cert.pem -e QDRANT__TLS__KEY=/qdrant/tls/key.pem \
  qdrant/qdrant:latest

The startup log confirms both listeners (TLS enabled for gRPC API and TLS enabled for REST API), and the three kinds of client behave as expected:

curl http://localhost:6333/collections                         -> connection reset (plain HTTP no longer served)
curl https://localhost:6333/collections -H "api-key: ..."      -> curl exit 60: self-signed certificate not trusted
curl --cacert tls/cert.pem https://localhost:6333/collections -H "api-key: ..."   -> {"result":{"collections":[]}, ...}

The Python client takes the CA through verify: QdrantClient(url="https://localhost:6333", api_key="rw-demo-key", verify="tls/cert.pem") returned the collection list, and verify=False also works but disables certificate checking and belongs only in a throwaway test. The private key file must be readable by the user Qdrant runs as inside the container, which is why a mounted key often needs relaxed permissions. Certificates are re-read periodically, so a renewed certificate does not require a restart (the REST listener logged a one-hour TTL).

Fine-grained access with JWT

The all-or-nothing key split is not the only option. Qdrant supports JWT-based role-based access control, which scopes a token to chosen collections and to read or read-write access, and is available on self-managed nodes, not only on Qdrant Cloud. Enable it with QDRANT__SERVICE__JWT_RBAC=true next to the static api_key: the static key then acts as the signing secret, and Qdrant accepts any token that was signed with it (HS256) and carries valid claims. Tokens are minted by your own backend, with no call to Qdrant.

import base64, hashlib, hmac, json, time


def b64(raw):
    return base64.urlsafe_b64encode(raw).rstrip(b"=")


def make_jwt(claims, secret="rw-demo-key"):
    header = b64(json.dumps({"alg": "HS256", "typ": "JWT"}).encode())
    payload = b64(json.dumps(claims).encode())
    signature = b64(hmac.new(secret.encode(), header + b"." + payload, hashlib.sha256).digest())
    return (header + b"." + payload + b"." + signature).decode()


token = make_jwt({
    "access": [{"collection": "orders", "access": "r"}],   # read-only on one collection
    "exp": int(time.time()) + 3600,                          # expires in an hour
})

The token is sent as Authorization: Bearer <token> (or as the api-key). Against a node holding collections orders and reports, a token granting read access to orders behaved like this:

Request Status Result

GET /collections

200

only orders is listed

POST /collections/orders/points/query

200

the hits

POST /collections/reports/points/query

403

Forbidden: Access to collection reports is required

PUT /collections/orders/points

403

Forbidden: Write access to collection orders is required

PUT /collections/x (create a collection)

403

Forbidden: Global access is required

Claims worth knowing: exp bounds the token’s life (always set it); access lists collection and access of r or rw entries; and "w": true grants global write access, with which creating a collection succeeds. Claims can also pin a token to payload values (for example "payload": {"tenant": "acme"}), but that constraint is reported by Qdrant 1.20 as deprecated and should not be used in new code; enforce tenancy with a server-side filter instead, as in RAG Integration Patterns. Short-lived, narrowly scoped tokens given to each service (or end user) are the pattern, and the static key stays on the backend that mints them.

Qdrant Cloud adds a console for managing database API keys and their permissions on top of the same model, and the cluster-level TLS and network-isolation controls of the managed service; see Security for the current scope.

Monitoring and telemetry endpoints

Every Qdrant node exposes two HTTP endpoints for operational visibility. They are open on a node without an API key, and like any other REST endpoint they require the key once one is configured (both returned 401 without it in the test above):

  • /metrics — runtime metrics in the Prometheus exposition format: collection counts, point counts, request latencies and throughput, gRPC/REST request counters, and process-level resource usage.

  • /telemetry — a JSON document describing the cluster’s operational and usage state: collection configuration and sizes, hardware/resource usage, and feature-usage counters, useful for support requests and for dashboards that want more structure than a flat metrics scrape.

See Monitoring for the full field reference of both endpoints.

curl -s -H "api-key: ${QDRANT_API_KEY}" http://localhost:6333/metrics

On 1.20.0 the response is about 30 metric families. A few lines from a node with three collections, to show the format:

app_info{name="qdrant",version="1.20.0"} 1
collections_total 3
collections_vector_total 3
collection_points{id="orders"} 3
rest_responses_total{method="POST",endpoint="/collections/{collection_name}/points/query",status="200"} 1
rest_responses_total{method="POST",endpoint="/collections/{collection_name}/points/query",status="403"} 1

The families to alert on are collection_points (growth), collection_running_optimizations (a long-running optimization means a collection is not at full speed), collection_dead_replicas and collection_active_replicas_min (replication health), collection_update_queue_length (write backlog), the rest_responses_* counters with their status label (error rates and latency), and memory_resident_bytes.

/telemetry returns JSON with the keys id, app, collections, cluster, requests and quota; the optional details_level query parameter (for example ?details_level=3) expands the per-collection section down to individual segments. Two more endpoints help during an incident: GET /issues reports problems Qdrant has detected about itself (an empty list on a healthy node), and /readyz is the probe that fails until all shards are loaded.

Because Qdrant also accepts the key as a bearer token, a Prometheus job can scrape it with its standard authorization block, with no custom header support needed:

scrape_configs:
  - job_name: qdrant
    metrics_path: /metrics
    authorization:
      type: Bearer
      credentials: rw-demo-key       # or credentials_file: /etc/prometheus/qdrant.key
    static_configs:
      - targets: ["qdrant:6333"]

Where to go next

  • Clustering & Storage — distribution, replication, and storage tuning for the cluster these endpoints and credentials protect.

  • Qdrant’s /metrics endpoint is itself a Prometheus exposition format target, so scraping it is an ordinary Prometheus job like any other — see Prometheus & Monitoring for how to actually run Prometheus, scrape it, and alert on it.

  • RAG Integration Patterns — putting a secured, monitored cluster to work in a retrieval-augmented generation pipeline.