Skip to content

SSO with SAML

This guide covers the configuration of Single Sign-On (SSO) authentication for rConfig V8 using any SAML 2.0 compliant Identity Provider. Use this guide when your IdP is not covered by the specific integration guides (Microsoft, Okta, Google, or Shibboleth).

  • SAML 2.0 compliant Identity Provider configured and operational
  • Administrator access to your Identity Provider
  • Administrator access to rConfig V8
  • rConfig server accessible via HTTPS with valid domain name
  • Ability to configure SAML Service Provider settings in your IdP

Your Identity Provider must support SAML 2.0 and be configured to release the following attributes:

Required Attributes:

  • Email address: User’s email (typically email, mail, or emailAddress)
  • Name: User’s display name (typically displayName, name, or cn)

Optional Attributes:

  • Given name: First name
  • Surname: Last name
  • User ID: Unique identifier

In your Identity Provider, create a new SAML 2.0 Service Provider (SP) application with the following details:

Entity ID / Audience:

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

Assertion Consumer Service (ACS) URL:

https://your-rconfig-domain.com/saml2/acs

Single Logout Service (SLS) URL:

https://your-rconfig-domain.com/saml2/sls

Name ID Format:

  • Use urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress or
  • Use urn:oasis:names:tc:SAML:2.0:nameid-format:persistent

Configure your IdP to release the following attributes to rConfig:

IdP AttributeSAML Attribute NameDescription
Email Addressemail or mailUser’s email address (required)
Display NamedisplayName or nameUser’s full name (required)
First NamegivenNameUser’s first name (optional)
Last Namesn or surnameUser’s last name (optional)

Download the SAML metadata XML file from your Identity Provider. This file typically contains:

  • IdP Entity ID
  • Single Sign-On Service URL
  • X.509 Certificate
  • Supported bindings and endpoints

Save this file as idp-metadata.xml.

Upload your IdP metadata 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 idp-metadata.xml to this location
/var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml

Set appropriate permissions:

Terminal window
chown -R apache:apache /var/www/html/rconfig8/current/storage/saml2 # Rocky/RHEL
# or
chown -R www-data:www-data /var/www/html/rconfig8/current/storage/saml2 # Ubuntu
chmod 755 /var/www/html/rconfig8/current/storage/saml2
chmod 644 /var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml

Step 2: Generate Service Provider Certificate

Section titled “Step 2: Generate Service Provider Certificate”

Generate a self-signed certificate for the SAML Service Provider:

Terminal window
# Generate private key
openssl genrsa -out /var/www/html/rconfig8/current/storage/saml2/sp-key.pem 2048
# Generate certificate (valid for 10 years)
openssl req -new -x509 -key /var/www/html/rconfig8/current/storage/saml2/sp-key.pem \
-out /var/www/html/rconfig8/current/storage/saml2/sp-cert.pem -days 3650

You’ll be prompted for certificate information. Fill in appropriate values:

Country Name (2 letter code) [XX]: US
State or Province Name (full name) []: California
Locality Name (eg, city) []: San Francisco
Organization Name (eg, company) []: Your Organization
Organizational Unit Name (eg, section) []: IT
Common Name (eg, your server's hostname) []: your-rconfig-domain.com
Email Address []: [email protected]

Set appropriate permissions:

Terminal window
chmod 600 /var/www/html/rconfig8/current/storage/saml2/sp-key.pem
chmod 644 /var/www/html/rconfig8/current/storage/saml2/sp-cert.pem

Open the rConfig .env file:

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

Add or update the following lines:

Terminal window
SAML2_IDP_METADATA_FILE='/var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml'
SAML2_SP_CERTIFICATE='/var/www/html/rconfig8/current/storage/saml2/sp-cert.pem'
SAML2_SP_PRIVATE_KEY='/var/www/html/rconfig8/current/storage/saml2/sp-key.pem'
SAML2_SP_ENTITY_ID='https://your-rconfig-domain.com/saml2/metadata'
SAML2_SP_ACS_URL='https://your-rconfig-domain.com/saml2/acs'
SAML2_SP_SLS_URL='https://your-rconfig-domain.com/saml2/sls'

Configuration Parameters:

  • SAML2_IDP_METADATA_FILE: Path to IdP metadata XML file
  • SAML2_SP_CERTIFICATE: Path to Service Provider certificate
  • SAML2_SP_PRIVATE_KEY: Path to Service Provider private key
  • SAML2_SP_ENTITY_ID: rConfig’s SAML Entity ID (must match IdP configuration)
  • SAML2_SP_ACS_URL: Assertion Consumer Service URL (must match IdP configuration)
  • SAML2_SP_SLS_URL: Single Logout Service URL

Save the file and clear the rConfig cache:

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

Some Identity Providers require Service Provider metadata. Generate and provide this to your IdP administrator:

Navigate to the following URL in your browser:

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

Save the XML content or provide this URL to your IdP administrator.

Terminal window
php /var/www/html/rconfig8/current/artisan saml2:generate-metadata > sp-metadata.xml

Provide this sp-metadata.xml file to your IdP administrator.

After configuration, the rConfig login page will display a Sign in with SAML button.

SAML SSO Login Button

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

  1. User authenticates successfully with your Identity Provider
  2. User account is created in rConfig with SSO access disabled
  3. User sees an error message indicating approval is required
SSO Approval 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 in .env
  • Ensure cache has been cleared: php artisan rconfig:clear-all
  • Check that IdP metadata file exists and is readable
  • Review Apache error logs for configuration errors
  • Verify file path is correct in SAML2_IDP_METADATA_FILE
  • Check file permissions (readable by web server)
  • Ensure metadata XML is valid (no corruption or syntax errors)
  • Test file accessibility: cat /var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml
  • Verify certificate and private key paths are correct in .env
  • Check file permissions (private key should be 600, certificate 644)
  • Ensure certificate and key were generated successfully
  • Validate certificate: openssl x509 -in sp-cert.pem -text -noout
  • Verify Entity ID matches exactly between rConfig and IdP configuration
  • Confirm ACS URL and SLS URL match IdP configuration
  • Check that required attributes (email, name) are being released by IdP
  • Review IdP logs for SAML assertion errors
  • Verify clock synchronization between rConfig server and IdP (time skew issues)
  • Check X.509 certificate in IdP metadata is valid and not expired
  • Verify SAML response is signed by IdP
  • Ensure rConfig can validate IdP signature with certificate in metadata
  • Check for SAML protocol version mismatches
  • Verify IdP is releasing required attributes (email, displayName)
  • Check attribute names match expected values
  • Review SAML assertion in IdP logs to confirm attribute names
  • Test with different attribute name mappings if needed
  • Ensure all URLs use HTTPS (not HTTP)
  • Verify domain name matches exactly (no trailing slashes)
  • Confirm Entity ID, ACS URL, and SLS URL in .env match IdP configuration
  • Check for case sensitivity in URLs
  • Verify administrator has enabled SSO access in Users section
  • Confirm user has been assigned an appropriate role
  • Check user account status is active
  • Review user email matches what’s sent in SAML assertion

Access your SP metadata URL:

Terminal window
curl https://your-rconfig-domain.com/saml2/metadata

Verify the XML contains correct Entity ID, ACS URL, and certificate.

Verify IdP metadata is accessible:

Terminal window
cat /var/www/html/rconfig8/current/storage/saml2/idp-metadata.xml

Confirm it contains valid IdP Entity ID, SSO Service URL, and X.509 certificate.

For detailed SAML debugging, temporarily enable debug mode:

Terminal window
# Add to .env
SAML2_DEBUG=true

Check logs after authentication attempt:

Terminal window
tail -f /var/www/html/rconfig8/current/storage/logs/laravel.log

Remember to disable debug mode after troubleshooting:

Terminal window
SAML2_DEBUG=false

ADFS (Active Directory Federation Services)

Section titled “ADFS (Active Directory Federation Services)”
  • Use http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress for email attribute
  • Use http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name for name attribute
  • Ensure claims are configured in Claim Rules
  • Entity ID must be registered exactly as configured
  • Verify SAML assertion is signed (not just response)
  • Check attribute mappings in OneLogin application configuration
  • Use Universal Login for SAML
  • Configure SAML addon in Auth0 application settings
  • Map user attributes in SAML configuration tab
  • Create client with SAML protocol
  • Set Valid Redirect URIs to match ACS URL
  • Configure SAML attribute mappings in client mappers