Skip to content

fix(services): give Nominatim its own database password - #987

Open
Medformatik wants to merge 1 commit into
fix/one-time-token-server-onlyfrom
fix/nominatim-own-database-password
Open

Medformatik wants to merge 1 commit into
fix/one-time-token-server-onlyfrom
fix/nominatim-own-database-password

Conversation

@Medformatik

@Medformatik Medformatik commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

The built-in Nominatim service set the password of its own bundled database from POSTGRES_PASSWORD, so a third-party geocoder container held the credential that owns the platform database. The configuration guide already said only PostGIS administration and the CLI's backups use that password.

Nominatim now reads its own NOMINATIM_DB_PASSWORD, in the same way Martin reads MARTIN_DB_PASSWORD, and does not render without it. The CLI rejects a value that is too short, a known placeholder or equal to POSTGRES_PASSWORD. The host-authority check now reports any service other than PostGIS whose manifest references the superuser's password, so this cannot come back unnoticed.

Related work

Third layer of the stack that starts with #983.

Verification

  • Focused tests pass: the host-authority gate with a new case for the rule, the CLI secret policy with three new cases, the manifest schema and runtime resource tests (127 tests).
  • pnpm check-ops-authority passes on the tree; check-types for packages/cli, Biome and Prettier pass on the touched files.
  • Not done: a Compose render, a container start or a Nominatim import. That the image applies the password only at its first import is taken from the image's documentation.

Release and upgrade impact

Product impact: security, operator-action

Deployments that enabled Nominatim must set NOMINATIM_DB_PASSWORD in infra/docker/.env before the next render, and should rotate POSTGRES_PASSWORD. The release-notes fragment has the steps.

No package release: the extension CLI is counted through shared core sources, but the only core change widens an error's issue type used by the deployment CLI.

@Medformatik Medformatik self-assigned this Nov 16, 2026
@Medformatik
Medformatik added this pull request to stack #985 November 16, 2026 08:54
@Medformatik
Medformatik force-pushed the fix/nominatim-own-database-password branch from a1ab60e to 6cc543e Compare November 16, 2026 10:00
The Nominatim container received the PostgreSQL superuser's password as the
password of its bundled database. It now reads NOMINATIM_DB_PASSWORD, the CLI
rejects a weak value or a copy of the superuser's, and the host-authority
check reports any service other than PostGIS that references it.
@Medformatik
Medformatik force-pushed the fix/nominatim-own-database-password branch from 6cc543e to 42b057f Compare November 16, 2026 17:23
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.

1 participant