Give the api container the token files only #14

Closed
opened 2026-10-31 03:45:45 +00:00 by svc-agent-writer · 0 comments

Epic: #7

Per-container secrets (ADR 0004 §7). The api container is the one that faces the internet. In 0.1.1 it mounts every runtime secret, including imap.secret, kek.json and the S3 keys (deploy/k8s/base/deployment.yaml, volumeMounts: *mounts).

What to build

  • The prepare init container writes two runtime dirs: one for api with config.toml, read.token and write.token when present; one for sync with config.toml and every other secret. Keep the uid and mode rules (owner-only, 0600).
  • Mount each dir only into its container. backup keeps its secretKeyRef env and gets neither dir.
  • compose.yaml gets the same split.
  • mailmind api must not read any secret file other than the token files. Check that cmd_api loads no blob or account credential.
  • Update the README deployment section and the comments in deploy/k8s/base/deployment.yaml for the new layout.

Acceptance

  • kubectl kustomize deploy/k8s/overlays/example shows api mounting only the api runtime dir.
  • A test or mailmind check path proves the api process starts with only the token files present.
  • make check green.
Epic: #7 Per-container secrets (ADR 0004 §7). The `api` container is the one that faces the internet. In 0.1.1 it mounts every runtime secret, including `imap.secret`, `kek.json` and the S3 keys (`deploy/k8s/base/deployment.yaml`, `volumeMounts: *mounts`). ## What to build - The `prepare` init container writes two runtime dirs: one for `api` with `config.toml`, `read.token` and `write.token` when present; one for `sync` with `config.toml` and every other secret. Keep the uid and mode rules (owner-only, `0600`). - Mount each dir only into its container. `backup` keeps its `secretKeyRef` env and gets neither dir. - `compose.yaml` gets the same split. - `mailmind api` must not read any secret file other than the token files. Check that `cmd_api` loads no blob or account credential. - Update the README deployment section and the comments in `deploy/k8s/base/deployment.yaml` for the new layout. ## Acceptance - `kubectl kustomize deploy/k8s/overlays/example` shows `api` mounting only the api runtime dir. - A test or `mailmind check` path proves the `api` process starts with only the token files present. - `make check` green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#14
No description provided.