Skip to content

Commit

Permalink
Remove more SAML-related code, documentation, and environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
forevermatt committed Dec 11, 2024
1 parent 4016f3f commit 1faf704
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 1,390 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ RUN mkdir -p /data/public/
# Make sure the Apache config is valid
RUN ["apache2ctl", "configtest"]

# Copy the SimpleSAMLphp configuration files to a temporary location
COPY build/ssp-overrides /tmp/ssp-overrides

# Put in place the script to be used by child Docker images to install Composer
# dependencies and move the SSP overrides into place.
# dependencies.
COPY build/install-deps-and-ssp-overrides.sh /tmp
RUN chmod +x /tmp/install-deps-and-ssp-overrides.sh

Expand Down
24 changes: 7 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,18 @@ This website is available as a Docker image here:
<https://hub.docker.com/r/silintl/developer-portal/>

We recommend using that as the `FROM` in your own Dockerfile in your own
private repo, where you would `COPY` into your own Docker image the files needed
by SimpleSAMLphp (if using SAML logins), your own
`/data/public/img/logos/site-logo.png`, etc.
private repo, where you would `COPY` into your own Docker image any custom files
you need (e.g. your own `/data/public/img/logos/site-logo.png`, etc.).

Your Dockerfile should (in this order)...

1. Put any custom SAML files into `/tmp/ssp-overrides`.
2. Run the `/tmp/install-deps-and-ssp-overrides.sh`, since it will move the SAML
files into the SimpleSAMLphp folders within the `vendor` folder after
installing composer dependencies.
Your Dockerfile should also run `/tmp/install-deps-and-ssp-overrides.sh`, since
that is what installs the necessary composer dependencies.

### Example Dockerfile using this as the FROM ###

# Change 4.1.6 to the latest tagged version or whichever you want to have
FROM silintl/developer-portal:4.1.6

ENV REFRESHED_AT 2021-04-08

# Put in place any additional custom SAML files:
COPY build/ssp-overrides /tmp/ssp-overrides
# Change 5.0.0 to the latest tagged version or whichever you want to have
FROM silintl/developer-portal:5.0.0

# Put dependencies and SSP overrides in their final location
# Install dependencies
RUN /tmp/install-deps-and-ssp-overrides.sh

# Copy in any custom files needed, which are stored in this repo.
Expand Down
4 changes: 0 additions & 4 deletions action-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,4 @@ services:
APIAXLE_SECRET: developer-portal-dev-secret
APIAXLE_SSL_VERIFYPEER: 'false'
GOOGLE_OAUTH_ENABLED: 'false'
SAML_ENTITY_ID: http://developer-portal.local/simplesaml/module.php/saml/sp/metadata.php/default-sp
SAML_ADMIN_PASSWORD: dummy-for-tests-q6.eYWtfLF-BTQXf-OktD5lVFCOFyC4B
SAML_SECRET_SALT: dummy-for-tests-Ac4MTgO9UJ6_wpXXKc6EGU_.gWNNkdMe
SAML_IDP: NONE
working_dir: /data
5 changes: 0 additions & 5 deletions application/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@
"phake/phake": "^3.1",
"phpunit/phpunit": "^9.0",
"roave/security-advisories": "dev-master"
},
"config": {
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
}
}
5 changes: 0 additions & 5 deletions application/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ cd /data
echo "Installing dev dependencies..."
runny composer install --no-scripts --no-interaction

mkdir -p -v /data/vendor/simplesamlphp/simplesamlphp/cert
cp /tmp/ssp-overrides/cert/* /data/vendor/simplesamlphp/simplesamlphp/cert
cp /tmp/ssp-overrides/config/* /data/vendor/simplesamlphp/simplesamlphp/config
cp /tmp/ssp-overrides/metadata/* /data/vendor/simplesamlphp/simplesamlphp/metadata

# Run database migrations
echo -e "Waiting for db to run migrations...\n\n"
START=`date +%s`
Expand Down
8 changes: 2 additions & 6 deletions build/install-deps-and-ssp-overrides.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ set -e
cd /data
composer install --no-dev --no-progress --no-scripts --optimize-autoloader --no-interaction

# Copy the SSP override files into place
mkdir -p -v /data/vendor/simplesamlphp/simplesamlphp/cert
find /tmp/ssp-overrides/ -path '/tmp/ssp-overrides/cert/*' -exec cp {} /data/vendor/simplesamlphp/simplesamlphp/cert \;
cp /tmp/ssp-overrides/config/* /data/vendor/simplesamlphp/simplesamlphp/config
cp /tmp/ssp-overrides/metadata/* /data/vendor/simplesamlphp/simplesamlphp/metadata
rm -rf /tmp/ssp-overrides
# Note: Copying the SSP override files into place is no longer relevant, since
# we no longer support SAML as a login option for the Developer Portal.
59 changes: 0 additions & 59 deletions build/ssp-overrides/config/authsources.php

This file was deleted.

Loading

0 comments on commit 1faf704

Please sign in to comment.