The servername on the IdP and SP could/should be virtualized, I
suppose (setting it to the external name).
If you can't do this have a look at lib/SimpleSAML/Utilities.php where
you could easily make SSP use whatever name, port and URL you want.
SAML Metadata describing these entities should only refer to the
externally visible URLs. SimpleSAMLphp should be configured to those
same values (e.g. baseurlpath in config/config.php).
-peter
I don't think it is necessary to change the code. What should be needed
is to put the SP and IdP on different paths on different servers.
Basically, configure your SP installation to run on "/myservice"
(change baseurlpath in config.php to 'myservice/simplesaml/' or
something like that). Then configure the proxy to pass requests to
/myservice to http://<sp internal ip>/myservice. Do the same for the
IdP.
You also need to set the 'session.cookie.path' to '/myservice' for the
SP and '/login' for the IdP. Otherwise, they will overwrite each
other's cookies.
Note that this requires the proxy to pass the Host-header straight
through. I don't know whether mod_proxy does this.
Regards,
Olav Morken
UNINETT / Feide
> I don't think it is necessary to change the code. What should be needed
> is to put the SP and IdP on different paths on different servers.
>
> Basically, configure your SP installation to run on "/myservice"
> (change baseurlpath in config.php to 'myservice/simplesaml/' or
> something like that). Then configure the proxy to pass requests to
> /myservice to http://<sp internal ip>/myservice. Do the same for the
> IdP.
>
> You also need to set the 'session.cookie.path' to '/myservice' for the
> SP and '/login' for the IdP. Otherwise, they will overwrite each
> other's cookies.
>
> Note that this requires the proxy to pass the Host-header straight
> through. I don't know whether mod_proxy does this.
>
>
> Regards,
> Olav Morken
> UNINETT / Feide
Hi Olav,
Thanks for you answer, that last information was the one I was
missing: it works now
I have just a bad redirect when connecting as an administrator. I
suspect this is because of the use of "'/' . $config->getBaseURL() .
'logout.php'" as a parameter to logout in
modules/core/www/authenticate.php line 19 where it should probably use
SimpleSAML_Utilities::getBaseURL()?
For the record, I did the following:
- on the reverse proxy add "ProxyPreserveHost On" to pass the Host header
- set baseurlpath to the path used in the ProxyPass for that SP/IdP
- set session.cookie.path to the path used in the ProxyPass for that SP/IdP
Regards,
GIldas
That is a bit suprising, since the only difference should be that
one of them is an absolute URL while the other is relative to the
root of the webserver. When an URL that is relative to the root of the
webserver is passed to the redirect()-function, we automatically add
the same hostname that getBaseURL() would use, thus the final redirect
should have been the same.