1

I have an application at url like https://mytestapp.domain Have there installed SimpleSAMLphp https://mytestapp.domain/simplesaml

When I want to log in I am redirected to SAML server where I can fill username and password. Then I am redirected back to my app.

Problem is that I am redirected to https://<ip_of_my_server>/simplesaml/module.php/saml/sp/discoresp.php... but I need hostname in url (https://mytestapp.domain/simplesaml/module.php/saml/sp/discoresp.php...)

In SAML request I have

<saml:Issuer>https://<ip_of_my_server>/simplesaml/module.php/saml/sp/metadata.php/...</saml:Issuer>

AssertionConsumerServiceURL="https://<ip_of_my_server>/simplesaml/module.php/saml/sp/saml2-acs.php/..."

But

entityID="https://mytestapp.domain/simplesaml/module.php/saml/sp/metadata.php/..."

and baseurl is also filled with hostname https://mytestapp.domain...

Can somebody direct me where I should change IP to hostname?


Edit 1

mytestapp.domain/simplesaml/admin/hostnames.php as Lisa suggested is 404 Not Found (maybe some older version on my server (it looks like it is 1.11)

In config.php I have

$config = array(
//...
'baseurlpath' => 'https://' . $currentHost . '/simplesaml/',
//...
);

where $currentHost is result of getting HTTP_X_FORWARDED_HOST or HTTP_HOST and it is filled with mytestapp.domain

LiTe
  • 166
  • 1
  • 1
  • 8
  • 1
    You can check the hostname configuration of SimpleSAMLPHP at: https://mytestapp.domain/simplesaml/admin/hostnames.php Perhaps the HTTP_HOST setting on your webserver should be updated? – LisaLisa Jul 25 '18 at 12:33
  • After the information provided in the edit: In config.php for SimpleSAMLPHP, check the name of the BaseUrl setting. It seems like it should be: 'baseurlpath' => 'https://' . $currentHost . '/simplesaml/' – LisaLisa Jul 25 '18 at 15:29
  • Oh, of course you're right and it is like that there. I stupidly wrote it by hand in the edit instead of copy it from the config file. Mixed with different project in my head. – LiTe Jul 26 '18 at 07:52

0 Answers0