Skip to content

SSO with Shibboleth

This guide covers the configuration of Single Sign-On (SSO) authentication for rConfig V8 using Shibboleth, a SAML 2.0 based identity provider commonly used in educational institutions. The process involves configuring your Shibboleth IdP and uploading SAML metadata to rConfig.

Shibboleth is not a separate protocol. It is a SAML 2.0 Identity Provider. In rConfig, Shibboleth uses the same underlying SAML2 implementation. The distinction is UI-level only (separate login button).

  • Shibboleth Identity Provider already configured and operational
  • Administrator access to Shibboleth IdP
  • Administrator access to rConfig V8
  • rConfig server accessible via HTTPS with valid domain name
  • SAML metadata XML file from your Shibboleth IdP

Configure Shibboleth to recognize rConfig as a Service Provider (SP). This process varies by institution but generally involves:

  1. Registering rConfig as a new Service Provider
  2. Configuring attribute release policies
  3. Generating SAML metadata for rConfig

Helpful Resource:

Harvard University provides an excellent guide for SAML/Shibboleth integration: Harvard IAM - SAML Shibboleth Integration

Download the metadata.xml file from your Shibboleth Identity Provider. This is IdP metadata, which rConfig consumes to authenticate users. The Service Provider (SP) metadata is generated separately by rConfig (see the next section).

Upload your metadata.xml file to the rConfig SAML directory:

Terminal window
# Create SAML directory if it doesn't exist
mkdir -p /var/www/html/rconfig8/current/storage/saml2
# Upload your metadata.xml to this location
/var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml

rConfig exposes its Service Provider (SP) metadata at:

https://your-rconfig-domain.com/auth/saml2/metadata

Provide this URL to your Identity Provider administrator. This is the metadata your IdP needs to trust rConfig as a Service Provider.

Note: The metadata file referenced by SAML2_METADATA_FILE is IdP metadata consumed by rConfig. The /auth/saml2/metadata endpoint is SP metadata generated by rConfig.

Open the rConfig .env file:

Terminal window
vim /var/www/html/rconfig8/current/.env

Add or update the following lines:

Terminal window
SAML2_METADATA_FILE='/var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml'
SAML2_ENABLED=false
SHIBBOLETH_ENABLED=true
SAML2_SP_CERTIFICATE='/var/www/html/rconfig8/current/storage/saml2/sp-cert.pem'
SAML2_SP_KEY='/var/www/html/rconfig8/current/storage/saml2/sp-key.pem'

Configuration Parameters:

  • SAML2_METADATA_FILE: Local file path to IdP metadata XML. This is required in V8.2.0+.
  • SAML2_ENABLED: Toggle the generic SAML2 login button independently.
  • SHIBBOLETH_ENABLED: Toggle the Shibboleth login button independently.
  • SAML2_SP_CERTIFICATE: Path to Service Provider certificate
  • SAML2_SP_KEY: Path to Service Provider private key
  • Old:
Terminal window
SAML2_METADATA_URL=https://idp.example.com/metadata
  • New:
Terminal window
SAML2_METADATA_FILE=/path/to/idp-metadata.xml

Migration command:

Terminal window
curl https://idp.example.com/metadata > /path/to/idp-metadata.xml

After migration, verify the web server user can read the file.

The ACS URL MUST match exactly between rConfig and your IdP:

https://your-rconfig-domain.com/auth/callback/saml2

This includes:

  • HTTPS vs HTTP
  • no trailing slashes
  • exact path

Mismatches will cause authentication failures.

Most Identity Providers use HTTP-POST binding for SAML responses.

rConfig supports both GET and POST callbacks, but POST is the most common.

Ensure your IdP is configured to POST assertions to the ACS URL.

Single Logout (SLS) support depends on your Identity Provider. If logout issues occur, it is safe to leave SLS unconfigured.

Save the file and clear the rConfig cache:

Terminal window
php /var/www/html/rconfig8/current/artisan rconfig:clear-all

After configuration, the rConfig login page will display a Login with Shibboleth button.

Shibboleth SSO Login Button

When users attempt to sign in via SSO for the first time:

  1. User authenticates successfully with Shibboleth
  2. User account is created in rConfig with SSO access disabled
  3. User sees an error message indicating approval is required

Administrator must:

  1. Log in to rConfig as an administrator
  2. Navigate to Users section
  3. Locate the new SSO user
  4. Enable SSO access for the user
  5. Assign appropriate role and permissions

After approval, the user can successfully authenticate and access rConfig.

  • Verify all environment variables are correctly set
  • Ensure cache has been cleared: php artisan rconfig:clear-all
  • Check that the metadata file exists at SAML2_METADATA_FILE
  • Check file permissions on metadata.xml (should be readable by web server)
  • Verify SAML2_METADATA_FILE points to the file path you uploaded
  • Metadata file must contain raw XML
  • Metadata must NOT be: - HTML login page - redirected content - copied URL text
  • Validate XML content and ensure the first non-whitespace character is <
  • Example:
Terminal window
head /var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml
Expected output starts with:
<EntityDescriptor
  • Verify metadata.xml contains correct Shibboleth IdP configuration
  • Check that Service Provider certificate and private key exist
  • Confirm Shibboleth IdP has rConfig registered as a valid Service Provider
  • Review Apache error logs for SAML-related errors
  • Confirm the IdP ACS URL is exactly https://your-rconfig-domain.com/auth/callback/saml2
  • Check scheme (https), path, and trailing slash behavior
  • Any mismatch can break SAML assertion delivery or validation

If rConfig is behind a load balancer or reverse proxy:

  • Ensure APP_URL is set correctly (https)
  • Ensure trusted proxies are configured

Incorrect scheme detection can break SAML validation.

  • Verify certificate and private key paths are correct in .env
  • Check file permissions (readable by web server user)
  • Ensure certificate and key files are valid and not expired
  • Verify Shibboleth IdP is configured to release required attributes (email, name)
  • Check attribute mapping configuration in Shibboleth
  • Review Shibboleth IdP logs for attribute release errors
  • Verify administrator has enabled SSO access in Users section
  • Confirm user has been assigned an appropriate role
  • Check user account status is active

SAML assertions are time-sensitive.

Ensure your rConfig server and Identity Provider are time-synchronised (NTP).

Clock drift can cause valid logins to fail with authentication or validation errors.

Always keep IdP metadata local and referenced through SAML2_METADATA_FILE. Do not expose metadata files in a public web directory.