Resources

Testing and completing SimpleSAMLphp setup

The information on this documentation page is part of the SimpleSAMLphp installation process.

After you define and configure your IdP, you must test your connection and configure the simpleSAMLphp Authentication Drupal module to complete SimpleSAMLphp setup.

Testing your connection

To test your SimpleSAMLphp connection after defining and configuring your IdP:

  1. Visit http://[example.com]/simplesaml/ in a web browser, replacing [example.com] with the domain name of your website.

  2. In the SimpleSAMLphp interface page that appears, click Authentication.

  3. Click Test authentication sources.

  4. Click the source to select it. This value defaults to default-sp unless you have configured another value in authsources.php.

If SimpleSAMLphp connects and authenticates, it redirects you to a page displaying the list of attributes returned by your IdP. You will need these attributes to configure the simpleSAMLphp Authentication Drupal module.

Configuring the Drupal module

After successfully testing your connection, you must configure the simpleSAMLphp Authentication Drupal module by completing the following steps.

  1. Add the simpleSAMLphp Authentication module to your codebase, if you haven’t done so already.

  2. Ensure you have added the $conf variable to settings.php (for Cloud Platform) or to a Factory settings.php hook (for Site Factory) as described in Installing the SimpleSAMLphp library.

  3. Sign in to your Drupal website as a user with the Administrator role.

  4. Navigate to http://[example.com]/admin/modules, where [example.com] is your website’s URL, and enable the simpleSAMLphp Authentication module.

  5. Navigate to http://[example.com]/admin/config/people/simplesamlphp_auth/, where [example.com] is your website’s URL, and confirm the $conf variable has pre-populated the installation directory.

  6. Add the attributes returned from the IdP when testing your connection in the User Info and Syncing fieldset to map to user name, unique identifier, and email address.

  7. Click Save Configuration.

  8. In the administrative menu, click Configuration > People > SimpleSAMLphp Auth Settings.

  9. Scroll to Basic settings, select the checkbox for Activate authentication via SimpleSAMLphp, and then save your changes.

  10. Navigate to the SimpleSAMLphp login page at http://[example.com]/saml_login. SimpleSAMLphp redirects the user to the IdP. Sign in with a username and password.

SimpleSAMLphp authenticates the username and password, and signs the user in to your Drupal website.

If the sign-in is successful, single sign-on is now enabled for your website!

External tools for testing

  • The SAML-tracer extension for Firefox is a tool for viewing SAML messages sent through a browser during single sign-on.

  • SAMLtest.id is a free SAML testing service.