lightSAML / SpBundle

SAML2 SP Symfony Bundle based on LightSAML
https://www.lightsaml.com/SP-Bundle/
MIT License
66 stars 70 forks source link

Stuck in loop if user_creator service is not used #22

Closed INSEAD-asim closed 8 years ago

INSEAD-asim commented 8 years ago

Hi,

I am having some difficulty while implementation. If I don't provide user_creator service and user authenticated successfully, the system stuck in loop keep redirecting to IdP and IdP keep sending back to SP. I think this is because the user not authorized so token not generated so SP send to IdP but user is authenticated so IdP send back user to SP.

I remember I had a similar issue in SamlSPBundle and I overcome this by setting user role to something which is not in system. This stops the user at SP with 403 error as user is not authorized. I unable to do same here unless I have to override authenticate function in LightsSamlSpAuthenticationProvider.

Is there some better way to handle this case without overriding? I am avoiding this as it is hard to maintain for subsequent updates. Thanks

INSEAD-asim commented 8 years ago

I able to resolve this by creating my own user provider. I used the same trick to login user without any role and it works as it shows 403 error.