Provision a shared OS group during host setup for secure container volume access
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
## Feature request
### Context
In the host-mode deployment flow, the Conductor creates directories like `/opt/debezium/data/` on remote hosts via Ansible. These directories are used as Docker bind mounts so that Debezium Server can persist offset and schema history files across container restarts.
Because the Ansible ad-hoc commands run with `--become` (privilege escalation), the directories are created as `root:root` with `0755` permissions. The Debezium Server container runs as a non-root user, so it cannot write to these directories without a workaround.
We currently handle this by passing `--user $(id -u):$(id -g)` to `docker run`, which forces the container process to run as root. This works but is not ideal from a security standpoint; running containers as root is generally discouraged.
### Proposed improvement
During host provisioning (the Ansible playbook that initially sets up a target host), create a dedicated OS group (e.g., `debezium`) and configure the data/config base directories with that group ownership and `g+rwx` permissions. The Docker container user would then be added to this group, giving it write access without needing root privileges.
### Reference:
* debezium/debezium-platform#493
Contributor guide
Assessment
This issue has not been assessed yet.