Skip to content

Harden docker-compose to TLS-by-default (MinIO and other local services) #17

Open

Description

@prometheusgr

Context

While implementing #13 (MinIO document storage), the MinIO client was built with secure derived from minio_url's scheme (https:// vs http://), matching the existing "let the URL decide" pattern every other outbound client in this codebase already follows (see app.core.tls's comment on httpx clients).

Issue #13 originally called for the MinIO client to be hardcoded secure=True, on the reasoning that Phase 5 stood MinIO up with TLS deliberately ahead of any client, so the default/easiest path should be the compliant one. That reasoning is right for the Helm-deployed production MinIO, but docker-compose.yml's local MinIO (and every other local service — Postgres, Keycloak, llama-server, doc-search) still talks plaintext HTTP over the docker network. A hardcoded secure=True would break docker-compose up outright, which is out of scope for #13.

Scope

Move local dev (docker-compose.yml) to TLS-by-default across services that support it, most importantly MinIO, so:

  • build_minio_client() (backend/app/storage/minio_client.py) can eventually drop its scheme-sniffing fallback and always expect secure=True in every environment, closing the gap between local dev and production behavior.
  • Local dev exercises the same TLS code paths (CA bundle verification, cert mounting) that Helm/K3s deployments use, catching TLS-related bugs before they reach a real cluster.

Notes

  • Needs dev-only certs generated/mounted for docker-compose (something like a local CA + service certs, analogous to what the Helm chart's cert-manager integration does for the cluster).
  • Should cover MinIO first (most directly affected by Document storage: MinIO client, upload, extraction, retention #13); evaluate whether Postgres/Keycloak/llama-server local TLS is worth the added complexity or should stay plaintext-for-dev indefinitely.
  • Related: docs/SECURITY.md's TLS decision log (Phase 5, Decision 2).

Activity

  1. prometheusgr commented on Aug 31, 2026

    @prometheusgr
    OwnerAuthor

    Note for when this is picked up: #4 added a new local service (`phoenix`, for LLM tracing) to `docker-compose.yml`, plaintext like every other service in that file — it should be included in this issue's scope alongside MinIO/Postgres/Keycloak/llama-server when TLS-by-default lands for local dev.

    (Distinct from #33, which is about the Helm/production chart's own TLS termination — this issue is specifically about the docker-compose local-dev gap.)

  2. added
    type:admin-setupInfra, deployment, ops, or operator/admin setup concern
    effort:MMedium: one layer (backend or frontend), a few days
    area:admin-opsK8s deployment, air-gap, backups, TLS, infra setup
    on Sep 4, 2026
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

    area:admin-opsK8s deployment, air-gap, backups, TLS, infra setupeffort:MMedium: one layer (backend or frontend), a few dayspriority:P2Valuable, not urgenttype:admin-setupInfra, deployment, ops, or operator/admin setup concern

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions