Resources

Installing the SimpleSAMLphp library

The information on this page is part of the SimpleSAMLphp installation process

Complete the following installation instructions for SimpleSAMLphp on a branch in a non-production environment:

  1. Download the latest version of the SimpleSAMLphp library.
  2. Extract the library to the root directory of your repository.
    This is the directory that contains your docroot, acquia-utils, and library directories. Ensure that you append the SimpleSAMLphp version number to the name of this directory. For example, simplesamlphp-1.17.7.
  3. In the root directory of your repository, create a symbolic link between the downloaded library and the existing simplesamlphp.

    Use the directory name simplesamlphp-1.17.7 from the previous step, and run a command similar to the following:

    ln -s simplesamlphp-1.17.6 simplesamlphp

    The symlink allows you to upgrade SimpleSAMLphp by adding the new version, and then updating the symlink. It also ensures that the web interface can be accessed publicly, while keeping the configuration outside a web-accessible directory. If you create the correct symlink, your directory must resemble the following example:

    dr-xr-s--- 9 www-data meow 4096 May 19 20:55 docroot -r--r----- 1 www-data meow 655 Apr 1 21:17 .gitignore dr-xr-s--- 2 www-data meow 4096 Apr 1 21:17 library -r--r----- 1 www-data meow 598 Apr 1 21:17 README.acquia lrwxrwxrwx 1 www-data meow 20 May 12 18:17 simplesamlphp -> simplesamlphp-1.17.6 dr-xr-s--- 18 www-data meow 4096 May 12 18:17 simplesamlphp-1.14.10 dr-xr-s--- 18 www-data meow 4096 May 12 18:17 simplesamlphp-1.17.6
  4. Switch to your docroot directory and create a symbolic link for simplesaml.

    • For simpleSAMLphp Authentication versions earlier than 2.x, the symlink must point to the www directory in the SimpleSAMLphp library:

      cd docroot ln -s ../simplesamlphp/www simplesaml
    • For simpleSAMLphp Authentication versions 2.x and later, the symlink must point to the public directory in the SimpleSAMLphp library:

      cd docroot ln -s ../simplesamlphp/public simplesaml

    The preceding commands ensure that the web interface is publicly accessible at http://[www.example.com]/simplesaml, while keeping the configuration outside a web-accessible directory. If you create the correct symlink, your directory must resemble the following example:

    • For simpleSAMLphp Authentication versions earlier than 2.x:

      -r--r----- 1 www-data examplesite 5382 Apr 1 21:17 README.txt -r--r----- 1 www-data examplesite 1550 Apr 1 21:17 robots.txt dr-xr-s--- 2 www-data examplesite 4096 Apr 1 21:17 scripts lrwxrwxrwx 1 www-data examplesite 20 May 12 18:17 simplesaml -> ../simplesamlphp/www
    • For simpleSAMLphp Authentication versions 2.x and later:

      -r--r----- 1 www-data examplesite 5382 Apr 1 21:17 README.txt -r--r----- 1 www-data examplesite 1550 Apr 1 21:17 robots.txt dr-xr-s--- 2 www-data examplesite 4096 Apr 1 21:17 scripts lrwxrwxrwx 1 www-data examplesite 20 May 12 18:17 simplesaml -> ../simplesamlphp/public

    When you upgrade SimpleSAMLphp, add the acquia_config.php file to the new folder and update it if needed. If SimpleSAMLphp cannot access the acquia_config.php file, Cloud Platform displays errors in the SimpleSAMLphp log file.

  5. Take a back-up of your application’s database.
  6. Install and enable the 7.x-3.x version of the simpleSAMLphp Authentication module to your codebase.

    Drupal’s administrative interface displays information on several pages to indicate that SimpleSAMLphp is not active.

    Do not enable Activate authentication via SimpleSAMLphp until you complete all other steps in this process. If you enable it before configuring authentication, you cannot sign in to your website and might also get locked out of your website.

    If you are locked out of your website, you can:

  7. Add the location of your SimpleSAMLphp_auth library to your settings.php file based on your subscription type:
    • If you have a Cloud Platform subscription, open your settings.php file and add the following lines before the Acquia require line, depending on your installed version of Drupal:

      if (file_exists('/var/www/site-php')) { $conf['simplesamlphp_auth_installdir'] = "/var/www/html/" . $_ENV['AH_SITE_NAME'] . "/simplesamlphp"; }
    • If you have a Site Factory subscription, add the following lines to a pre-settings.php hook, depending on your installed version of Drupal:

      <?php $conf['simplesamlphp_auth_installdir'] = "/var/www/html/" . $_ENV['AH_SITE_NAME'] . "/simplesamlphp";

 

After completing these steps, you must next configure your config.php file.

Acquia Help

Filter by product:

Common questions

If you can't find what you're looking for, try refining your search or contact our Support teamfor further assistance.