From 2516c3f7091b081c89d7db98a4581cad38cfee67 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:32:46 -0600 Subject: [PATCH] remove hard requirement on ADMIN_PASS and use the SSP default of 123 which triggers a runtime error message only if the admin page is actually used --- docker-compose.yml | 5 ----- dockerbuild/config/config.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 05bca64..f65409a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,7 +39,6 @@ services: MYSQL_USER: silauth MYSQL_PASSWORD: silauth PROFILE_URL_FOR_TESTS: http://pwmanager.local/module.php/core/authenticate.php?as=ssp-hub - ADMIN_PASS: b SECRET_SALT: abc123 IDP_NAME: x volumes: @@ -282,7 +281,6 @@ services: - "8081:80" environment: ADMIN_EMAIL: "john_doe@there.com" - ADMIN_PASS: "sp1" IDP_NAME: "NA" SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJz1" SECURE_COOKIE: "false" @@ -305,7 +303,6 @@ services: - "8082:80" environment: ADMIN_EMAIL: "john_doe@there.com" - ADMIN_PASS: "sp2" IDP_NAME: "NA" SECRET_SALT: "h57fjemb&dn^nsJFGNjweJz2" SECURE_COOKIE: "false" @@ -330,7 +327,6 @@ services: - local.env environment: ADMIN_EMAIL: "john_doe@there.com" - ADMIN_PASS: sp3 IDP_NAME: "NA" SECRET_SALT: h57fjemb&dn^nsJFGNjweJz3 SECURE_COOKIE: "false" @@ -351,7 +347,6 @@ services: - ./development/sp-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php environment: ADMIN_EMAIL: "john_doe@there.com" - ADMIN_PASS: sp1 IDP_NAME: THIS VARIABLE IS REQUIRED BUT PROBABLY NOT USED SECRET_SALT: NOT-a-secret-k49fjfkw73hjf9t87wjiw SECURE_COOKIE: "false" diff --git a/dockerbuild/config/config.php b/dockerbuild/config/config.php index db551f8..d8e6ded 100644 --- a/dockerbuild/config/config.php +++ b/dockerbuild/config/config.php @@ -27,7 +27,6 @@ try { // Required to be defined in environment variables - $ADMIN_PASS = Env::requireEnv('ADMIN_PASS'); $SECRET_SALT = Env::requireEnv('SECRET_SALT'); $IDP_NAME = Env::requireEnv('IDP_NAME'); } catch (EnvVarNotFoundException $e) { @@ -47,6 +46,7 @@ // Defaults provided if not defined in environment $IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME); $BASE_URL_PATH = Env::get('BASE_URL_PATH', '/'); +$ADMIN_PASS = Env::get('ADMIN_PASS', '123'); $ADMIN_EMAIL = Env::get('ADMIN_EMAIL', 'na@example.org'); $ADMIN_NAME = Env::get('ADMIN_NAME', 'SAML Admin'); $SHOW_SAML_ERRORS = Env::get('SHOW_SAML_ERRORS', false);