Skip to content

fix(k8s): qdrant requires its api key, and open webui sends it #1670

Closed

Description

@dan-petty

Friction

Qdrant runs with no authentication, and apparently has since v0.2.12. k8s/llm/values-qdrant.yaml injects the API key under extraEnv, a key chart qdrant 1.19.1 does not have, so Helm drops it without an error. The repo, Secret llm/qdrant-api-key, the authenticated ServiceMonitor (#823), k8s/README.md:314 and closed #43 all assume Qdrant enforces the key, and the unit test that should guard it asserts the wrong key, so devops ci reports the protection as present.

Evidence

Live, read-only, 2026-10-17 (main = 3dd7fa6):

  • StatefulSet llm/qdrant (chart qdrant-1.19.1): the container's only env var is QDRANT_INIT_FILE_PATH. ConfigMap llm/qdrant (production.yaml) has no service.api_key, and no API-key Secret is mounted.
  • Argo CD Application qdrant is Synced and Healthy at 3dd7fa6, so the gap is in git, not drift.
  • An unauthenticated GET /collections through the API server's service proxy (/api/v1/namespaces/llm/services/qdrant:6333/proxy/collections) returned status=ok with 2 collections (only keys and counts were printed).
  • Secret llm/qdrant-api-key exists with data key api-key (value not read).
  • NetworkPolicy llm/llm-default-perimeter selects qdrant and admits every pod in llm, the whole monitoring namespace and kube-system Traefik on all ports. Ingress llm/qdrant-ingress routes / to qdrant:6333 on Traefik's web entrypoint with no auth middleware; reachability from outside depends on the tunnel's access policy.
  • StatefulSet llm/open-webui sets VECTOR_DB and QDRANT_URI but no QDRANT_API_KEY.

Repo and chart:

  • k8s/llm/values-qdrant.yaml:21 declares extraEnv:; the comment at :15 describes it. Chart 1.19.1 reads only .Values.env (chart values.yaml:13 env: [], templates/statefulset.yaml:97 range .Values.env).
  • helm template with the repo values renders no QDRANT__SERVICE__API_KEY; with the key renamed to env: it renders a secretKeyRef to qdrant-api-key/api-key.
  • apiKey: {valueFrom: ...} is not a fix: the chart's lookup renders an empty Secret qdrant-apikey under helm template and Argo CD.
  • tests/test_k8s_qdrant_security.py:4-5 and :60-71 assert extraEnv holds the key.
  • k8s/llm/values-open-webui.yaml:32-36 lists VECTOR_DB and QDRANT_URI only.
  • git log -S shows the extraEnv block unchanged since v0.2.12 (28c8903).

Remedy

One PR on a topic branch targeting main:

  1. Tests first: change tests/test_k8s_qdrant_security.py (docstring :4-5, assertions :60-71) to assert the key sits in env. Add a check that fails when a top-level key in values-qdrant.yaml is not a key of chart 1.19.1's values, reading a vendored copy of the chart's values.yaml (tests make no network calls). It catches keys Helm ignores silently.
  2. k8s/llm/values-qdrant.yaml:21: rename extraEnv: to env:, and fix the comment at :15.
  3. k8s/llm/values-open-webui.yaml: after QDRANT_URI (:35-36), add QDRANT_API_KEY from secretKeyRef {name: qdrant-api-key, key: api-key}. Open WebUI chart 16.6.0 renders it on the open-webui container. Without it, Open WebUI's RAG breaks once Qdrant enforces the key.
    Deployed by Argo CD Applications qdrant and open-webui on merge, and by deploy-stack, which already pushes llm/qdrant-api-key before installing the release.

Verification after the sync:

  • An unauthenticated GET /collections through the service proxy returns 401.
  • The chart's readiness and liveness probes still pass.
  • Open WebUI document search still works.
  • up for the qdrant ServiceMonitor target stays 1 (Alloy already sends the bearer token from the same Secret, feat(k8s): qdrant metrics with an authenticated scrape, and its dashboard row restored #823).
  • devops-cli RAG clients still connect; they read keyring qdrant_api_key, which push-secrets keeps equal to the Secret.

Priority: P1. Severity high: an unauthenticated read-write vector store reachable from two namespaces and Traefik, with a test that reports it protected.

Proposed design

Problem statement

Qdrant is configured to run without authentication, but the deployment expects it to enforce API key authentication. The current Helm values inject an API key via 'extraEnv' which the qdrant chart version 1.19.1 does not recognize, causing Helm to silently ignore it. This creates a security vulnerability as Qdrant is accessible without authentication, and Open WebUI does not send the required API key, breaking its RAG functionality.

Acceptance criteria

  • Criterion 1: The qdrant Helm chart properly recognizes and uses the API key from the secret
    Verification: Running 'helm template' with the updated values-qdrant.yaml should render a secretKeyRef to 'qdrant-api-key/api-key' under the env section of the statefulset
  • Criterion 2: Open WebUI sends the required QDRANT_API_KEY environment variable
    Verification: The k8s/llm/values-open-webui.yaml should contain QDRANT_API_KEY set from secretKeyRef {name: qdrant-api-key, key: api-key} after the QDRANT_URI setting
  • Criterion 3: Qdrant requires authentication for API access
    Verification: An unauthenticated GET /collections request through the service proxy should return 401 status code instead of 200
  • Criterion 4: Open WebUI document search continues to work after the change
    Verification: The RAG functionality in Open WebUI must remain functional, with successful document searches and vector retrievals
  • Criterion 5: Qdrant readiness and liveness probes continue to pass
    Verification: The chart's readiness and liveness probes should still pass after the change is applied

Key questions

  • What is the correct way to inject the API key in the qdrant Helm chart version 1.19.1?: The API key should be injected using the 'env' parameter instead of 'extraEnv' because chart 1.19.1 only reads '.Values.env' [sources: k8s/llm/values-qdrant.yaml:21]
  • How does the current test verify API key injection?: The test currently asserts that 'extraEnv' holds the key, but this assertion is incorrect because 'extraEnv' is ignored by the chart version 1.19.1 [sources: tests/test_k8s_qdrant_security.py:4-5, tests/test_k8s_qdrant_security.py:60-71]
  • What needs to be added to the Open WebUI configuration to make it work with Qdrant's authentication?: QDRANT_API_KEY environment variable must be added after QDRANT_URI in k8s/llm/values-open-webui.yaml, using secretKeyRef from qdrant-api-key [sources: k8s/llm/values-open-webui.yaml:32-36]

Open questions

  • Should the qdrant chart be updated to support extraEnv? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    on Oct 18, 2026
  2. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate describes a bug where Qdrant requires an API key but it's not being sent by Open WebUI, causing a misconfiguration.
    • Priority: P1-High. The issue involves an unauthenticated read-write vector store reachable from multiple namespaces and Traefik, posing a high security risk.
    • Value: High. Fixing the API key handling ensures proper authentication for Qdrant, improving system security and functionality for users relying on vector search capabilities.
    • Effort: Medium. The fix requires changes to multiple configuration files and tests, including updating environment variables and modifying test assertions.
  3. added a commit that references this issue on Oct 23, 2026
    8810767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions