misha-from-lviv
misha-from-lviv

Reputation: 80

How to configure SSO by SAML on Drupal?

At first, I am new in SAML. Could somebody tell step by step, how to configure SSO on Drupal using simplesamlphp? Or how to test by "Test configured authentication sources"?

What I have now.

  1. Installed simpleSAMLphp Authentication module.
  2. Add simplesamlphp library to my site (mysite/simplesamlphp).
  3. Changed config.php
  4. Added meta to saml20-sp-remote.php

    $metadata['name'] = array(
        'SingleSignOnService'  => 'url_login',
        'SingleLogoutService'  => 'url_logout',
        'certFingerprint'      => 'key'
    );
    
  5. When I go to mysite/saml_login, I am return to login page on IdP. After login I return to my site (mysite/sso/login?params) with SAMLRequest and other GET-params. But site show page not fount error. On wiki it step 2.

So what I did wrong? May be I must set same page callback to handle this GET-params?

I also try to did this by simplesaml "Test configured authentication sources", but I got the same result.

Please, help!

Upvotes: 2

Views: 1824

Answers (1)

bekt
bekt

Reputation: 597

I'm not expert, but I have had experience configuring simplesamlphp with wordpress. but i think there may be similarities.

below my step to configure to "Test configured authentication sources"

  1. Extract Simplesamlphp into my web server

    /opt/lampp/htdocs <-- myApp

    /opt/lampp/simplesamlphp <-- simplesamlphp

  2. Configure alias simplesaml on apache2/conf/httpd.conf

    <VirtualHost 127.0.0.1:80>
        DocumentRoot /opt/lampp/htdocs
        ServerName localhost
    
        Alias /simplesaml /opt/lampp/simplesamlphp/www
        <Directory "/opt/lampp/simplesamlphp/www">
           Order allow,deny
           Allow from all
           # New directive needed in Apache 2.4.3: 
           Require all granted
        </Directory>
    </VirtualHost>
    
  3. modify /opt/lampp/simplesamlphp/config/config.php

  4. modify /opt/lampp/simplesamlphp/config/authsources.php

    enable (uncomment) example-userpass1 authsource

    *don't forget to enable exampleauth module with

    touch /opt/lampp/simplesamlphp/modules/exampleauth/enable

  5. open authentication tab > click "Test configured authentication sources" then click example-userpass to test configured authsource.

Upvotes: 1

Related Questions