After securing Qdrant with API keys, requests that worked yesterday fail: without a key with 401, write requests with the read key with 403. Both are intended – the only question is which service gets which key.
Symptom
kubectl -n rag exec curl -- curl -s http://qdrant.rag:6333/collections
Must provide an API key or an Authorization bearer token
kubectl -n rag exec -i curl -- curl -s -K /schluessel/lesen.conf -X PUT \
http://qdrant.rag:6333/collections/probe \
-H 'Content-Type: application/json' -d @- < probe.json
{"status":{"error":"Forbidden: Global manage access is required"},"time":0.000135753}
The first request has no key (401), the second tries to create a collection with the read key (403).
Diagnosis
Check which file is behind -K. The read key may read and search, but not create or delete.
kubectl -n rag exec curl -- \
curl -s -K /schluessel/lesen.conf http://qdrant.rag:6333/collections
{"result":{"collections":[{"name":"handbuch"},{"name":"wissen"},{"name":"wissen-2000"},{"name":"wissen-500"},{"name":"wissen-ohne-kontext"},{"name":"wissen-ohne-ueberlappung"},{"name":"wissen-qwen3"}]},"status":"ok","time":0.000069193}
Causes
apiKeyQdrant now requires a key
The Helm chart sets apiKey and readOnlyApiKey from the secret qdrant-schluessel. Without a key Qdrant answers 401 Unauthorized.
readOnlyApiKeyThe read key may not write
Creating and deleting collections needs the full key. With the read key the answer is 403 Forbidden: Global manage access is required.
Fix
kubectl -n rag exec -i curl -- curl -s -K /schluessel/voll.conf -X PUT \
http://qdrant.rag:6333/collections/probe \
-H 'Content-Type: application/json' -d @- < probe.json
{"result":true,"status":"ok","time":0.402262764}
Don't: Give every service the full key. Only those who write get it.
RAG infrastructure on Kubernetes hands-on, day 14: security – API keys, network policies, tenant filters and source rules.
Go to day 14 →
FAQ
Which status code is behind the two messages?
Without a key 401 Unauthorized, with the read key on a write request 403 Forbidden.
Does the key in the secret protect against every access?
No. Anyone allowed to exec into a pod reads the key in plain text with env. The secret protects it in the manifest and in Git.