zl4bv / CakePHP-simpleSAMLphp-Plugin

Adds support for SAML authentication to CakePHP 2.x.
12 stars 8 forks source link

Plugin to cake 3 conversion issues. #11

Closed Shannanigans closed 6 years ago

Shannanigans commented 7 years ago

We have been tasked with implementing simplesaml login on a cake 3 project. We have been handed a pre-configured simpleSaml folder that if run without cakephp 3 allows the user to login and gain access to a page. We do not have access to the client's azure portal. We tried a custom cakephp 3 implementation, where after login we kept getting redirected to "https://blender.local/simplesaml/module.php/saml/sp/saml2-acs.php/azure-blender-sp".

Please keep in mind that we have next to no experience with saml or federation login in general. At this point we started to explore other options. Converting this plugin to work with cake 3 is an avenue that we decided to explore. I have converted and set up as well as I could. What I am mostly confused about is the simpleSaml work flow, and the server configuration. At the moment we are getting the exact same issue. We require login on an all actions within AppController. The user is redirected to the microsoft login portal. After successful login they are redirected to our site, but end up hitting "https://blender.local/simplesaml/module.php/saml/sp/saml2-acs.php/azure-blender-sp". At which point cake 3 then throws an error "Missing Controller".

In the set up instructions for this plugin I did not see anything in particular about: vhost setup, htaccess or custom actions to allow access to the simplesaml www folder. Since I do not have access to the "azure backend" it is difficult for me to confirm whether the issue lies with: our converted plugin, our cake setup, simpleSaml configuration or server setup.

Am I right in assuming that after login the redirect has to be directed to the simplesaml www directory? If so how did you manage that without cake picking up the navigation and trying to manage it via a controller?

Any advice would be greatly appreciated.