On Wed, May 09, 2012 at 11:54:11 +0200, David Mart�nez Borque wrote:
> You are probably right and I should address another forum, but maybe you can answer this one question:
>
> Do I have to define an SP for each one of the cgis in this application in order to authenticate and return to the same cgi?
That depends on the SP code.
> For example:
>
> Let's have two cgis in the same server:
https://host1.org/cgi-bin/a.pl and
https://host1.org/cgi-bin/b.pl
>
> The user tries to access
https://host1.org/cgi-bin/b.pl, and is redirected to the IdP. After authenticating he is redirected to the value set at AssertionConsumerService in the definition of the remote SP. Which might be
https://host1.org/cgi-bin/a.pl or
https://host1.org/cgi-bin/b.pl, but not both of them. I have tried to set AssertionConsumerService as an array with the urls of all the scripts, but the user is directed always to the value set in the first place.
>
> As I see it, the only possibility SSP offers, is to define each script as a different SP, but this is not a very good solution for an application with lots of cgis.
Actually, you can have multiple ACS URLs, and specify which one you
want to use in the authentication request. However, see below for
generic comments about this.
> This is not specific of Perl. Is this the only way? Is there another possibility?
Speaking generically about SPs: Typically one service from the user's
perspective should be registered as one service provider at the IdP.
Authentication responses are sent to the SPs ACS URL (which does not
need to be related to any other URLs at the service). The ACS URL can
then create a session for the user that can be used later.
However, all of this really depends on the SP implementation. I do not
know is the SP implementation you have found contains any session
handling functionality, or if you are expected to build that yourself.
Therefore it is better to ask someone familiar with the library you are
using.
(Another option that I do not know if you have considered is to
outsource authentication to your webserver. If you are using Apache,
there are multiple SAML 2.0 SP implementations for it.)