From 471fa9156ce3ded857358b4fdad8426dde1f7480 Mon Sep 17 00:00:00 2001 From: Adam W Zheng Date: Thu, 7 Sep 2017 12:28:01 -0500 Subject: [PATCH 1/3] Add a CR between Shields and start of document --- 1.14.16/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1.14.16/README.md b/1.14.16/README.md index 580be5e..b3e1873 100644 --- a/1.14.16/README.md +++ b/1.14.16/README.md @@ -1,4 +1,5 @@ [![](https://images.microbadger.com/badges/version/venatorfox/simplesamlphp:1.14.16.svg)](https://microbadger.com/images/venatorfox/simplesamlphp:1.14.16 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/venatorfox/simplesamlphp:1.14.16.svg)](https://microbadger.com/images/venatorfox/simplesamlphp:1.14.16 "Get your own image badge on microbadger.com") [![Pulls on Docker Hub](https://img.shields.io/docker/pulls/venatorfox/simplesamlphp.svg)](https://hub.docker.com/r/venatorfox/simplesamlphp) [![Stars on Docker Hub](https://img.shields.io/docker/stars/venatorfox/simplesamlphp.svg)](https://hub.docker.com/r/venatorfox/simplesamlphp) [![GitHub Open Issues](https://img.shields.io/github/issues/Venator-Fox/docker-simplesamlphp.svg)](https://github.com/Venator-Fox/docker-simplesamlphp/issues) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + Supported tags and respective `Dockerfile` links - [`1.14.16`, `latest` (*1.14.16/Dockerfile*)](https://github.com/Venator-Fox/docker-simplesamlphp/blob/master/1.14.16/Dockerfile) From 17cd1873448958738cfea83f65028fb2df6f64ae Mon Sep 17 00:00:00 2001 From: Adam W Zheng Date: Thu, 7 Sep 2017 13:53:18 -0500 Subject: [PATCH 2/3] Add CONFIG_BASEURLPATH environment variable --- 1.14.15/install-simplesamlphp.sh | 6 +++++- 1.14.16/install-simplesamlphp.sh | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/1.14.15/install-simplesamlphp.sh b/1.14.15/install-simplesamlphp.sh index 95e3de1..6420200 100644 --- a/1.14.15/install-simplesamlphp.sh +++ b/1.14.15/install-simplesamlphp.sh @@ -4,6 +4,8 @@ DOCKER_REDIRECTLOGS=${DOCKER_REDIRECTLOGS:=false} +CONFIG_BASEURLPATH=${CONFIG_BASEURLPATH:=simplesaml/} + #This SSHA256 hash is '123' for the default password. CONFIG_AUTHADMINPASSWORD=${CONFIG_AUTHADMINPASSWORD:=\{SSHA256\}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw==} CONFIG_SECRETSALT=${CONFIG_SECRETSALT:=defaultsecretsalt} @@ -212,6 +214,8 @@ echo "TLS_REQCERT=$OPENLDAP_TLS_REQCERT" >> /etc/openldap/ldap.conf echo "[$0] Apply Configuration to config.php..." #Apply Configurations +sed -i "s|'baseurlpath' => 'simplesaml/'|'baseurlpath' => '$CONFIG_BASEURLPATH'|g" /var/simplesamlphp/config/config.php + sed -i "s|'auth.adminpassword' => '123'|'auth.adminpassword' => '$CONFIG_AUTHADMINPASSWORD'|g" /var/simplesamlphp/config/config.php sed -i "s|'secretsalt' => 'defaultsecretsalt'|'secretsalt' => '$CONFIG_SECRETSALT'|g" /var/simplesamlphp/config/config.php sed -i "s|'technicalcontact_name' => 'Administrator'|'technicalcontact_name' => '$CONFIG_TECHNICALCONTACT_NAME'|g" /var/simplesamlphp/config/config.php @@ -269,7 +273,7 @@ if [ "$CONFIG_STORETYPE" == "memcache" ]; then fi fi -chown php-fpm:php-fpm /var/simplesamlphp/log/ +chown php-fpm:php-fpm /var/simplesamlphp/log touch /var/simplesamlphp/config/.dockersetupdone diff --git a/1.14.16/install-simplesamlphp.sh b/1.14.16/install-simplesamlphp.sh index f982f7e..6420200 100644 --- a/1.14.16/install-simplesamlphp.sh +++ b/1.14.16/install-simplesamlphp.sh @@ -4,6 +4,8 @@ DOCKER_REDIRECTLOGS=${DOCKER_REDIRECTLOGS:=false} +CONFIG_BASEURLPATH=${CONFIG_BASEURLPATH:=simplesaml/} + #This SSHA256 hash is '123' for the default password. CONFIG_AUTHADMINPASSWORD=${CONFIG_AUTHADMINPASSWORD:=\{SSHA256\}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw==} CONFIG_SECRETSALT=${CONFIG_SECRETSALT:=defaultsecretsalt} @@ -212,6 +214,8 @@ echo "TLS_REQCERT=$OPENLDAP_TLS_REQCERT" >> /etc/openldap/ldap.conf echo "[$0] Apply Configuration to config.php..." #Apply Configurations +sed -i "s|'baseurlpath' => 'simplesaml/'|'baseurlpath' => '$CONFIG_BASEURLPATH'|g" /var/simplesamlphp/config/config.php + sed -i "s|'auth.adminpassword' => '123'|'auth.adminpassword' => '$CONFIG_AUTHADMINPASSWORD'|g" /var/simplesamlphp/config/config.php sed -i "s|'secretsalt' => 'defaultsecretsalt'|'secretsalt' => '$CONFIG_SECRETSALT'|g" /var/simplesamlphp/config/config.php sed -i "s|'technicalcontact_name' => 'Administrator'|'technicalcontact_name' => '$CONFIG_TECHNICALCONTACT_NAME'|g" /var/simplesamlphp/config/config.php From f799f9153aed5d4141a444918418b95b22c93c1f Mon Sep 17 00:00:00 2001 From: Adam W Zheng Date: Thu, 7 Sep 2017 14:08:33 -0500 Subject: [PATCH 3/3] Update documentation and examples for CONFIG_BASEURLPATH environment variable --- 1.14.15/README.md | 4 +++- 1.14.15/docker-compose.yml | 3 ++- 1.14.16/README.md | 6 ++++-- 1.14.16/docker-compose.yml | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/1.14.15/README.md b/1.14.15/README.md index afee509..7df3715 100644 --- a/1.14.15/README.md +++ b/1.14.15/README.md @@ -77,6 +77,7 @@ It is recommended to set them properly and not use default values. | Variable | Default Value | Description | | ------ | ------ | ------ | +| CONFIG_BASEURLPATH | simplesaml/ | If using SSL behind a proxy enter the base URL here, otherwise IdP metadata will use http://. Format is [(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/]. | | DOCKER_REDIRECTLOGS | false | Redirect logs written to the log file by SimpleSAMLphp to `/proc/1/fd/1`. This does not work yet due to permissions issues. If someone knows how to resolve this please let me know or contribute a fix to the Git repository. Thanks! | | CONFIG_AUTHADMINPASSWORD | SSHA256 hash of '123' | Plain text works as well. Use PWGen to generate a hash for this variable. Refer to [SimpleSAMLphp docs](https://simplesamlphp.org/docs/stable/simplesamlphp-install), installation guide section 7. | | CONFIG_SECRETSALT | defaultsecretsalt | Refer to [SimpleSAMLphp docs](https://simplesamlphp.org/docs/stable/simplesamlphp-install), installation guide section 7 if help is needed for generating one. | @@ -213,8 +214,9 @@ services: simplesamlphp: container_name: simplesamlphp - image: venatorfox/simplesamlphp + image: venatorfox/simplesamlphp:1.14.15 environment: + - CONFIG_BASEURLPATH=https://localhost/simplesaml/ # To login to this example setup, use 123 for the password. - CONFIG_AUTHADMINPASSWORD={SSHA256}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw== - CONFIG_SECRETSALT=exampleabcdefghijklmnopqrstuvwxy diff --git a/1.14.15/docker-compose.yml b/1.14.15/docker-compose.yml index 8815698..7693c3f 100644 --- a/1.14.15/docker-compose.yml +++ b/1.14.15/docker-compose.yml @@ -4,8 +4,9 @@ services: simplesamlphp: container_name: simplesamlphp - image: venatorfox/simplesamlphp + image: venatorfox/simplesamlphp:1.14.15 environment: + - CONFIG_BASEURLPATH=https://localhost/simplesaml/ # To login to this example setup, use 123 for the password. - CONFIG_AUTHADMINPASSWORD={SSHA256}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw== - CONFIG_SECRETSALT=exampleabcdefghijklmnopqrstuvwxy diff --git a/1.14.16/README.md b/1.14.16/README.md index b3e1873..a17f2b1 100644 --- a/1.14.16/README.md +++ b/1.14.16/README.md @@ -77,6 +77,7 @@ It is recommended to set them properly and not use default values. | Variable | Default Value | Description | | ------ | ------ | ------ | +| CONFIG_BASEURLPATH | simplesaml/ | If using SSL behind a proxy enter the base URL here, otherwise IdP metadata will use http://. Format is [(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/]. | | DOCKER_REDIRECTLOGS | false | Redirect logs written to the log file by SimpleSAMLphp to `/proc/1/fd/1`. This does not work yet due to permissions issues. If someone knows how to resolve this please let me know or contribute a fix to the Git repository. Thanks! | | CONFIG_AUTHADMINPASSWORD | SSHA256 hash of '123' | Plain text works as well. Use PWGen to generate a hash for this variable. Refer to [SimpleSAMLphp docs](https://simplesamlphp.org/docs/stable/simplesamlphp-install), installation guide section 7. | | CONFIG_SECRETSALT | defaultsecretsalt | Refer to [SimpleSAMLphp docs](https://simplesamlphp.org/docs/stable/simplesamlphp-install), installation guide section 7 if help is needed for generating one. | @@ -213,8 +214,9 @@ services: simplesamlphp: container_name: simplesamlphp - image: venatorfox/simplesamlphp + image: venatorfox/simplesamlphp:1.14.16 environment: + - CONFIG_BASEURLPATH=https://localhost/simplesaml/ # To login to this example setup, use 123 for the password. - CONFIG_AUTHADMINPASSWORD={SSHA256}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw== - CONFIG_SECRETSALT=exampleabcdefghijklmnopqrstuvwxy @@ -272,7 +274,7 @@ services: simplesamlphp-haproxy: container_name: simplesamlphp-haproxy - image: million12/haproxy:1.7.8 + image: million12/haproxy:1.7.9 depends_on: - simplesamlphp links: diff --git a/1.14.16/docker-compose.yml b/1.14.16/docker-compose.yml index 3480082..c970ce8 100644 --- a/1.14.16/docker-compose.yml +++ b/1.14.16/docker-compose.yml @@ -6,6 +6,7 @@ services: container_name: simplesamlphp image: venatorfox/simplesamlphp:1.14.16 environment: + - CONFIG_BASEURLPATH=https://localhost/simplesaml/ # To login to this example setup, use 123 for the password. - CONFIG_AUTHADMINPASSWORD={SSHA256}MjJSiMlkQLa+fqI+CmQ1x1oUJ7OGucYpznKxBBHpgfC+Oh+7B9vgGw== - CONFIG_SECRETSALT=exampleabcdefghijklmnopqrstuvwxy