Resources

Configuring the config.php file for SimpleSAMLphp

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

After you install and symlink the SimpleSAMLphp library, you must also add custom configurations to enable the use of the library with Cloud Platform.

Creating and configuring acquia_config.php

To create your acquia_config.php file and link it to your config.php file for use with Cloud Platform:

  1. Download the example configuration file appropriate for your hosting type, and save the file in your simplesamlphp/config directory:
  2. Update the acquia_config.php file to meet your requirements.
  3. Update the /simplesamlphp/config/config.php file with the following code to include the contents of the acquia_config.php file:

    if (file_exists('/var/www/site-php')) {
       require_once("/var/www/html/" . $_ENV['AH_SITE_NAME'] . "/simplesamlphp/config/acquia_config.php");
    }
    

    Important

    When upgrading SimpleSAMLphp, add the acquia_config.php file to the new folder, and update its configuration if needed. If SimpleSAMLphp can’t access the acquia_config.php file, Cloud Platform displays error messages in the SimpleSAMLphp log file.

  4. If your application doesn’t use SSL, comment out the following code block to set the server port to a value of 80:

    $_SERVER['SERVER_PORT'] = 443;
    $_SERVER['HTTPS'] = 'true';
    $protocol = 'https://';
    $port = ':' . $_SERVER['SERVER_PORT'];
    
  5. Review the customizations described in Available acquia_config.php modifications, and then apply any modifications that meet your application’s needs.

    Important

    For increased security, Acquia recommends changing the administrative password for SimpleSAMLphp.

  6. Save /simplesamlphp/config/config.php, and then commit the file to your Git repository.

After completing these steps, you must configure your authentication sources.

Available acquia_config.php modifications

The following customizations to the acquia_config.php file may be useful as you develop your application:

  • To modify the administrative password, update the value for $config['auth.adminpassword'].
  • If you are using an older version of the simpleSAMLphp Authentication module, uncomment the NO_CACHE cookie line set in the acquia_config.php file to ensure sessions are set correctly. If you are using any simpleSAMLphp Authentication module version on the 3.x branch (7.x-3.x-dev, 8.x-3.x-dev, or 8.x-3.x) you can remove the NO_CACHE cookie line entirely.

Debugging in SimpleSAMLphp

SimpleSAMLphp debugging logs are stored in the simplesamlphp-[YYYYMMDD].log file, located in the same folder as your other log files. For more information about the location of these log files and how to download them, see Downloading historical logs.