Update: The subsequent paragraph assume that when you modified your code to avoid the cyclique redirection you've made sure to :
On unix, this can be done by running (from the SimpleSAMLphp installation directory):
The next step is to create an authentication source with this module. An authentication source is an authentication module with a specific configuration. Each authentication source has a name, which is used to refer to this specific configuration in the IdP configuration. Configuration for authentication sources can be found in config/authsources.php.
In this setup, this file should contain a single entry:
<?php $config = array( 'example-userpass' => array( 'exampleauth:UserPass', 'student:studentpass' => array( 'uid' => array('student'), 'eduPersonAffiliation' => array('member', 'student'), ), 'employee:employeepass' => array( 'uid' => array('employee'), 'eduPersonAffiliation' => array('member', 'employee'), ), ), );
This configuration creates two users - student and employee, with the passwords studentpass and employeepass. The username and password is stored in the array index (student:studentpass for the student-user. The attributes for each user is configured in the array referenced by the index. For the student user, these are:
array( 'uid' => array('student'), 'eduPersonAffiliation' => array('member', 'student'), ),
The attributes will be returned by the IdP when the user logs on.
Mismatch between PHP session settings for the application and SimpleSAMLphp
If both the application you are trying to add SAML 2.0 support to and SimpleSAMLphp uses PHP session for session storage, and they don't agree on all the parameters, you can end up with this error. By default, SimpleSAMLphp uses the settings from php.ini, but these can be overridden in config/config.php.
If this is the cause of your error, you have two choices:
No authentication source with id error occurred because of a conflict of handling the session between simpleSAMLphp and codeIgniter.
Solution 1 : change SimpleSAMLphp to use a different session storage method
The solution is to set simpleSAMLphp to use something other than phpsession, as there is an issue with Memcached the best way is to set it to 'sql'. You do that in simplesamlphp/config/config.php:
/* * Configure the datastore for simpleSAMLphp. * * - 'phpsession': Limited datastore, which uses the PHP session. * - 'memcache': Key-value datastore, based on memcache. * - 'sql': SQL datastore, using PDO. * * The default datastore is 'phpsession'. * * (This option replaces the old 'session.handler'-option.) */ 'store.type' => 'sql',
Solution 2 : Change the session settings to match between the application and SimpleSAMLphp:
If you decide to make the session settings match, you should change the settings in php.ini. This is to make sure that the settings apply to everything that uses the default settings. The following options in php.ini must match the settings used by the application:
- session.save_handler: This is the method that is used to store the session. The default is "files".
- session.save_path: This is the location the session files are saved. The default depends on your PHP installation.
- session.name: This is the name of the session cookie. The default is "PHPSESSID".
- session.cookie_path: The path that the session cookie is limited to. The default is "/", which means that it is available to all pages on your domain.
- session.cookie_domain: This is the domain the session cookie is limited to. The default is unset, which makes the cookie available
only to the current domain.
Please look at the docs for more information
If that still didn't work, as the last resort : try disabling varnish caching