Pantheon Simplesamlphp Drupal Configuration
Pantheon Documentation
You can review the Pantheon documentation at https://pantheon.io/docs/shibboleth-sso. There's a few issues where the documentation seems to be incorrect, so it is as best used a fallback to this document.
Install simplesamlphp
You will need to do this step in a repository which exists in WSL (Windows Linux Shell) and not located on /mnt/.
-
Download the simplesamlphp library. Note that the Pantheon instructions don't seem to work to do this.
-
Create directory to put simplesamlphp.
-
Extract the simplesamlp archive.
-
Remove the tarball
-
Add the new files to git.
-
Commit the simplesamlphp files to the git repo
-
Add a symlink to your repository from /simplesaml to /private/simplesamlphp/www
-
Add the symlink to git.
-
Commit the simplesamlphp files to the git repo
Install certificates
- Copy the default-sp.crt, default-sp.key, and sso-signing.pem files from an existing repository to private/simplesamlphp/cert.
Editing configuration files
- config.php: This file exists in /private/simplesamlphp/config. Follow the Pantheon tutorial or copy a version from a working simplesamlp configuration. Ensure you edit the 'secretsalt' and 'auth.adminpassword'.
-
authsources.php: This file exists in /private/simplesamlphp/config. Replace the default-sp array with the following:
-
saml20-idp-remote.php: This file exists in /private/simplesamlphp/metadata. Follow the Pantheon tutorial or copy a version from a working simplesamlp configuration.
-
Update git with the file changes.
-
Commit the configuration files to the report.
Enable Shibboleth/SAML
-
Ensure your simplesaml is in the right place by going to
/simplesaml. For example, https://clerks.sog.unc.edu/simplesaml. You should see the "SimpleSAMLphp installation page". - Email Jan Tax (tax@unc.edu) that you need a new domain added to the sp.sog.unc.edu idp. He will need the domains you want to add.
-
Once Jan has informed the UNC SSO service about the new URLs, go to
/simplesaml/module.php/core/authenticate.php - Click on 'default-sp'. You should be redirected to the UNC SSO login page. If you get an error similar to "UNC-Chapel Hill Single Sign-On - Unable to Respond", it likely means something got entered wrong on Jan's end.
- You should be able to log in as normal through the UNC SSO page.
- You will land on the "SAML 2.0 SP Demo Example" page, which should have a breakdown of various information about your UNC account under the "Your Attributes" box.
Enable Simplesamlphp for Drupal
- Download the simplesamlphp_auth and externalauth modules for your version of Drupal. Add it to your repository and push your code to the server as you would with any module.
-
Edit your site's settings file (generally on Pantheon sites/default/settings.php) and add the following:
-
Push the new settings file up to your codebase. Note: When you add this change to your git repository, you probably will need to force adding the file.
- Enable simplesamlphp_auth (which should enable externalauth automatically).
- Navigate to the simplesamlphp_auth configuration page at /admin/config/people/simplesamlphp_auth
- Click on the "Local authentication" menu (admin/config/people/simplesamlphp_auth/local).
- Enable "Allow authentication with local Drupal accounts" and if desired, restrict to appropriate roles (ie administrators). Do not skip this step or you might white-screen your site!.
- Save the configuration and return to the main page.
- Check the box to activate authentication via SimpleSAMLphp
- Ensure that "default-sp" is set as the "Authentication source for this SP"
- Click the save configuration button.
- Click on "User info and syncing"
- You have choices as to what you put for the unique identifier for the user, their username, and their email. Generally I set them all to the same value, their email address. On the campus SSO system that is identified by urn:oid:0.9.2342.19200300.100.1.3.