We recently evaluated Zenbership — an interesting open source membership management system — for one of our clients. One requirement was that it could be easily integrated into their current infrastructure. Members registered in the new membership management system should be able to login into their community websites (wikis etc.) with the same credentials. The client was already using SAML (Security Assertion Markup Language — an XML-based data format for exchanging authentication and authorization data) for authentication. To make the connection between Zenbership and their existing sites we developed a quick authentication module for SimpleSAMLphp. The module uses the Zenbership member database to check the username and password:

Installation:

Setup Zenbership

Install SimpleSAMLphp

Install SimpleSAMLphp and follow the SimpleSAMLphp instructions to set it up as an identity provider (SimpleSAMLphp Identity Provider QuickStart)

Add ZenbershipAuth Module

Create new directory zenbershipauth under the modules directory (simplesaml/modules/zenbershipauth) and copy the files from our ZenbershipAuth GitHub repository to it.

Configure Authentication Source

Edit the configuration file for authentication sources simplesaml/config/authsources.php and add:

Replace the placeholders with your MySQL host, username, password, database name, and salt.

Set Authentication Source in Metadata File

Edit the metadata file for the hosted SAML 2.0 IdP simplesaml/metadata/saml20-idp-hosted.php and set zenbershipauthinstance as your authentication source:

Categories: PHPSSOZenbership