From 205fba0a1054f3708c34e9135efa85507b4193b8 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 30 Mar 2024 22:56:01 +0100 Subject: [PATCH] rebase secrets --- .../bekkalokk/services/idp-simplesamlphp/config.php | 12 ++++++------ .../bekkalokk/services/idp-simplesamlphp/default.nix | 1 - hosts/bekkalokk/services/mediawiki/default.nix | 1 - .../services/mediawiki/simplesaml-config.php | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/hosts/bekkalokk/services/idp-simplesamlphp/config.php b/hosts/bekkalokk/services/idp-simplesamlphp/config.php index ea856f5..09f3c2f 100644 --- a/hosts/bekkalokk/services/idp-simplesamlphp/config.php +++ b/hosts/bekkalokk/services/idp-simplesamlphp/config.php @@ -476,13 +476,13 @@ $config = [ * Ensure that you have the required PDO database driver installed * for your connection string. */ - 'database.dsn' => 'postgres:host=bicep.pvv.ntnu.no;dbname=idp', + 'database.dsn' => $SAML_DATABASE_DSN, /* * SQL database credentials */ - 'database.username' => 'idp', - 'database.password' => 'secret', + 'database.username' => $SAML_DATABASE_USERNAME, + 'database.password' => $SAML_DATABASE_PASSWORD, 'database.options' => [], /* @@ -1195,13 +1195,13 @@ $config = [ * See http://www.php.net/manual/en/pdo.drivers.php for the various * syntaxes. */ - 'store.sql.dsn' => 'sqlite:$STATE_DIRECTORY/simplesamlphp.sqlite3', + 'store.sql.dsn' => $SAML_DATABASE_DSN, /* * The username and password to use when connecting to the database. */ - 'store.sql.username' => null, - 'store.sql.password' => null, + 'store.sql.username' => $SAML_DATABASE_USERNAME, + 'store.sql.password' => $SAML_DATABASE_PASSWORD, /* * The prefix we should use on our tables. diff --git a/hosts/bekkalokk/services/idp-simplesamlphp/default.nix b/hosts/bekkalokk/services/idp-simplesamlphp/default.nix index bd752cf..d5359b8 100644 --- a/hosts/bekkalokk/services/idp-simplesamlphp/default.nix +++ b/hosts/bekkalokk/services/idp-simplesamlphp/default.nix @@ -93,7 +93,6 @@ let --replace '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=idp"' \ --replace '$SAML_DATABASE_USERNAME' '"idp"' \ --replace '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."idp/postgres_password".path}")' \ - --replace '$STATE_DIRECTORY' '/var/lib/idp' \ --replace '$CACHE_DIRECTORY' '/var/cache/idp' ''; diff --git a/hosts/bekkalokk/services/mediawiki/default.nix b/hosts/bekkalokk/services/mediawiki/default.nix index dc223a9..12ed3e7 100644 --- a/hosts/bekkalokk/services/mediawiki/default.nix +++ b/hosts/bekkalokk/services/mediawiki/default.nix @@ -26,7 +26,6 @@ --replace '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=mediawiki_simplesamlphp"' \ --replace '$SAML_DATABASE_USERNAME' '"mediawiki_simplesamlphp"' \ --replace '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/postgres_password".path}")' \ - --replace '$STATE_DIRECTORY' '/var/lib/mediawiki' \ --replace '$CACHE_DIRECTORY' '/var/cache/mediawiki/idp' ''; }; diff --git a/hosts/bekkalokk/services/mediawiki/simplesaml-config.php b/hosts/bekkalokk/services/mediawiki/simplesaml-config.php index aded087..2148899 100644 --- a/hosts/bekkalokk/services/mediawiki/simplesaml-config.php +++ b/hosts/bekkalokk/services/mediawiki/simplesaml-config.php @@ -1195,13 +1195,13 @@ $config = [ * See http://www.php.net/manual/en/pdo.drivers.php for the various * syntaxes. */ - 'store.sql.dsn' => 'sqlite:$STATE_DIRECTORY/simplesamlphp.sqlite3', + 'store.sql.dsn' => $SAML_DATABASE_DSN, /* * The username and password to use when connecting to the database. */ - 'store.sql.username' => null, - 'store.sql.password' => null, + 'store.sql.username' => $SAML_DATABASE_USERNAME, + 'store.sql.password' => $SAML_DATABASE_PASSWORD, /* * The prefix we should use on our tables.