nixpkgs/nixos/modules/services/databases
emilylange 08c37ba899 nixos/lldap: set service UMask=0027 and StateDirectoryMode=0750
While `/var/lib/lldap` isn't technically accessible by unprivileged
users thanks to `DynamicUser=true`, a user might prefer and change it to
`DynamicUser=false`.

There is currently also a PR open that intends to make `DynamicUser`
configurable via module option.

As such, `jwt_secret_file`, if bootstrapped by the service start
procedure, might be rendered world-readable due to its permissions
(`0644/-rw-r--r--`) defaulting to the service's umask (`022`) and
`/var/lib/lldap` to `0755/drwxr-xr-x` due to `StateDirectoryMode=0755`.

This would usually be fixed by using `(umask 027; openssl ...)` instead
of just `openssl ...`.

However, it was found that another file (`users.db`), this time
bootstrapped by `lldap` itself, also had insufficient permissions
(`0644/-rw-r--r--`) inherited by the global umask and would be left
world-readable as well.

Due to this, we instead change the service's to `027`.

And to lower the impact for already bootstrapped files on existing
instances like `users.db`, set `StateDirectoryMode=0750`.
2024-03-11 17:34:29 +01:00
..
aerospike.nix nixos/aerospike: use NixOS option instead of custom script 2023-12-28 17:41:59 +01:00
cassandra.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
clickhouse.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
cockroachdb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
couchdb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
dgraph.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
dragonflydb.nix
etcd.nix nixos/etcd: fix etcd category from misc to databases 2024-01-26 16:40:11 -03:00
ferretdb.nix nixos/ferretdb: fix broken link to documentation 2023-10-23 16:48:31 +00:00
firebird.nix Merge pull request #267327 from bbenno/fix/nixos-firebird 2024-01-19 22:12:47 +01:00
foundationdb.md foundationdb: cleanup 2023-06-08 14:48:41 +03:00
foundationdb.nix nixos/manual: render module chapters with nixos-render-docs 2023-01-27 20:07:34 +01:00
hbase-standalone.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
influxdb.nix nixos/influxdb: restart on failure 2023-12-06 23:17:29 +01:00
influxdb2.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
lldap.nix nixos/lldap: set service UMask=0027 and StateDirectoryMode=0750 2024-03-11 17:34:29 +01:00
memcached.nix nixos/memcached: clarify behaviour of enableUnixSocket 2024-02-26 15:29:55 +01:00
monetdb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
mongodb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
mysql.nix nixos/mysql: Use notify service type for MySQL >= 8.0 2024-02-11 15:41:25 -08:00
neo4j.nix neo4j: 4.4.11 -> 5.9.0 2024-01-05 18:20:24 +01:00
openldap.nix nixos: fix a bunch of services missing dep on network-online.target 2024-01-19 00:11:34 -08:00
opentsdb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
pgbouncer.nix nixos/pgbouncer: fix openFirewall option 2024-02-15 21:42:27 +01:00
pgmanage.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
postgresql.md nixos/postgresql: take extraPlugins packageset from package option 2023-12-08 14:58:18 +01:00
postgresql.nix nixos/postgresql: drop ensurePermissions option 2024-02-12 21:10:33 +01:00
redis.nix Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption 2023-11-30 02:49:30 +01:00
rethinkdb.nix
surrealdb.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
tigerbeetle.md nixos/tigerbeetle: init module 2024-01-19 13:19:27 -08:00
tigerbeetle.nix nixos/tigerbeetle: init module 2024-01-19 13:19:27 -08:00
victoriametrics.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00