Skip to content

Document the non-superuser PostgreSQL role of the Docker Compose stack - #900

Merged
fliebe92 merged 3 commits into
pre-releasefrom
postgresql-least-privilege-role
Sep 10, 2026
Merged

fliebe92 merged 3 commits into
pre-releasefrom
postgresql-least-privilege-role

Conversation

@fliebe92

@fliebe92 fliebe92 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Documentation follow-up for zammad/zammad-docker-compose#611, which makes the Docker Compose stack run Zammad against an unprivileged PostgreSQL role instead of the postgres image's bootstrap superuser. Refs zammad/coordination-technical-debt#854.

Changes to appendix/environment-variables.rst:

  • POSTGRES_USER — clarifies that in the Docker Compose stack this is an unprivileged login role owning Zammad's database, created when the database volume is initialized.
  • POSTGRES_SUPERUSER and POSTGRES_SUPERUSER_PASS — new variables for the administrative superuser of the stack's PostgreSQL service, which Zammad itself never uses.
  • POSTGRESQL_DB_CREATE — the image default stays true, but the Docker Compose stack now sets false, because it creates the database up front and the Zammad role has no CREATEDB attribute. Documents that an external database server needs true plus a role holding CREATEDB.

The migration steps for existing installations are intentionally not repeated here — they are a one-off upgrade concern and live in the stack's README and the release notes. Happy to add them to the install docs instead if you prefer them here.

Verified with rstcheck[sphinx]<=6.1.0, the same version the Check RST Syntax CI step uses: no issues in the changed file.

Please merge only together with (or after) zammad/zammad-docker-compose#611.

The Docker Compose stack now connects to PostgreSQL with an unprivileged
login role and keeps a separate administrative superuser, configurable via
the new POSTGRES_SUPERUSER and POSTGRES_SUPERUSER_PASS variables. Since that
role is not allowed to create databases and the stack creates the database up
front, POSTGRESQL_DB_CREATE defaults to false there.

See zammad/zammad-docker-compose#611
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Artifacts

Produced during runtime

📦 html-93d8011

The superuser password follows POSTGRES_PASS unless it is set explicitly, so
that hardening that one variable does not leave a superuser behind on the
default password. Also document that the superuser name must differ from
POSTGRES_USER, since the stack refuses to start otherwise.

See zammad/zammad-docker-compose#611
@fliebe92
fliebe92 requested a review from ralf401 September 10, 2026 06:06
@fliebe92
fliebe92 merged commit aa5c6a4 into pre-release Sep 10, 2026
1 check passed
@fliebe92
fliebe92 deleted the postgresql-least-privilege-role branch September 10, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants