debezium / debezium/dbz

Provision a shared OS group during host setup for secure container volume access

Open
#2,451 0 comments 0 reactions 0 assignees View on GitHub
component/debezium-platform type/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.