aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/postgres
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-01-01 18:47:34 +0000
committerAlex <alex@adnab.me>2023-01-01 18:47:34 +0000
commit3847c081817d93e75ec9ef8d53d2961e13df74c3 (patch)
treebd820bfda887f355fe1e56f8a1418c9353c59eb2 /cluster/prod/app/postgres
parentad6db2f1c502898e92fe377510dcf58b2d5ce6c9 (diff)
parent0d8c6a2d45c7b6bbb86f2d4268423578f0995894 (diff)
downloadnixcfg-3847c081817d93e75ec9ef8d53d2961e13df74c3.tar.gz
nixcfg-3847c081817d93e75ec9ef8d53d2961e13df74c3.zip
Merge pull request 'updated version of secretmgr' (#5) from new-secretmgr into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/nixcfg/pulls/5
Diffstat (limited to 'cluster/prod/app/postgres')
-rw-r--r--cluster/prod/app/postgres/secrets.toml10
-rw-r--r--cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd1
-rw-r--r--cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username1
-rw-r--r--cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd1
4 files changed, 10 insertions, 3 deletions
diff --git a/cluster/prod/app/postgres/secrets.toml b/cluster/prod/app/postgres/secrets.toml
new file mode 100644
index 0000000..537a72d
--- /dev/null
+++ b/cluster/prod/app/postgres/secrets.toml
@@ -0,0 +1,10 @@
+[service_users."replicator"]
+password_secret = "postgres/keeper/pg_repl_pwd"
+username_secret = "postgres/keeper/pg_repl_username"
+
+
+[secrets."postgres/keeper/pg_su_pwd"]
+type = 'command'
+command = 'openssl rand -base64 15'
+description = 'postgres superuser password'
+
diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd
deleted file mode 100644
index ae0c229..0000000
--- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd
+++ /dev/null
@@ -1 +0,0 @@
-SERVICE_PASSWORD replicator
diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username
deleted file mode 100644
index 58e6e46..0000000
--- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username
+++ /dev/null
@@ -1 +0,0 @@
-CONST replicator
diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd
deleted file mode 100644
index 907e2b8..0000000
--- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd
+++ /dev/null
@@ -1 +0,0 @@
-USER postgres superuser password