lightSAML / SpBundle

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

/saml/login_check : route wrongly configured #16

Closed ntoniazzi closed 8 years ago

ntoniazzi commented 8 years ago

Hi, I configured SpBundle following the Getting Started tutorial. I got all routes working (login, discovery, metadata.xml, sessions), but when the IdP calls the login_check route POSTing the SAMLResponse, I get the following error:

Unable to find the controller for path "/saml/login_check". The route is wrongly configured.

The controller could not be found. Did I miss something?

Thanks.

ntoniazzi commented 8 years ago

Ok, I solved it and it was just a Symfony configuration issue, not related to SpBundle. The firewall's pattern is set to ^/, thus including the /saml prefix. I had a first firewall to exclude it with security: false. I needed to remove it and prepend another access_control:

access_control:
        - { path: ^/saml/, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
        - { path: ^/,      roles: ROLE_USER, requires_channel: https }

Thanks anyway, SpBundle is a great bundle.