I am implementing single sign on using SAML for a web app using simplesamlphp, drupal as the service provider/client and WSO2 identity server as the identity provider.
When I test using the simplesaml portal, I am able to retrieve the user data properly as seen in the screenshots below.
On integrating it with the drupal site...
- The user gets sent to the identity provider login page for authentication.
- On successful authentication, they are redirected back to the app however instead of accessing the app, the user is stuck on an endless loop on a single page.
- Checking the SAML requests and responses / cookies, I see that the SAML responses are being sent back to the client as in the screenshots below. I also see multiple requests back and forth between IDP and SP.
Sample request and response
https://gist.github.com/KalemaEdgar/adad5304ae98bf98d420b2c108b13307
In the screen shots below, color green is the HTTP status code and red shows the item.
Authentication request to the identity provider.
Authentication response with the data from the identity provider.
Screenshot showing multiple redirects. Page just keeps there and SAMLRequest variable changing.
Screenshot showing the process working fine when I use the simplesaml portal.
The attributes are fetched from the WSO2 identity server