Add SAML authentication to any ProcessWire website

ProcessWire-SAMLAuth

Add SAML authentication to any ProcessWire website

Installation

Before you even attempt to install this module you must have knowledge of SAML, without this you will have slim chance of getting this to work.

1. To install just unzip into the modules directory

2. use the example settings files in the lib directory to make the advanced_settings.php and settings.php files.

3. Make sure that your IDP is sending the email address of users as the mail attribute.

4. Add the SP to your IDP metadata, see the section below on SP URL's

5. Enable the module and try logging in, instead of the ProcessWire login form you should be redirected to the IDP to authenticate, and with any luck it should redirect back to the admin dashboard upon successful authentication.

Because users are matched up by email address you must have a user already setup in processwire with an email that matches an account on your IDP.

This will not make new accounts for security reasons.

This is bassed on the awesome OneLogin php saml toolkit and should be pretty simple to configure.

SP URL's

This module will act as a SP, and as such you will need to add it to your IDP metadata. This module adds the following URL's which you will need to do this

http://(ProcessWireSite)/saml/acs.php for the Assertion Consumer Service

http://(ProcessWireSite)/saml/metadata.php for the SP's metadata

http://(ProcessWireSite)/saml/sls.php for the Single Logout Service

Below is an example for people who use SimpleSAMLphp (this would go in saml20-sp-remote.php)

  $metadata['http://192.168.0.62/pwtheme/saml/metadata.php'] = array(
    'AssertionConsumerService' => 'http://192.168.0.62/pwtheme/saml/acs.php',
    'SingleLogoutService' => 'http://192.168.0.62/pwtheme/saml/sls.php',
  );

That ProcessWire site is installed in the pwtheme subdirectory on my test server just for context.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #519
    In the 519th issue of ProcessWire Weekly we'll check out a new third party module called RockForms, introduce the latest ProcessWire core updates, and more. Read on!
    Weekly.pw / 20 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH