kevinoconnor7 / osTicket-auth-cas

JASIG CAS Authentication plugin for osTicket
GNU General Public License v2.0
13 stars 8 forks source link

url not supported #12

Closed freviriego closed 8 years ago

freviriego commented 8 years ago

Hi, ive installed your plugin successfully, and it works fine until i put the credentials on the CAS server. when the plugin tries to go to myurl.com/api/auth/ext i get a URL Not supported response. Any ideas? thanks in advance

kevinoconnor7 commented 8 years ago

Can you give an example of the return url when it gets to api/auth/ext?

Make sure to sanitize it as needed.

freviriego commented 8 years ago

Hi Kevin , this is the url formed in the CAS server https://ws119.juntadeandalucia.es/cas-web/login?service=http%3A%2F%2Fwww.fimabis.org%2Ftickets%2Fapi%2Fauth%2Fext

when im logged in, it returns to http://www.fimabis.org/tickets/api/auth/ext and only get a response URL not supported . Its supossed to go to http://www.fimabis/tickets/scp, right? thanks

kevinoconnor7 commented 8 years ago

It is supposed to go back to api/auth/ext where the CAS ticket will be checked before redirecting to the SCP.

Out of curiosity, are you using nginx? I found this bug report for osTicket that mentions this error happening API endpoints behind nginx: https://github.com/osTicket/osTicket-1.7/issues/538

If not, can I have some more details about your setup? What version of osTicket and what http server are you using?

freviriego commented 8 years ago

No nginx. osTicket (v1.9.12) is on a windows server 2012

kevinoconnor7 commented 8 years ago

Are you serving the site via IIS or Apache?

freviriego commented 8 years ago

sorry i forgot to mention it , IIS

kevinoconnor7 commented 8 years ago

Check out the linked issue. You have essentially the same issue, just with IIS rather than nginx. Technically osTicket only supports Apache, but you can get it work with others if you manually add the rewrite rules.

On Thu, Apr 14, 2016, 05:09 freviriego notifications@github.com wrote:

sorry i forgot to mention it , IIS

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/kevinoconnor7/osTicket-auth-cas/issues/12#issuecomment-209840012

freviriego commented 8 years ago

hi kevin , ive changed my web.config as mentioned in the nginx issue, but still having the url not supported response. This time the url includes the CAS ticket. The other api works without problems.I can send tickets via http://www.fimabis.org/tickets/api/tickets.json this is the rule ive changed in the web.config. `

                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile"
                        ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory"
                        ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="{R:1}api/http.php/{R:2}"/>
            </rule>`
kevinoconnor7 commented 8 years ago

I'm still thinking that this is an IIS issue, or just a general compatibility issue with osTicket and IIS. Either way, I don't have availability of a Windows Server to debug this on, so I can't provide a huge amount of guidance from here.