Skip to content

Commit

Permalink
Merge pull request #227 from silinternational/feature/ssp-2-config
Browse files Browse the repository at this point in the history
update config.php using the SSP 2.2 config.php.dist
  • Loading branch information
briskt authored Jun 18, 2024
2 parents ca8c0de + a8d2d52 commit 65daf43
Show file tree
Hide file tree
Showing 21 changed files with 248 additions and 6,212 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ RUN chmod a+x /data/run.sh /data/run-tests.sh
ADD https://github.com/silinternational/config-shim/releases/latest/download/config-shim.gz config-shim.gz
RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin

# Set permissions for cache directory. Corresponds to the `cachedir` setting in config.php.
RUN mkdir /data/cache
RUN chown -R www-data:www-data /data/cache

EXPOSE 80
ENTRYPOINT ["/usr/local/bin/s3-expand"]
CMD ["/data/run.sh"]
18 changes: 7 additions & 11 deletions actions-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ services:
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJ"
IDP_NAME: "Hub"
SECURE_COOKIE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"
SHOW_SAML_ERRORS: "true"
THEME_COLOR_SCHEME: "orange-light_blue"
HUB_MODE: "true"
Expand All @@ -84,8 +83,8 @@ services:

# Utilize custom configs
- ./development/idp-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/idp-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/announcement.php:/data/vendor/simplesamlphp/simplesamlphp/announcement/announcement.php
- ./development/enable-exampleauth.sh:/data/enable-exampleauth.sh

# Utilize custom metadata
- ./development/idp-local/metadata/saml20-idp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-hosted.php
Expand All @@ -101,6 +100,7 @@ services:
- ./features:/data/features
command: >
bash -c "whenavail db 3306 60 /data/vendor/simplesamlphp/simplesamlphp/modules/silauth/src/Auth/Source/yii migrate --interactive=0 &&
/data/enable-exampleauth.sh &&
/data/run.sh"
environment:
ADMIN_PASS: "a"
Expand Down Expand Up @@ -131,7 +131,7 @@ services:

# Utilize custom configs
- ./development/idp2-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/idp2-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/enable-exampleauth.sh:/data/enable-exampleauth.sh

# Utilize custom metadata
- ./development/idp2-local/metadata/saml20-idp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-hosted.php
Expand All @@ -140,6 +140,7 @@ services:
# Customized SSP code -- TODO: make a better solution that doesn't require hacking SSP code
- ./development/UserPass.php:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/src/Auth/Source/UserPass.php

command: bash -c "/data/enable-exampleauth.sh && /data/run.sh"
environment:
ADMIN_PASS: "b"
SECRET_SALT: "h57fjemb&dn^nsJFGNjweJ"
Expand All @@ -155,7 +156,6 @@ services:

# Utilize custom configs
- ./development/idp3-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/idp3-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php

# Utilize custom metadata
- ./development/idp3-local/metadata/saml20-idp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-hosted.php
Expand All @@ -175,7 +175,6 @@ services:
- ./development/sp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert

# Utilize custom configs
- ./development/sp-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/sp-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php

# Utilize custom metadata
Expand All @@ -185,11 +184,11 @@ services:
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh
environment:
ADMIN_PASS: "sp1"
IDP_NAME: "NA"
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJz1"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"

ssp-sp2.local:
build: .
Expand All @@ -198,19 +197,18 @@ services:
- ./development/sp2-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert

# Utilize custom configs
- ./development/sp2-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/sp2-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php

# Utilize custom metadata
- ./development/sp2-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php

environment:
ADMIN_PASS: sp2
IDP_NAME: "NA"
SECRET_SALT: h57fjemb&dn^nsJFGNjweJz2
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"

ssp-sp3.local:
build: .
Expand All @@ -219,19 +217,18 @@ services:
- ./development/sp3-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert

# Utilize custom configs
- ./development/sp3-local/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/sp3-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php

# Utilize custom metadata
- ./development/sp3-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php

environment:
ADMIN_PASS: sp3
IDP_NAME: "NA"
SECRET_SALT: h57fjemb&dn^nsJFGNjweJz3
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"


pwmanager.local:
Expand All @@ -252,7 +249,6 @@ services:
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"

# the broker and brokerDb containers are used by the silauth module
broker:
Expand Down
3 changes: 3 additions & 0 deletions development/enable-exampleauth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

sed -i 's@^\( *'\''module\.enable'\'' => \[\)@\1'\''\n exampleauth'\'' => true,@' vendor/simplesamlphp/simplesamlphp/config/config.php
Loading

0 comments on commit 65daf43

Please sign in to comment.