Download & Extend

Infinite redirect after successful CAS login (and ticket verification on the drupal side)

Project:CAS
Version:6.x-3.1
Component:CAS
Category:support request
Priority:major
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

It worked well before and suddenly stopped working today... When a user logs in through CAS (I'm using rubycas-server), he is redirected to the drupal server with the ticket information, the ticket is validated according to the debug log but then the user is redirected to /en/cas?destination=user and then again to the CAS server...

I guess it's probably a stupid error somewhere on my part, but I've spent hours on this and I'm stumped. I've attached the file for this.

Thanks, and thanks for your work on the CAS module.
Happy new year!

AttachmentSizeStatusTest resultOperations
debug_cas.txt36.94 KBIgnored: Check issue status.NoneNone

Comments

#1

Category:bug report» support request

Hi Guillaume: Thanks for the debug log --- it is very helpful in diagnosing these problems.

In this case, it appears that CAS is successfully authenticating the user, but somehow the user's session is not being saved. I've seen this sort of error in the past, and I think it was due to a misconfiguration of PHP, not Drupal, cas.module, or phpCAS.

For debugging, I think the next step would be to see if you can use phpCAS separately from Drupal. For example, grab example_simple.php and config.php.example. Rename the latter file to config.php, and set your CAS host, port, etc in there. Then go try out example_simple.php and see if it works!

#2

Hi,

Thanks! Indeed I get the same issue when using phpCAS directly... I wonder what could have changed to create problems... I'm using php-fpm and nginx which I guess is not also that standard.

#3

Status:active» fixed

Make sure the directory or database or whatever php uses to store its sessions is writable by the php process. Hope you can get it working!

#4

Well, that was the issue when testing with example_simple.php and it does work with that now.

But, it still doesn't work with drupal... One thing I've noticed is that it says: "Skipping session rename since phpCAS is not handling the session. [Client.php:2987]" in the log, I wonder if that would be related?

One thing to note too is that login in without CAS works, so I don't think the sessions is an issue on the drupal side...

#5

Status:fixed» active

Skipping session rename since phpCAS is not handling the session.

This is desired behavior --- we need Drupal to handle the session, not phpCAS.

#6

Status:active» fixed

I assume that the support request has been resolved since we haven't heard from the original poster in several months.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.