1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00
Files
guix/gnu/services
Giacomo Leidi b657836863 gnu: postgresql-role: Avoid leaking passwords through kernel's command line facility.
The implementation of postgresql-role's password up until now relied on
spawining a subshell reading the password file and passing its content
via command line to a psql process which would create users and set
passwords. This allowed a (fast) attacker to eavesdrop, via the kernel
command line facility, the password while they were read,
without having the permissions required for reading the password
file.

This new implementation reads passwords directly from password files
into the Guile process, temporarily stores them in query files living in
a memory backed file system and deletes the query files after executing
them. It also makes sure to turn off logging of commands for the
duration of the password setting transaction, so passwords don't get
leaked to system logs through misconfiguration.

* gnu/services/databases.scm (%postgresql-role-runtime-dir): New
variable.
(postgresql-create-roles): Rework the way passwords are set to avoid
leaking them through subshells and command lines.
(%postgresql-role-file-systems): New variable.
(postgresql-role-service-type): Add file-system-service-type extension
point.

Change-Id: I52406d1d24f5d163081b5c21d3e1760fc0b67a1e
2026-02-11 10:57:06 +01:00
..
2025-12-03 14:38:09 +09:00
2025-12-03 14:38:09 +09:00
2025-12-03 14:38:09 +09:00
2026-01-06 22:00:50 +09:00
2025-11-16 10:21:52 -08:00
2025-09-21 19:20:19 +02:00
2026-01-27 11:46:03 +01:00
2026-02-08 23:53:58 +01:00