SAML Single Sign-On (SSO) into Drupal using FusionAuth as IdP
Overview
The Drupal SAML integration using the miniOrange SAML SP module establishes seamless SSO between FusionAuth and the Drupal site. The users will be able to log in to the Drupal site using their FusionAuth credentials. This document will walk you through the steps to configure Single Sign-On - SSO between Drupal as a Service Provider (SP) and FusionAuth as an Identity Provider (IdP). The module is compatible with with Drupal 7, Drupal 8, Drupal 9, Drupal 10 and Drupal 11.
Installation Steps
- Using Composer
- Using Drush
- Manual Installation
Configuration Steps
Drupal SAML SP Metadata
- Go to Configuration → People → SAML Login Configuration in the Administration menu. (/admin/config/people/miniorange_saml/idp_setup)
- Navigate to the Service Provider Metadata and download the metadata. (This is required in configuring the FusionAuth as a SAML IdP)
Configure SAML Single Sign-On Application in FusionAuth
- Log in to FusionAuth and navigate to Applications Your Application SAML.
- Give a name to your application in Name field.
- Under SAML Settings, check the Enabled checkbox and upload the downloaded metadata from drupal.
- You can either select an existing Signing key here or select the first option to have FusionAuth generate a key pair to use.
- Save your Configuration.
- Now under Applications, click on the view icon of the App you just created.
- Under the heading SAML v2 Integration details, you will see all of the SAML endpoint URLs that the Service Provider (Drupal) will need.
- Copy the Metadata URL and keep it handy. (It will be needed for configuring Drupal as SP.)
Configure Drupal as Service Provider:
- Navigate to the Service Provider Setup tab of the Drupal site and click on Upload IDP Metadata..
- Paste the previously copied Metadata Url (from FusionAuth) into the Upload Metadata URL text field.
- Click on the Fetch Metadata button.
- Click on the Test link to test the connection between Drupal and FusionAuth.
- In the test configuration window, a success message with SAML response attributes will appear if the configurations are correct; otherwise, error messages with additional troubleshooting instructions will appear. Click on Done.
Congratulations! You have successfully configured FusionAuth as an Identity Provider and Drupal as a Service Provider.
How does SAML SSO login work?
- Open a new browser/private window and navigate to the Drupal site login page.
- Click the Login using Identity Provider (FusionAuth) link.
- You will be redirected to the FusionAuth login page. Enter the FusionAuth credentials. After successful authentication, the user will be redirected back to the Drupal site.