-1

This is my first time setting up SSO and any help would be appreciated. For the testing stage, I am running a local Homestead/Vagrant setup with Nginx. Example site mapped project.test.

I have used the installation for simplesamlphp

  1. I have downloaded latest version of simplesamlphp which is 1.19.4. I have unzipped the folder and saved it in path /home/vagrant/code/project/simplesamlphp-1.19.4/

  2. In the simplesamlphp-1.19.4/config/config.php file I have set the

'baseurlpath' => 'http://project.test/simplesaml/'

  1. I have reboot the virtual machine and tried to visit the above url. I get error 404 not found.

  2. Next step would be to add configuration as SP. I followed the instructions given by this url and added code in file simplesamlphp-1.19.4/metadata/saml20-idp-remote.php. The code I added is:

    $metadata['http://project.test'] = [ 'SingleSignOnService' => 'http://project.test/simplesaml/saml2/idp/SSOService.php', 'SingleLogoutService' => 'http://project.test/simplesaml/saml2/idp/SingleLogoutService.php', // 'certificate' => 'example.pem', ];

How can I now test the communication? Do I omit any other steps?

Tinxuanna
  • 206
  • 1
  • 3
  • 16

1 Answers1

1

You are missing some details on how your web server is configured (Apache/Nginx) but here are a few things to try:

  1. You mentioned you've added the code to ".../simplesamlphp-1.19.4"

Try to browse to http://project.test/simplesamlphp-1.19.4/

Try to browse to http://project.test/projects/simplesamlphp-1.19.4/

  1. Ensure your Apache/Nginx config is pointed to the correct location. By default the Apache Server will point to /var/www/html

You can update the location that the Apache Server is looking for files by updating the httpd.conf file.

Read more here

Noah
  • 859
  • 7
  • 17
  • Thank you for your answer @Noah. I tried to add code of SimpleSampl in the correct directory where the site project.test is configured in the Homestead.yaml file. The path is : - map: project.test to: /home/vagrant/code/project/public Then, Ι visited the url: **http://project.test/simplesamlphp-1.19.4/www/** and i was redirected to **http://project.test/simplesamlphp-1.19.4/www/module.php/core/frontpage_welcome.php** , where I got an error. – Tinxuanna Jan 17 '22 at 10:04
  • Fatal error: Uncaught SimpleSAML\Error\CriticalConfigurationError: The configuration is invalid: Setting secure cookie on plain HTTP is not allowed. in /home/vagrant/code/project/public/simplesamlphp-1.19.4/lib/SimpleSAML/Session.php:306 Stack trace: #0 /home/vagrant/code/project/public/simplesamlphp-1.19.4/lib/SimpleSAML/Error/Error.php(191): SimpleSAML\Session::getSessionFromRequest() #1 /home/vagrant/code/project/public/simplesamlphp-1.19.4/lib/SimpleSAML/Error/Error.php(229): SimpleSAML\Error\Error->saveError() #2 /home/vagrant/code/project/public/simplesamlphp-1.19.4/www/_include.php(21). – Tinxuanna Jan 17 '22 at 10:06
  • Can you please give me some advice how can I overcome this error? – Tinxuanna Jan 17 '22 at 10:47
  • The error is corrected by adding in config.php file : ' 'session.cookie.secure' => false,' – Tinxuanna Jan 17 '22 at 11:31
  • 1
    I'd recommend following the SimpleSAML to ensure all parameters are set as required. https://simplesamlphp.org/docs/stable/simplesamlphp-install Be sure to make the response as the answer since it was solving your question. – Noah Jan 18 '22 at 13:58
  • 1
    Thank you for your willing to help. Keep in touch maybe for another question in the future. – Tinxuanna Jan 21 '22 at 12:06