Hi again,
Please see some comments inline:
> On 04 Dec 2015, at 05:18 AM, Ishpreet Kaur <
ishpre...@webners.com> wrote:
> Hi Jaime,
>
> Thanks for your reply.
>
> Upto step 5, it is working, because test site is within www folder of simplesamlphp library.
>
> Now, suppose my site is:
http://localhost/cakephp.
>
> For my site, I added
>
> 'sp1' => array(
> 'saml:SP',
> 'privatekey' => 'simplesamlphp.pem',
> 'certificate' => 'simplesamlphp.crt',
> 'entityID' => '
http://localhost/cakephp'
Why are you specifying your own entity ID? Why not letting SimpleSAMLphp auto-generate it for you?
> ),
>
> in config/authsources.php file.
>
> After that, I added metadata for sp1 provided on fedaration tab of test site generated at step 5 in metadata/saml20-sp-remote.php file
You are a service provider. *You*. Not anyone else, but you. Why are you then adding your own metadata to a file where you configure *remote* service providers? Remote, of course, means here “not you”.
Is this metadata what you get in the federation tab?
Note the entity ID (the index in the $metadata array), which *should* be auto generated, points to *localhost*. Also note that this one differs to the one defined in authsources.php. I’m assuming this is a typo.
Here, and hereafter, all your endpoints point to “
service.local-saml.com”. That means your SimpleSAMLphp is configured to be accessible through “
service.local-saml.com”, not localhost.
I really don’t think you need to use SAML 1.1. Actually, you shouldn’t be using it. SAML 2.0 is more than 10 years old now.
You probably don’t need to use artifacts either.
> After adding these configuration settings, I tried step 6 API on my project.
>
> When I open link of my site,
How do you “open a link of your web site”? Do you go to
http://localhost/something?
> it redirected to "
https://openidp.feide.no". User enters his login credentials. After successful login, my requirement is that user is redirected to my site and information should be displayed. but user is redirected to "
http://service.local-saml.com/simplesaml/module.php/saml/sp/saml1-acs.php/sp1”
The user is redirected where you told the IdP he or she should be redirected. Your metadata is telling precisely this: “my assertion consumer service can be reached at
service.local-saml.com/blablabla”. So everything is normal up to this point. And by the way, really, do not use SAML 1.
> with error message displaying "State Information Lost”.
Well, if you initiated the process by going to “localhost/something”, localhost is not the same as "
service.local-saml.com", right? Therefore, cookies available for “localhost” are not available for “
service.local-saml.com”, nor the other way around. Therefore, how are you supposed to recover your state if you initiate login in a different domain than the domain where you are getting the SAML response?