Spike: run the server with all capabilities dropped #1

Closed
opened 2026-11-18 05:14:37 +00:00 by jcoffey-dev · 2 comments
Owner

S1 · size S · part of inbuxa for Kubernetes (tracking issue in inbuxa-charts)

The server image sets cap_net_bind_service=+ep on the binary. With --cap-drop ALL, exec fails with operation not permitted (checked on 27.1-rc.22). It runs with drop ALL + add NET_BIND_SERVICE + no-new-privileges + a read-only root. Find out whether an image without file caps, listening on high ports, runs with drop ALL and nothing added.

Done when

  • The server starts and serves SMTP on 2525 and HTTP on 8080 on kind under Pod Security restricted, with drop ALL and nothing added
  • Write-up of what K-S1 has to change
**S1** · size S · part of inbuxa for Kubernetes (tracking issue in inbuxa-charts) The server image sets `cap_net_bind_service=+ep` on the binary. With `--cap-drop ALL`, exec fails with `operation not permitted` (checked on 27.1-rc.22). It runs with drop ALL + add NET_BIND_SERVICE + no-new-privileges + a read-only root. Find out whether an image without file caps, listening on high ports, runs with drop ALL and nothing added. **Done when** - The server starts and serves SMTP on 2525 and HTTP on 8080 on kind under Pod Security `restricted`, with drop ALL and nothing added - Write-up of what K-S1 has to change
jcoffey-dev added this to the 27.1 milestone 2026-11-18 05:14:37 +00:00
jcoffey-dev added the
priority
p1
enhancement
labels 2026-11-18 05:14:37 +00:00
Author
Owner

Result (Docker, 27.1-rc.22, 2026-11-17): pass with one change.

  • Published image, --cap-drop ALL: exec fails, operation not permitted (the file capability on the binary).
  • Same image with the file capability removed (setcap -r), --cap-drop ALL --security-opt no-new-privileges --read-only, tmpfs on /etc/inbuxa, /var/lib/inbuxa, /tmp: starts, bootstrap listener on 8080, healthy.
  • Also tried with a read-only bind-mounted config.json (as a Secret/ConfigMap would be) and RocksDB on the volume: starts, healthy, never writes config.json.

Still open for kind: mail listeners on high ports. Listeners live in the store (x:NetworkListener), so the chart needs a way to set high ports on first start: env defaults or a setup Job. Carried into inbuxa-server K-S1.

**Result (Docker, 27.1-rc.22, 2026-11-17): pass with one change.** - Published image, `--cap-drop ALL`: exec fails, `operation not permitted` (the file capability on the binary). - Same image with the file capability removed (`setcap -r`), `--cap-drop ALL --security-opt no-new-privileges --read-only`, tmpfs on `/etc/inbuxa`, `/var/lib/inbuxa`, `/tmp`: starts, bootstrap listener on 8080, healthy. - Also tried with a read-only bind-mounted `config.json` (as a Secret/ConfigMap would be) and RocksDB on the volume: starts, healthy, never writes `config.json`. Still open for kind: mail listeners on high ports. Listeners live in the store (`x:NetworkListener`), so the chart needs a way to set high ports on first start: env defaults or a setup Job. Carried into inbuxa-server K-S1.
jcoffey-dev self-assigned this 2026-11-18 06:28:53 +00:00
Author
Owner

Folded into the checklist on inbuxa/inbuxa-charts#14 to keep the issue list short. The details stay here; reopen this when work on it starts.

Folded into the checklist on inbuxa/inbuxa-charts#14 to keep the issue list short. The details stay here; reopen this when work on it starts.
Sign in to join this conversation.