Letractively / rubycas-server

Automatically exported from code.google.com/p/rubycas-server
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Infinite Redirect with Invalid Ticket-Granting Tickets #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm getting an infinite redirect with denied ticket granting tickets.   Any 
ideas?

D, [2010-11-22T21:26:05.068895 #26727] DEBUG -- : Processing 
CASServer::Controllers::Login::send 
{"service"=>"http://www2.alpha.usafootball.com/register/player", 
"gateway"=>"true"}
D, [2010-11-22T21:26:05.069861 #26727] DEBUG -- : Validating ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8'
W, [2010-11-22T21:26:05.072001 #26727]  WARN -- : Invalid ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8' (no matching ticket found in the 
database).
I, [2010-11-22T21:26:05.072214 #26727]  INFO -- : Redirecting unauthenticated 
gateway request to service 'http://www2.alpha.usafootball.com/register/player'.

D, [2010-11-22T21:26:06.604606 #26727] DEBUG -- : Processing 
CASServer::Controllers::Login::send 
{"service"=>"http://www2.alpha.usafootball.com/register/player", 
"gateway"=>"true"}
D, [2010-11-22T21:26:06.605466 #26727] DEBUG -- : Validating ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8'
W, [2010-11-22T21:26:06.607406 #26727]  WARN -- : Invalid ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8' (no matching ticket found in the 
database).
I, [2010-11-22T21:26:06.607649 #26727]  INFO -- : Redirecting unauthenticated 
gateway request to service 'http://www2.alpha.usafootball.com/register/player'.

D, [2010-11-22T21:26:08.135082 #26727] DEBUG -- : Processing 
CASServer::Controllers::Login::send 
{"service"=>"http://www2.alpha.usafootball.com/register/player", 
"gateway"=>"true"}
D, [2010-11-22T21:26:08.136055 #26727] DEBUG -- : Validating ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8'
W, [2010-11-22T21:26:08.138159 #26727]  WARN -- : Invalid ticket granting 
ticket 'TGC-1290433587r30BD833A7FAA3B54C8' (no matching ticket found in the 
database).
I, [2010-11-22T21:26:08.138291 #26727]  INFO -- : Redirecting unauthenticated 
gateway request to service 'http://www2.alpha.usafootball.com/register/player'.

What version of RubyCAS-Server are you using? How is it installed (rubygem,
manual install)? How are you running it (webrick, mongrel, passenger,
etc.)?

0.8.0 on passenger

If relevant, please paste your RubyCAS-Server config.yml file here.

Original issue reported on code.google.com by thuri...@gmail.com on 22 Nov 2010 at 9:31

GoogleCodeExporter commented 8 years ago
I am having this same issue. Did you ever resolve it? I think it has something 
to do with the "gateway"=>"true" variable and how the server handles that.

Original comment by dcjesusf...@gmail.com on 26 Aug 2011 at 10:42

GoogleCodeExporter commented 8 years ago
I've been running a pretty large enterprise site on top of Rubycas for a while 
now and have yet to see it break.  I've learned that infinite redirection 
errors like this almost always revolve around session management problems on 
the client side.  Make sure that cookie-based sessions are in working shape on 
the client side.  Also, make sure that you don't ever run CAS checks twice 
within the context of one larger web request.  For example, running Ajax 
requests through CAS while running the parent page through CAS as well caused 
problems for me.  Accidentally CAS checking on images in a page caused 
problems, etc.

What CAS client are you using?

Original comment by thuri...@gmail.com on 27 Aug 2011 at 12:24

GoogleCodeExporter commented 8 years ago
^ That sounds about right. I've tried to add infinite redirection checks in 
RubyCAS in the past, but the only real way to do it properly is to insert some 
sort of cookies/session var in the browser to flag it as having already been 
through the loop. As it turns out though, the vast majority of these problems 
have to do with the client or server not being able to set cookies properly, 
making any cookie-based checks totally ineffective.

Original comment by matt.zuk...@gmail.com on 29 Aug 2011 at 2:34